x
 
125
126
      function offresize(handler)
134
135
      function global_resize_detect() {
136
        if (wasResized) return;
137
        wasResized = true;
138
139
        if (typeof requestAnimationFrame === 'function') {
140
          requestAnimationFrame(global_resize_delayed);
141
        }
142
        else {
143
          setTimeout(global_resize_delayed, 5);
144
        }
145
      }
146
147
      var lastMetrics: any = null;
148
      var lastScroll: any = null;
149
      function global_resize_delayed()
184
185
      function getScroll()
190
191
      function getMetrics()
198
199
      var start = new Date().valueOf();
200
      var fadeintTime = Math.min(500, ((+new Date()) - boot.bootStartTime) * 0.9);
201
      var animateFadeIn = setInterval(function(), 10);
217
218
      (<any>uiframe.global).shell.start();
219
220
      boot.api.title('Completed: ' + progressText('ui') + ' ' + new Date(drive.timestamp), 0.99);
221
222
    });
223
224
  }
225
226
  function createFrame() {
227
228
    var ifr = <HTMLIFrameElement>elem(
229
      'iframe',
230
      {
231
        position: 'absolute',
232
        left: 0, top: 0,
233
        width: '100%', height: '100%',
234
        border: 'none',
235
        src: 'about:blank'
236
      },
237
      window.document.body);
238
239
    var ifrwin: Window = ifr.contentWindow || (<any>ifr).window;
  • boot
    • base.d.ts
      declare function getText(element: Element): string;
      declare function getText(fn: Function): string;
      
      declare function setText(element: Element, text: string): void;
      
      declare function elem(tag: string): HTMLElement;
      declare function elem(tag: string, style: {}, parent?: Element): HTMLElement;
      declare function elem(tag: string, parent: Element): HTMLElement;
      declare function elem(elem: HTMLElement, style: {}, parent?: Element): HTMLElement;
      
      
      declare function on(obj: Node, eventName: string, handler: (evt: Event) => void);
      declare function on(obj: Window, eventName: string, handler: (evt: Event) => void);
      declare function on(obj: Node, eventName: string, handler: (evt: Event) => void);
      declare function off(obj: Window, eventName: string, handler: (evt: Event) => void);
      
      declare function createFrame(): createFrame.LoadedResult;
      
      declare module createFrame {
        export interface LoadedResult {
          global: Window;
          document: Document; 
          iframe: HTMLIFrameElement;
          evalFN(code: string): any;
        }
      }
    • base.ts
      function base(window: Window) {
      
        return {
          getText,
          setText,
          elem,
          on, off,
          createFrame,
          apply
        };
      
        function apply() {
          (<any>window).getText = getText;
          (<any>window).setText = setText;
          (<any>window).elem = elem;
          (<any>window).on = on;
          (<any>window).off = off;
          (<any>window).createFrame = createFrame;
        }
      
        function getText(obj) {
      
          if (typeof obj === 'function') {
            var result = /\/\*(\*(?!\/)|[^*])*\*\//m.exec(obj + '')[0];
            if (result) result = result.slice(2, result.length - 2);
            return result;
          }
          else if (/^SCRIPT$/i.test(obj.tagName)) {
            if ('text' in obj)
              return obj.text;
            else
              return obj.innerHTML;
          }
          else if (/^STYLE$/i.test(obj.tagName)) {
            if ('text' in obj)
              return obj.text;
            else if (obj.styleSheet)
              return obj.styleSheet.cssText;
            else
              return obj.innerHTML;
          }
          else if ('textContent' in obj) {
            return obj.textContent;
          }
          else if (/^INPUT$/i.test(obj.tagName)) {
            return obj.value;
          }
          else {
            var result: string = obj.innerText;
            if (result) {
              // IE fixes
              result = result.replace(/\<BR\s*\>/g, '\n').replace(/\r\n/g, '\n');
            }
            return result || '';
          }
        }
      
        function setText(obj, text) {
      
          if (/^SCRIPT$/i.test(obj.tagName)) {
            if ('text' in obj)
              obj.text = text;
            else
              obj.innerHTML = text;
          }
          else if (/^STYLE$/i.test(obj.tagName)) {
            if ('text' in obj) {
              obj.text = text;
            }
            else if ('styleSheet' in obj) {
              if (!obj.styleSheet && !obj.type) obj.type = 'text/css';
              obj.styleSheet.cssText = text;
            }
            else if ('textContent' in obj) {
              obj.textContent = text;
            }
            else {
              obj.innerHTML = text;
            }
          }
          else if ('textContent' in obj) {
            if ('type' in obj && !obj.type) obj.type = 'text/css';
            obj.textContent = text;
          }
          else if (/^INPUT$/i.test(obj.tagName)) {
            obj.value = text;
          }
          else {
            obj.innerText = text;
          }
        }
      
        function on(obj, eventName, handler) {
          if (obj.addEventListener) {
            obj.addEventListener(eventName, handler, false);
          }
          else if (obj.attachEvent) {
            obj.attachEvent('on' + eventName, handler);
          }
          else {
            obj['on' + eventName] = function(e) { return handler(e || window.event); };
          }
        };
      
        function off(obj, eventName, handler) {
          if (obj.removeEventListener) {
            obj.removeEventListener(eventName, handler, false);
          }
          else if (obj.detachEvent) {
            obj.detachEvent('on' + eventName, handler);
          }
          else {
            if (obj['on' + eventName])
              obj['on' + eventName] = null;
          }
        };
      
        function elem(tag, style, parent) {
          var e = tag.tagName ? tag : window.document.createElement(tag);
      
          if (!parent && style && style.tagName) {
            parent = style;
            style = null;
          }
      
          if (style) {
            if (typeof style === 'string') {
              setText(e, style);
            }
            else {
              for (var k in style) if (style.hasOwnProperty(k)) {
                if (k === 'text') {
                  setText(e, style[k]);
                }
                else if (k === 'className') {
                  e.className = style[k];
                }
                else if (!(e.style && k in e.style) && k in e) {
                  e[k] = style[k];
                }
                else {
      
                  if (style[k] && typeof style[k] === 'object' && typeof style[k].length === 'number') {
                    // array: iterate and apply values
                    var applyValues = style[k];
                    for (var i = 0; i < applyValues.length; i++) {
                      try { e.style[k] = applyValues[i]; }
                      catch (errApplyValues) { }
                    }
                  }
                  else {
                    // not array
                    try {
                      e.style[k] = style[k];
                    }
                    catch (err) {
                      try {
                        if (typeof console !== 'undefined' && typeof console.error === 'function')
                          console.error(e.tagName + '.style.' + k + '=' + style[k] + ': ' + err.message);
                      }
                      catch (whatevs) {
                        alert(e.tagName + '.style.' + k + '=' + style[k] + ': ' + err.message);
                      }
                    }
                  }
                }
              }
            }
          }
      
          if (parent) {
            try {
              parent.appendChild(e);
            }
            catch (error) {
              throw new Error(error.message + ' adding ' + e.tagName + ' to ' + parent.tagName);
            }
          }
      
          return e;
        }
      
        function createFrame() {
      
          var ifr = elem(
            'iframe',
            {
              position: 'absolute',
              left: 0, top: 0,
              width: '100%', height: '100%',
              border: 'none',
              src: 'about:blank'
            },
            window.document.body);
      
          var ifrwin = ifr.contentWindow || ifr.window;
          var ifrdoc = ifrwin.document;
      
          if (ifrdoc.open) ifrdoc.open();
          ifrdoc.write(
            '<!' + 'doctype html' + '>' +
            '<' + 'html' + '>' +
            '<' + 'head' + '><' + 'style' + '>' +
            'body,html{margin:0;padding:0;border:none;height:100%;border:none;}' +
            '*,*:before,*:after{box-sizing:inherit;}' +
            'html{box-sizing:border-box;}' +
            '</' + 'style' + '>\n' +
      
            '<' + 'body' + '>' +
      
            '<' + 'script' + '>window.__eval_export_=function(code) { return eval(code); }</' + 'script' + '>' +
      
            // it's important to have body before any long scripts (especialy external),
            // so IFRAME is immediately ready
            '<' + 'body' + '>' +
      
            '</' + 'html' + '>');
          if (ifrdoc.close) ifrdoc.close();
      
          var ifrwin_eval = ifrwin.__eval_export_;
          try {
            delete (<any>ifrwin).__eval_export_;
          }
          catch (weirdIEFailure) {
            // no big deal if it fails
          }
      
          ifrdoc.body.innerHTML = '';
      
          if (window.onerror) {
            ifrwin.onerror = delegate_onerror;
          }
      
          return {
            document: ifrdoc,
            global: ifrwin,
            iframe: ifr,
            evalFN: ifrwin_eval
          };
      
          function delegate_onerror() {
            window.onerror.apply(window, arguments);
          }
      
        }
      
      }
    • bootUI.js
      function bootUI(document, window, base) {
      
        base.elem(document.body, {
          background: 'rgb(3,11,61)',
          color: 'cyan',
          border: 'none',
          overflow: 'hidden',
          fontFamily: 'Segoe UI Light, Segoe UI, Ubuntu Light, Ubuntu, Toronto, Helvetica, Roboto, Droid Sans, Sans Serif'
        });
      
        base.elem('div', {
          innerHTML:
          	'<table style="width:100%;filter:blur(2.5px);-webkit-filter:blur(2.5px);-ms-filter: DXImageTransform.Microsoft.Blur(PixelRadius=\'2.5\');" width=100%><tr><td style="width:50%;" width=50% valign=top>'+
          	'<div style="color: white">'+
              '<div style="background: darkcyan; width: 33%; margin-top:0.5em;padding-left:0.5em;">######</div>'+
              '<div style="margin-left:0.5em;">'+
                '##### <br>'+
                '###'+
              '</div>'+
              '<div style="margin-left:0.5em;">'+
                '******* <br>'+
                '*********** <br>'+
                '*********** <br>'+
                '************ <br>'+
                '************* <br>'+
                '**************** ** <br>'+
                '*************** <br>'+
                '************' +
              '</div>'+
            '</div>'+
          	'</td><td style="width:50%; padding: 0.5em;" width=50% valign=top>'+
          	'<div style="color: white">'+
          	'-- <br>'+
          	'#### <br>'+
          	'####### <br>'+
          	'#### <br>'+
          	'#### <br>'+
          	'#### #### <br>' +
          	'######## <br>' +
          	'##### <br>'+
          	'####### <br>' +
          	'#######' +
          	'</div>'+
          	'***** ** <br>'+
          	'**** **** <br>'+
          	'*********' +
          	'</td></tr></table>'
        }, document.body);
      
      
        var progressContainer = base.elem('div', {
          position: 'absolute',
          left: 0, top: 0,
          padding: '3em'
        }, document.body);
      
        var header = base.elem('h2', {
          text: 'Mini portabled shell',
          color: 'white',
          fontWeight: '100',
          fontSize: '500%',
          marginBottom: 0, paddingBottom: 0,
          textShadow: '1px 1px 3px black'
        }, progressContainer);
      
        var smallTitle = base.elem('div', {
          fontStyle: 'italic',
          paddingLeft: '1em',
          textShadow: '1px 1px 3px black',
          text: 'Loading...',
          opacity: 0.8
        }, progressContainer);
      
        var bootBar = base.elem('div', {
          marginTop: '2em',
          background: 'gold', color: 'gold',
          height: '2px',
          width: '3%',
          fontSize: '10%',
          innerHTML: '&nbsp;'
        }, progressContainer);
      
        var darkBottom = base.elem('div', {
          position: 'absolute',
          bottom: 0,
          width: '100%',
          height: '3em',
          background: 'black'
        }, document.body);
      
        return {
          title: function(t, ratio) {
            setText(smallTitle,t);
            if (typeof console !== 'undefined' && typeof console.log === 'function')
              console.log(t);
            if (ratio) {
              bootBar.style.width = (ratio*100) + '%';
            }
          },
          loaded: function() {
            setText(smallTitle, 'Loaded.');
          }
        };
      }
    • earlyBoot.ts
      function earlyBoot(window: Window) {
      
        base(window).apply();
      
        (<any>window).__boot_times.earlyBootStart = (+new Date());
      
        document.write(
          '<' + 'style' + ' data-legit=mi>' +
          '*{display:none;background:black;color:black;}' +
          'html,body{display:block;background:black;color:black;}' +
          '</' + 'style' + '>' +
          (document.body ? '' : '<body>'));
      
        elem(document.body, {
          height: '100%',
          margin: 0,
          padding: 0,
          overflow: 'hidden',
          background: 'black', color: 'black'
        });
        elem(document.body.parentElement, {
          overflow: 'hidden',
          background: 'black', color: 'black'
        });
      
        var allStyleElements = document.getElementsByTagName('style');
        var addedStyle = allStyleElements[allStyleElements.length - 1];
      
        var bootFrame: any = createFrame();
        bootFrame.iframe.style.zIndex = <any>2000;
        bootFrame.iframe.style.display = 'block';
      
        base(bootFrame.global).apply();
      
        var bootUI = (<any>window).bootUI;
      
        var bootAPI = bootUI(bootFrame.document, bootFrame.global, { elem: (<any>bootFrame.global).elem });
        bootFrame.api = bootAPI;
        bootFrame.earlyStartTime = (<any>window).__boot_times.onerror_start;
        bootFrame.bootStartTime = (<any>window).__boot_times.earlyBootStart;
      
        var uniqueKey = deriveUniqueKey(location);
      
        var shellLoaderInstance = null;
        var shellLoadInterval = setInterval(function() {
          if ((<any>window).shellLoader === 'undefined') return;
          if (!shellLoadInterval) return; // protect against old Opera's super-async habits
          shellLoaderInstance = shellLoaderInstance ? shellLoaderInstance.continueLoading() : (<any>window).shellLoader ? (<any>window).shellLoader(uniqueKey, document, bootFrame) : null;
        }, 1);
      
        window.onload = function() {
      
          clearInterval(shellLoadInterval);
          shellLoadInterval = 0;
      
          removeSpyElements();
          bootFrame.iframe.style.zIndex = <any>1000;
          if (addedStyle.parentElement)
            addedStyle.parentElement.removeChild(addedStyle);
          bootFrame.iframe.style.display = '';
      
          (shellLoaderInstance || (<any>window).shellLoader(uniqueKey, document, bootFrame)).finishLoading();
      
        };
      
        function deriveUniqueKey(locationSeed) {
          var key = (locationSeed + '').split('?')[0].split('#')[0].toLowerCase();
      
          var posIndexTrail = key.search(/\/index\.html$/);
          if (posIndexTrail > 0) key = key.slice(0, posIndexTrail);
      
          if (key.charAt(0) === '/')
            key = key.slice(1);
          if (key.slice(-1) === '/')
            key = key.slice(0, key.length - 1);
      
          return smallHash(key) + '-' + smallHash(key.slice(1) + 'a');
      
          function smallHash(key) {
            for (var h = 0, i = 0; i < key.length; i++) {
              h = Math.pow(31, h + 31 / key.charCodeAt(i));
              h -= h | 0;
            }
            return (h * 2000000000) | 0;
          }
      
        }
      
        function removeSpyElements() {
      
          removeElements('iframe', function(ifr) { return ifr !== bootFrame.iframe; });
          removeElements('style', function(sty) { return sty.getAttribute('data-legit') !== 'mi'; });
          removeElements('script', function(sty) { return sty.getAttribute('data-legit') !== 'mi'; });
      
          function removeElements(tagName, predicateToRemove) {
            var list = document.getElementsByTagName(tagName);
            for (var i = 0; i < list.length; i++) {
              var elem = list[i] || list.item(i);
              if (predicateToRemove(elem)) {
                elem.parentElement.removeChild(elem);
                i--;
              }
            }
          }
        }
      
      }
    • onerror.js
      window.__boot_times = window.__boot_times || {};
      window.__boot_times.onerror_start = +new Date();
      
      window.onerror = function onerror() {
      
        var msg = [];
        for (var i = 0; i < arguments.length; i++) {
          var a = arguments[i];
          if (a && (typeof a === 'object')) {
      
            if (a.stack) {
              msg.push(a.stack);
            }
            else {
              var msg1 = [];
              for (var k in a) {
                var r = a[k];
                if (typeof r === 'function' || (typeof r === 'object' && !r)) continue;
                msg1.push(k+':'+r);
              }
              msg.push(msg1.join(', '));
            }
          }
          else {
            msg.push(a===null ? 'null' : a);
          }
      
        }
      
        alert(msg.join('\n'));
      
      }
  • isolation
    • noapi
      • imports
        • base64-js
          • b64.js
            var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
            
            ;(function (exports) {
              'use strict'
            
              var Arr = (typeof Uint8Array !== 'undefined')
                ? Uint8Array
                : Array
            
              var PLUS = '+'.charCodeAt(0)
              var SLASH = '/'.charCodeAt(0)
              var NUMBER = '0'.charCodeAt(0)
              var LOWER = 'a'.charCodeAt(0)
              var UPPER = 'A'.charCodeAt(0)
              var PLUS_URL_SAFE = '-'.charCodeAt(0)
              var SLASH_URL_SAFE = '_'.charCodeAt(0)
            
              function decode (elt) {
                var code = elt.charCodeAt(0)
                if (code === PLUS || code === PLUS_URL_SAFE) return 62 // '+'
                if (code === SLASH || code === SLASH_URL_SAFE) return 63 // '/'
                if (code < NUMBER) return -1 // no match
                if (code < NUMBER + 10) return code - NUMBER + 26 + 26
                if (code < UPPER + 26) return code - UPPER
                if (code < LOWER + 26) return code - LOWER + 26
              }
            
              function b64ToByteArray (b64) {
                var i, j, l, tmp, placeHolders, arr
            
                if (b64.length % 4 > 0) {
                  throw new Error('Invalid string. Length must be a multiple of 4')
                }
            
                // the number of equal signs (place holders)
                // if there are two placeholders, than the two characters before it
                // represent one byte
                // if there is only one, then the three characters before it represent 2 bytes
                // this is just a cheap hack to not do indexOf twice
                var len = b64.length
                placeHolders = b64.charAt(len - 2) === '=' ? 2 : b64.charAt(len - 1) === '=' ? 1 : 0
            
                // base64 is 4/3 + up to two characters of the original data
                arr = new Arr(b64.length * 3 / 4 - placeHolders)
            
                // if there are placeholders, only get up to the last complete 4 chars
                l = placeHolders > 0 ? b64.length - 4 : b64.length
            
                var L = 0
            
                function push (v) {
                  arr[L++] = v
                }
            
                for (i = 0, j = 0; i < l; i += 4, j += 3) {
                  tmp = (decode(b64.charAt(i)) << 18) | (decode(b64.charAt(i + 1)) << 12) | (decode(b64.charAt(i + 2)) << 6) | decode(b64.charAt(i + 3))
                  push((tmp & 0xFF0000) >> 16)
                  push((tmp & 0xFF00) >> 8)
                  push(tmp & 0xFF)
                }
            
                if (placeHolders === 2) {
                  tmp = (decode(b64.charAt(i)) << 2) | (decode(b64.charAt(i + 1)) >> 4)
                  push(tmp & 0xFF)
                } else if (placeHolders === 1) {
                  tmp = (decode(b64.charAt(i)) << 10) | (decode(b64.charAt(i + 1)) << 4) | (decode(b64.charAt(i + 2)) >> 2)
                  push((tmp >> 8) & 0xFF)
                  push(tmp & 0xFF)
                }
            
                return arr
              }
            
              function uint8ToBase64 (uint8) {
                var i
                var extraBytes = uint8.length % 3 // if we have 1 byte left, pad 2 bytes
                var output = ''
                var temp, length
            
                function encode (num) {
                  return lookup.charAt(num)
                }
            
                function tripletToBase64 (num) {
                  return encode(num >> 18 & 0x3F) + encode(num >> 12 & 0x3F) + encode(num >> 6 & 0x3F) + encode(num & 0x3F)
                }
            
                // go through the array every three bytes, we'll deal with trailing stuff later
                for (i = 0, length = uint8.length - extraBytes; i < length; i += 3) {
                  temp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2])
                  output += tripletToBase64(temp)
                }
            
                // pad the end with zeros, but make sure to not forget the extra bytes
                switch (extraBytes) {
                  case 1:
                    temp = uint8[uint8.length - 1]
                    output += encode(temp >> 2)
                    output += encode((temp << 4) & 0x3F)
                    output += '=='
                    break
                  case 2:
                    temp = (uint8[uint8.length - 2] << 8) + (uint8[uint8.length - 1])
                    output += encode(temp >> 10)
                    output += encode((temp >> 4) & 0x3F)
                    output += encode((temp << 2) & 0x3F)
                    output += '='
                    break
                  default:
                    break
                }
            
                return output
              }
            
              exports.toByteArray = b64ToByteArray
              exports.fromByteArray = uint8ToBase64
            }(typeof exports === 'undefined' ? (this.base64js = {}) : exports))
            
        • buffer
          • index.js
            /*!
             * The buffer module from node.js, for the browser.
             *
             * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
             * @license  MIT
             */
            
            var base64 = require('base64-js')
            var ieee754 = require('ieee754')
            var isArray = require('is-array')
            
            exports.Buffer = Buffer
            exports.SlowBuffer = SlowBuffer
            exports.INSPECT_MAX_BYTES = 50
            Buffer.poolSize = 8192 // not used by this implementation
            
            var kMaxLength = 0x3fffffff
            var rootParent = {}
            
            /**
             * If `Buffer.TYPED_ARRAY_SUPPORT`:
             *   === true    Use Uint8Array implementation (fastest)
             *   === false   Use Object implementation (most compatible, even IE6)
             *
             * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,
             * Opera 11.6+, iOS 4.2+.
             *
             * Note:
             *
             * - Implementation must support adding new properties to `Uint8Array` instances.
             *   Firefox 4-29 lacked support, fixed in Firefox 30+.
             *   See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.
             *
             *  - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.
             *
             *  - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of
             *    incorrect length in some situations.
             *
             * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they will
             * get the Object implementation, which is slower but will work correctly.
             */
            Buffer.TYPED_ARRAY_SUPPORT = (function () {
              try {
                var buf = new ArrayBuffer(0)
                var arr = new Uint8Array(buf)
                arr.foo = function () { return 42 }
                return arr.foo() === 42 && // typed array instances can be augmented
                    typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`
                    new Uint8Array(1).subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`
              } catch (e) {
                return false
              }
            })()
            
            /**
             * Class: Buffer
             * =============
             *
             * The Buffer constructor returns instances of `Uint8Array` that are augmented
             * with function properties for all the node `Buffer` API functions. We use
             * `Uint8Array` so that square bracket notation works as expected -- it returns
             * a single octet.
             *
             * By augmenting the instances, we can avoid modifying the `Uint8Array`
             * prototype.
             */
            function Buffer (arg) {
              if (!(this instanceof Buffer)) {
                // Avoid going through an ArgumentsAdaptorTrampoline in the common case.
                if (arguments.length > 1) return new Buffer(arg, arguments[1])
                return new Buffer(arg)
              }
            
              this.length = 0
              this.parent = undefined
            
              // Common case.
              if (typeof arg === 'number') {
                return fromNumber(this, arg)
              }
            
              // Slightly less common case.
              if (typeof arg === 'string') {
                return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')
              }
            
              // Unusual.
              return fromObject(this, arg)
            }
            
            function fromNumber (that, length) {
              that = allocate(that, length < 0 ? 0 : checked(length) | 0)
              if (!Buffer.TYPED_ARRAY_SUPPORT) {
                for (var i = 0; i < length; i++) {
                  that[i] = 0
                }
              }
              return that
            }
            
            function fromString (that, string, encoding) {
              if (typeof encoding !== 'string' || encoding === '') encoding = 'utf8'
            
              // Assumption: byteLength() return value is always < kMaxLength.
              var length = byteLength(string, encoding) | 0
              that = allocate(that, length)
            
              that.write(string, encoding)
              return that
            }
            
            function fromObject (that, object) {
              if (Buffer.isBuffer(object)) return fromBuffer(that, object)
            
              if (isArray(object)) return fromArray(that, object)
            
              if (object == null) {
                throw new TypeError('must start with number, buffer, array or string')
              }
            
              if (typeof ArrayBuffer !== 'undefined' && object.buffer instanceof ArrayBuffer) {
                return fromTypedArray(that, object)
              }
            
              if (object.length) return fromArrayLike(that, object)
            
              return fromJsonObject(that, object)
            }
            
            function fromBuffer (that, buffer) {
              var length = checked(buffer.length) | 0
              that = allocate(that, length)
              buffer.copy(that, 0, 0, length)
              return that
            }
            
            function fromArray (that, array) {
              var length = checked(array.length) | 0
              that = allocate(that, length)
              for (var i = 0; i < length; i += 1) {
                that[i] = array[i] & 255
              }
              return that
            }
            
            // Duplicate of fromArray() to keep fromArray() monomorphic.
            function fromTypedArray (that, array) {
              var length = checked(array.length) | 0
              that = allocate(that, length)
              // Truncating the elements is probably not what people expect from typed
              // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior
              // of the old Buffer constructor.
              for (var i = 0; i < length; i += 1) {
                that[i] = array[i] & 255
              }
              return that
            }
            
            function fromArrayLike (that, array) {
              var length = checked(array.length) | 0
              that = allocate(that, length)
              for (var i = 0; i < length; i += 1) {
                that[i] = array[i] & 255
              }
              return that
            }
            
            // Deserialize { type: 'Buffer', data: [1,2,3,...] } into a Buffer object.
            // Returns a zero-length buffer for inputs that don't conform to the spec.
            function fromJsonObject (that, object) {
              var array
              var length = 0
            
              if (object.type === 'Buffer' && isArray(object.data)) {
                array = object.data
                length = checked(array.length) | 0
              }
              that = allocate(that, length)
            
              for (var i = 0; i < length; i += 1) {
                that[i] = array[i] & 255
              }
              return that
            }
            
            function allocate (that, length) {
              if (Buffer.TYPED_ARRAY_SUPPORT) {
                // Return an augmented `Uint8Array` instance, for best performance
                that = Buffer._augment(new Uint8Array(length))
              } else {
                // Fallback: Return an object instance of the Buffer class
                that.length = length
                that._isBuffer = true
              }
            
              var fromPool = length !== 0 && length <= Buffer.poolSize >>> 1
              if (fromPool) that.parent = rootParent
            
              return that
            }
            
            function checked (length) {
              // Note: cannot use `length < kMaxLength` here because that fails when
              // length is NaN (which is otherwise coerced to zero.)
              if (length >= kMaxLength) {
                throw new RangeError('Attempt to allocate Buffer larger than maximum ' +
                                     'size: 0x' + kMaxLength.toString(16) + ' bytes')
              }
              return length | 0
            }
            
            function SlowBuffer (subject, encoding) {
              if (!(this instanceof SlowBuffer)) return new SlowBuffer(subject, encoding)
            
              var buf = new Buffer(subject, encoding)
              delete buf.parent
              return buf
            }
            
            Buffer.isBuffer = function isBuffer (b) {
              return !!(b != null && b._isBuffer)
            }
            
            Buffer.compare = function compare (a, b) {
              if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {
                throw new TypeError('Arguments must be Buffers')
              }
            
              if (a === b) return 0
            
              var x = a.length
              var y = b.length
            
              var i = 0
              var len = Math.min(x, y)
              while (i < len) {
                if (a[i] !== b[i]) break
            
                ++i
              }
            
              if (i !== len) {
                x = a[i]
                y = b[i]
              }
            
              if (x < y) return -1
              if (y < x) return 1
              return 0
            }
            
            Buffer.isEncoding = function isEncoding (encoding) {
              switch (String(encoding).toLowerCase()) {
                case 'hex':
                case 'utf8':
                case 'utf-8':
                case 'ascii':
                case 'binary':
                case 'base64':
                case 'raw':
                case 'ucs2':
                case 'ucs-2':
                case 'utf16le':
                case 'utf-16le':
                  return true
                default:
                  return false
              }
            }
            
            Buffer.concat = function concat (list, length) {
              if (!isArray(list)) throw new TypeError('list argument must be an Array of Buffers.')
            
              if (list.length === 0) {
                return new Buffer(0)
              } else if (list.length === 1) {
                return list[0]
              }
            
              var i
              if (length === undefined) {
                length = 0
                for (i = 0; i < list.length; i++) {
                  length += list[i].length
                }
              }
            
              var buf = new Buffer(length)
              var pos = 0
              for (i = 0; i < list.length; i++) {
                var item = list[i]
                item.copy(buf, pos)
                pos += item.length
              }
              return buf
            }
            
            function byteLength (string, encoding) {
              if (typeof string !== 'string') string = String(string)
            
              if (string.length === 0) return 0
            
              switch (encoding || 'utf8') {
                case 'ascii':
                case 'binary':
                case 'raw':
                  return string.length
                case 'ucs2':
                case 'ucs-2':
                case 'utf16le':
                case 'utf-16le':
                  return string.length * 2
                case 'hex':
                  return string.length >>> 1
                case 'utf8':
                case 'utf-8':
                  return utf8ToBytes(string).length
                case 'base64':
                  return base64ToBytes(string).length
                default:
                  return string.length
              }
            }
            Buffer.byteLength = byteLength
            
            // pre-set for values that may exist in the future
            Buffer.prototype.length = undefined
            Buffer.prototype.parent = undefined
            
            // toString(encoding, start=0, end=buffer.length)
            Buffer.prototype.toString = function toString (encoding, start, end) {
              var loweredCase = false
            
              start = start | 0
              end = end === undefined || end === Infinity ? this.length : end | 0
            
              if (!encoding) encoding = 'utf8'
              if (start < 0) start = 0
              if (end > this.length) end = this.length
              if (end <= start) return ''
            
              while (true) {
                switch (encoding) {
                  case 'hex':
                    return hexSlice(this, start, end)
            
                  case 'utf8':
                  case 'utf-8':
                    return utf8Slice(this, start, end)
            
                  case 'ascii':
                    return asciiSlice(this, start, end)
            
                  case 'binary':
                    return binarySlice(this, start, end)
            
                  case 'base64':
                    return base64Slice(this, start, end)
            
                  case 'ucs2':
                  case 'ucs-2':
                  case 'utf16le':
                  case 'utf-16le':
                    return utf16leSlice(this, start, end)
            
                  default:
                    if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
                    encoding = (encoding + '').toLowerCase()
                    loweredCase = true
                }
              }
            }
            
            Buffer.prototype.equals = function equals (b) {
              if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')
              if (this === b) return true
              return Buffer.compare(this, b) === 0
            }
            
            Buffer.prototype.inspect = function inspect () {
              var str = ''
              var max = exports.INSPECT_MAX_BYTES
              if (this.length > 0) {
                str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')
                if (this.length > max) str += ' ... '
              }
              return '<Buffer ' + str + '>'
            }
            
            Buffer.prototype.compare = function compare (b) {
              if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')
              if (this === b) return 0
              return Buffer.compare(this, b)
            }
            
            Buffer.prototype.indexOf = function indexOf (val, byteOffset) {
              if (byteOffset > 0x7fffffff) byteOffset = 0x7fffffff
              else if (byteOffset < -0x80000000) byteOffset = -0x80000000
              byteOffset >>= 0
            
              if (this.length === 0) return -1
              if (byteOffset >= this.length) return -1
            
              // Negative offsets start from the end of the buffer
              if (byteOffset < 0) byteOffset = Math.max(this.length + byteOffset, 0)
            
              if (typeof val === 'string') {
                if (val.length === 0) return -1 // special case: looking for empty string always fails
                return String.prototype.indexOf.call(this, val, byteOffset)
              }
              if (Buffer.isBuffer(val)) {
                return arrayIndexOf(this, val, byteOffset)
              }
              if (typeof val === 'number') {
                if (Buffer.TYPED_ARRAY_SUPPORT && Uint8Array.prototype.indexOf === 'function') {
                  return Uint8Array.prototype.indexOf.call(this, val, byteOffset)
                }
                return arrayIndexOf(this, [ val ], byteOffset)
              }
            
              function arrayIndexOf (arr, val, byteOffset) {
                var foundIndex = -1
                for (var i = 0; byteOffset + i < arr.length; i++) {
                  if (arr[byteOffset + i] === val[foundIndex === -1 ? 0 : i - foundIndex]) {
                    if (foundIndex === -1) foundIndex = i
                    if (i - foundIndex + 1 === val.length) return byteOffset + foundIndex
                  } else {
                    foundIndex = -1
                  }
                }
                return -1
              }
            
              throw new TypeError('val must be string, number or Buffer')
            }
            
            // `get` will be removed in Node 0.13+
            Buffer.prototype.get = function get (offset) {
              console.log('.get() is deprecated. Access using array indexes instead.')
              return this.readUInt8(offset)
            }
            
            // `set` will be removed in Node 0.13+
            Buffer.prototype.set = function set (v, offset) {
              console.log('.set() is deprecated. Access using array indexes instead.')
              return this.writeUInt8(v, offset)
            }
            
            function hexWrite (buf, string, offset, length) {
              offset = Number(offset) || 0
              var remaining = buf.length - offset
              if (!length) {
                length = remaining
              } else {
                length = Number(length)
                if (length > remaining) {
                  length = remaining
                }
              }
            
              // must be an even number of digits
              var strLen = string.length
              if (strLen % 2 !== 0) throw new Error('Invalid hex string')
            
              if (length > strLen / 2) {
                length = strLen / 2
              }
              for (var i = 0; i < length; i++) {
                var parsed = parseInt(string.substr(i * 2, 2), 16)
                if (isNaN(parsed)) throw new Error('Invalid hex string')
                buf[offset + i] = parsed
              }
              return i
            }
            
            function utf8Write (buf, string, offset, length) {
              return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)
            }
            
            function asciiWrite (buf, string, offset, length) {
              return blitBuffer(asciiToBytes(string), buf, offset, length)
            }
            
            function binaryWrite (buf, string, offset, length) {
              return asciiWrite(buf, string, offset, length)
            }
            
            function base64Write (buf, string, offset, length) {
              return blitBuffer(base64ToBytes(string), buf, offset, length)
            }
            
            function ucs2Write (buf, string, offset, length) {
              return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)
            }
            
            Buffer.prototype.write = function write (string, offset, length, encoding) {
              // Buffer#write(string)
              if (offset === undefined) {
                encoding = 'utf8'
                length = this.length
                offset = 0
              // Buffer#write(string, encoding)
              } else if (length === undefined && typeof offset === 'string') {
                encoding = offset
                length = this.length
                offset = 0
              // Buffer#write(string, offset[, length][, encoding])
              } else if (isFinite(offset)) {
                offset = offset | 0
                if (isFinite(length)) {
                  length = length | 0
                  if (encoding === undefined) encoding = 'utf8'
                } else {
                  encoding = length
                  length = undefined
                }
              // legacy write(string, encoding, offset, length) - remove in v0.13
              } else {
                var swap = encoding
                encoding = offset
                offset = length | 0
                length = swap
              }
            
              var remaining = this.length - offset
              if (length === undefined || length > remaining) length = remaining
            
              if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {
                throw new RangeError('attempt to write outside buffer bounds')
              }
            
              if (!encoding) encoding = 'utf8'
            
              var loweredCase = false
              for (;;) {
                switch (encoding) {
                  case 'hex':
                    return hexWrite(this, string, offset, length)
            
                  case 'utf8':
                  case 'utf-8':
                    return utf8Write(this, string, offset, length)
            
                  case 'ascii':
                    return asciiWrite(this, string, offset, length)
            
                  case 'binary':
                    return binaryWrite(this, string, offset, length)
            
                  case 'base64':
                    // Warning: maxLength not taken into account in base64Write
                    return base64Write(this, string, offset, length)
            
                  case 'ucs2':
                  case 'ucs-2':
                  case 'utf16le':
                  case 'utf-16le':
                    return ucs2Write(this, string, offset, length)
            
                  default:
                    if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
                    encoding = ('' + encoding).toLowerCase()
                    loweredCase = true
                }
              }
            }
            
            Buffer.prototype.toJSON = function toJSON () {
              return {
                type: 'Buffer',
                data: Array.prototype.slice.call(this._arr || this, 0)
              }
            }
            
            function base64Slice (buf, start, end) {
              if (start === 0 && end === buf.length) {
                return base64.fromByteArray(buf)
              } else {
                return base64.fromByteArray(buf.slice(start, end))
              }
            }
            
            function utf8Slice (buf, start, end) {
              var res = ''
              var tmp = ''
              end = Math.min(buf.length, end)
            
              for (var i = start; i < end; i++) {
                if (buf[i] <= 0x7F) {
                  res += decodeUtf8Char(tmp) + String.fromCharCode(buf[i])
                  tmp = ''
                } else {
                  tmp += '%' + buf[i].toString(16)
                }
              }
            
              return res + decodeUtf8Char(tmp)
            }
            
            function asciiSlice (buf, start, end) {
              var ret = ''
              end = Math.min(buf.length, end)
            
              for (var i = start; i < end; i++) {
                ret += String.fromCharCode(buf[i] & 0x7F)
              }
              return ret
            }
            
            function binarySlice (buf, start, end) {
              var ret = ''
              end = Math.min(buf.length, end)
            
              for (var i = start; i < end; i++) {
                ret += String.fromCharCode(buf[i])
              }
              return ret
            }
            
            function hexSlice (buf, start, end) {
              var len = buf.length
            
              if (!start || start < 0) start = 0
              if (!end || end < 0 || end > len) end = len
            
              var out = ''
              for (var i = start; i < end; i++) {
                out += toHex(buf[i])
              }
              return out
            }
            
            function utf16leSlice (buf, start, end) {
              var bytes = buf.slice(start, end)
              var res = ''
              for (var i = 0; i < bytes.length; i += 2) {
                res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)
              }
              return res
            }
            
            Buffer.prototype.slice = function slice (start, end) {
              var len = this.length
              start = ~~start
              end = end === undefined ? len : ~~end
            
              if (start < 0) {
                start += len
                if (start < 0) start = 0
              } else if (start > len) {
                start = len
              }
            
              if (end < 0) {
                end += len
                if (end < 0) end = 0
              } else if (end > len) {
                end = len
              }
            
              if (end < start) end = start
            
              var newBuf
              if (Buffer.TYPED_ARRAY_SUPPORT) {
                newBuf = Buffer._augment(this.subarray(start, end))
              } else {
                var sliceLen = end - start
                newBuf = new Buffer(sliceLen, undefined)
                for (var i = 0; i < sliceLen; i++) {
                  newBuf[i] = this[i + start]
                }
              }
            
              if (newBuf.length) newBuf.parent = this.parent || this
            
              return newBuf
            }
            
            /*
             * Need to make sure that buffer isn't trying to write out of bounds.
             */
            function checkOffset (offset, ext, length) {
              if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')
              if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')
            }
            
            Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {
              offset = offset | 0
              byteLength = byteLength | 0
              if (!noAssert) checkOffset(offset, byteLength, this.length)
            
              var val = this[offset]
              var mul = 1
              var i = 0
              while (++i < byteLength && (mul *= 0x100)) {
                val += this[offset + i] * mul
              }
            
              return val
            }
            
            Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {
              offset = offset | 0
              byteLength = byteLength | 0
              if (!noAssert) {
                checkOffset(offset, byteLength, this.length)
              }
            
              var val = this[offset + --byteLength]
              var mul = 1
              while (byteLength > 0 && (mul *= 0x100)) {
                val += this[offset + --byteLength] * mul
              }
            
              return val
            }
            
            Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {
              if (!noAssert) checkOffset(offset, 1, this.length)
              return this[offset]
            }
            
            Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {
              if (!noAssert) checkOffset(offset, 2, this.length)
              return this[offset] | (this[offset + 1] << 8)
            }
            
            Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {
              if (!noAssert) checkOffset(offset, 2, this.length)
              return (this[offset] << 8) | this[offset + 1]
            }
            
            Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {
              if (!noAssert) checkOffset(offset, 4, this.length)
            
              return ((this[offset]) |
                  (this[offset + 1] << 8) |
                  (this[offset + 2] << 16)) +
                  (this[offset + 3] * 0x1000000)
            }
            
            Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {
              if (!noAssert) checkOffset(offset, 4, this.length)
            
              return (this[offset] * 0x1000000) +
                ((this[offset + 1] << 16) |
                (this[offset + 2] << 8) |
                this[offset + 3])
            }
            
            Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {
              offset = offset | 0
              byteLength = byteLength | 0
              if (!noAssert) checkOffset(offset, byteLength, this.length)
            
              var val = this[offset]
              var mul = 1
              var i = 0
              while (++i < byteLength && (mul *= 0x100)) {
                val += this[offset + i] * mul
              }
              mul *= 0x80
            
              if (val >= mul) val -= Math.pow(2, 8 * byteLength)
            
              return val
            }
            
            Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {
              offset = offset | 0
              byteLength = byteLength | 0
              if (!noAssert) checkOffset(offset, byteLength, this.length)
            
              var i = byteLength
              var mul = 1
              var val = this[offset + --i]
              while (i > 0 && (mul *= 0x100)) {
                val += this[offset + --i] * mul
              }
              mul *= 0x80
            
              if (val >= mul) val -= Math.pow(2, 8 * byteLength)
            
              return val
            }
            
            Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) {
              if (!noAssert) checkOffset(offset, 1, this.length)
              if (!(this[offset] & 0x80)) return (this[offset])
              return ((0xff - this[offset] + 1) * -1)
            }
            
            Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {
              if (!noAssert) checkOffset(offset, 2, this.length)
              var val = this[offset] | (this[offset + 1] << 8)
              return (val & 0x8000) ? val | 0xFFFF0000 : val
            }
            
            Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {
              if (!noAssert) checkOffset(offset, 2, this.length)
              var val = this[offset + 1] | (this[offset] << 8)
              return (val & 0x8000) ? val | 0xFFFF0000 : val
            }
            
            Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {
              if (!noAssert) checkOffset(offset, 4, this.length)
            
              return (this[offset]) |
                (this[offset + 1] << 8) |
                (this[offset + 2] << 16) |
                (this[offset + 3] << 24)
            }
            
            Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {
              if (!noAssert) checkOffset(offset, 4, this.length)
            
              return (this[offset] << 24) |
                (this[offset + 1] << 16) |
                (this[offset + 2] << 8) |
                (this[offset + 3])
            }
            
            Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {
              if (!noAssert) checkOffset(offset, 4, this.length)
              return ieee754.read(this, offset, true, 23, 4)
            }
            
            Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {
              if (!noAssert) checkOffset(offset, 4, this.length)
              return ieee754.read(this, offset, false, 23, 4)
            }
            
            Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {
              if (!noAssert) checkOffset(offset, 8, this.length)
              return ieee754.read(this, offset, true, 52, 8)
            }
            
            Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {
              if (!noAssert) checkOffset(offset, 8, this.length)
              return ieee754.read(this, offset, false, 52, 8)
            }
            
            function checkInt (buf, value, offset, ext, max, min) {
              if (!Buffer.isBuffer(buf)) throw new TypeError('buffer must be a Buffer instance')
              if (value > max || value < min) throw new RangeError('value is out of bounds')
              if (offset + ext > buf.length) throw new RangeError('index out of range')
            }
            
            Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {
              value = +value
              offset = offset | 0
              byteLength = byteLength | 0
              if (!noAssert) checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0)
            
              var mul = 1
              var i = 0
              this[offset] = value & 0xFF
              while (++i < byteLength && (mul *= 0x100)) {
                this[offset + i] = (value / mul) & 0xFF
              }
            
              return offset + byteLength
            }
            
            Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {
              value = +value
              offset = offset | 0
              byteLength = byteLength | 0
              if (!noAssert) checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0)
            
              var i = byteLength - 1
              var mul = 1
              this[offset + i] = value & 0xFF
              while (--i >= 0 && (mul *= 0x100)) {
                this[offset + i] = (value / mul) & 0xFF
              }
            
              return offset + byteLength
            }
            
            Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {
              value = +value
              offset = offset | 0
              if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)
              if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
              this[offset] = value
              return offset + 1
            }
            
            function objectWriteUInt16 (buf, value, offset, littleEndian) {
              if (value < 0) value = 0xffff + value + 1
              for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; i++) {
                buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>
                  (littleEndian ? i : 1 - i) * 8
              }
            }
            
            Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {
              value = +value
              offset = offset | 0
              if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
              if (Buffer.TYPED_ARRAY_SUPPORT) {
                this[offset] = value
                this[offset + 1] = (value >>> 8)
              } else {
                objectWriteUInt16(this, value, offset, true)
              }
              return offset + 2
            }
            
            Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {
              value = +value
              offset = offset | 0
              if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
              if (Buffer.TYPED_ARRAY_SUPPORT) {
                this[offset] = (value >>> 8)
                this[offset + 1] = value
              } else {
                objectWriteUInt16(this, value, offset, false)
              }
              return offset + 2
            }
            
            function objectWriteUInt32 (buf, value, offset, littleEndian) {
              if (value < 0) value = 0xffffffff + value + 1
              for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; i++) {
                buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff
              }
            }
            
            Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {
              value = +value
              offset = offset | 0
              if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
              if (Buffer.TYPED_ARRAY_SUPPORT) {
                this[offset + 3] = (value >>> 24)
                this[offset + 2] = (value >>> 16)
                this[offset + 1] = (value >>> 8)
                this[offset] = value
              } else {
                objectWriteUInt32(this, value, offset, true)
              }
              return offset + 4
            }
            
            Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {
              value = +value
              offset = offset | 0
              if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
              if (Buffer.TYPED_ARRAY_SUPPORT) {
                this[offset] = (value >>> 24)
                this[offset + 1] = (value >>> 16)
                this[offset + 2] = (value >>> 8)
                this[offset + 3] = value
              } else {
                objectWriteUInt32(this, value, offset, false)
              }
              return offset + 4
            }
            
            Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {
              value = +value
              offset = offset | 0
              if (!noAssert) {
                var limit = Math.pow(2, 8 * byteLength - 1)
            
                checkInt(this, value, offset, byteLength, limit - 1, -limit)
              }
            
              var i = 0
              var mul = 1
              var sub = value < 0 ? 1 : 0
              this[offset] = value & 0xFF
              while (++i < byteLength && (mul *= 0x100)) {
                this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
              }
            
              return offset + byteLength
            }
            
            Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {
              value = +value
              offset = offset | 0
              if (!noAssert) {
                var limit = Math.pow(2, 8 * byteLength - 1)
            
                checkInt(this, value, offset, byteLength, limit - 1, -limit)
              }
            
              var i = byteLength - 1
              var mul = 1
              var sub = value < 0 ? 1 : 0
              this[offset + i] = value & 0xFF
              while (--i >= 0 && (mul *= 0x100)) {
                this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
              }
            
              return offset + byteLength
            }
            
            Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {
              value = +value
              offset = offset | 0
              if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)
              if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
              if (value < 0) value = 0xff + value + 1
              this[offset] = value
              return offset + 1
            }
            
            Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {
              value = +value
              offset = offset | 0
              if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
              if (Buffer.TYPED_ARRAY_SUPPORT) {
                this[offset] = value
                this[offset + 1] = (value >>> 8)
              } else {
                objectWriteUInt16(this, value, offset, true)
              }
              return offset + 2
            }
            
            Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {
              value = +value
              offset = offset | 0
              if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
              if (Buffer.TYPED_ARRAY_SUPPORT) {
                this[offset] = (value >>> 8)
                this[offset + 1] = value
              } else {
                objectWriteUInt16(this, value, offset, false)
              }
              return offset + 2
            }
            
            Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {
              value = +value
              offset = offset | 0
              if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
              if (Buffer.TYPED_ARRAY_SUPPORT) {
                this[offset] = value
                this[offset + 1] = (value >>> 8)
                this[offset + 2] = (value >>> 16)
                this[offset + 3] = (value >>> 24)
              } else {
                objectWriteUInt32(this, value, offset, true)
              }
              return offset + 4
            }
            
            Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {
              value = +value
              offset = offset | 0
              if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
              if (value < 0) value = 0xffffffff + value + 1
              if (Buffer.TYPED_ARRAY_SUPPORT) {
                this[offset] = (value >>> 24)
                this[offset + 1] = (value >>> 16)
                this[offset + 2] = (value >>> 8)
                this[offset + 3] = value
              } else {
                objectWriteUInt32(this, value, offset, false)
              }
              return offset + 4
            }
            
            function checkIEEE754 (buf, value, offset, ext, max, min) {
              if (value > max || value < min) throw new RangeError('value is out of bounds')
              if (offset + ext > buf.length) throw new RangeError('index out of range')
              if (offset < 0) throw new RangeError('index out of range')
            }
            
            function writeFloat (buf, value, offset, littleEndian, noAssert) {
              if (!noAssert) {
                checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)
              }
              ieee754.write(buf, value, offset, littleEndian, 23, 4)
              return offset + 4
            }
            
            Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {
              return writeFloat(this, value, offset, true, noAssert)
            }
            
            Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {
              return writeFloat(this, value, offset, false, noAssert)
            }
            
            function writeDouble (buf, value, offset, littleEndian, noAssert) {
              if (!noAssert) {
                checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)
              }
              ieee754.write(buf, value, offset, littleEndian, 52, 8)
              return offset + 8
            }
            
            Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {
              return writeDouble(this, value, offset, true, noAssert)
            }
            
            Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {
              return writeDouble(this, value, offset, false, noAssert)
            }
            
            // copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
            Buffer.prototype.copy = function copy (target, targetStart, start, end) {
              if (!start) start = 0
              if (!end && end !== 0) end = this.length
              if (targetStart >= target.length) targetStart = target.length
              if (!targetStart) targetStart = 0
              if (end > 0 && end < start) end = start
            
              // Copy 0 bytes; we're done
              if (end === start) return 0
              if (target.length === 0 || this.length === 0) return 0
            
              // Fatal error conditions
              if (targetStart < 0) {
                throw new RangeError('targetStart out of bounds')
              }
              if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')
              if (end < 0) throw new RangeError('sourceEnd out of bounds')
            
              // Are we oob?
              if (end > this.length) end = this.length
              if (target.length - targetStart < end - start) {
                end = target.length - targetStart + start
              }
            
              var len = end - start
            
              if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {
                for (var i = 0; i < len; i++) {
                  target[i + targetStart] = this[i + start]
                }
              } else {
                target._set(this.subarray(start, start + len), targetStart)
              }
            
              return len
            }
            
            // fill(value, start=0, end=buffer.length)
            Buffer.prototype.fill = function fill (value, start, end) {
              if (!value) value = 0
              if (!start) start = 0
              if (!end) end = this.length
            
              if (end < start) throw new RangeError('end < start')
            
              // Fill 0 bytes; we're done
              if (end === start) return
              if (this.length === 0) return
            
              if (start < 0 || start >= this.length) throw new RangeError('start out of bounds')
              if (end < 0 || end > this.length) throw new RangeError('end out of bounds')
            
              var i
              if (typeof value === 'number') {
                for (i = start; i < end; i++) {
                  this[i] = value
                }
              } else {
                var bytes = utf8ToBytes(value.toString())
                var len = bytes.length
                for (i = start; i < end; i++) {
                  this[i] = bytes[i % len]
                }
              }
            
              return this
            }
            
            /**
             * Creates a new `ArrayBuffer` with the *copied* memory of the buffer instance.
             * Added in Node 0.12. Only available in browsers that support ArrayBuffer.
             */
            Buffer.prototype.toArrayBuffer = function toArrayBuffer () {
              if (typeof Uint8Array !== 'undefined') {
                if (Buffer.TYPED_ARRAY_SUPPORT) {
                  return (new Buffer(this)).buffer
                } else {
                  var buf = new Uint8Array(this.length)
                  for (var i = 0, len = buf.length; i < len; i += 1) {
                    buf[i] = this[i]
                  }
                  return buf.buffer
                }
              } else {
                throw new TypeError('Buffer.toArrayBuffer not supported in this browser')
              }
            }
            
            // HELPER FUNCTIONS
            // ================
            
            var BP = Buffer.prototype
            
            /**
             * Augment a Uint8Array *instance* (not the Uint8Array class!) with Buffer methods
             */
            Buffer._augment = function _augment (arr) {
              arr.constructor = Buffer
              arr._isBuffer = true
            
              // save reference to original Uint8Array set method before overwriting
              arr._set = arr.set
            
              // deprecated, will be removed in node 0.13+
              arr.get = BP.get
              arr.set = BP.set
            
              arr.write = BP.write
              arr.toString = BP.toString
              arr.toLocaleString = BP.toString
              arr.toJSON = BP.toJSON
              arr.equals = BP.equals
              arr.compare = BP.compare
              arr.indexOf = BP.indexOf
              arr.copy = BP.copy
              arr.slice = BP.slice
              arr.readUIntLE = BP.readUIntLE
              arr.readUIntBE = BP.readUIntBE
              arr.readUInt8 = BP.readUInt8
              arr.readUInt16LE = BP.readUInt16LE
              arr.readUInt16BE = BP.readUInt16BE
              arr.readUInt32LE = BP.readUInt32LE
              arr.readUInt32BE = BP.readUInt32BE
              arr.readIntLE = BP.readIntLE
              arr.readIntBE = BP.readIntBE
              arr.readInt8 = BP.readInt8
              arr.readInt16LE = BP.readInt16LE
              arr.readInt16BE = BP.readInt16BE
              arr.readInt32LE = BP.readInt32LE
              arr.readInt32BE = BP.readInt32BE
              arr.readFloatLE = BP.readFloatLE
              arr.readFloatBE = BP.readFloatBE
              arr.readDoubleLE = BP.readDoubleLE
              arr.readDoubleBE = BP.readDoubleBE
              arr.writeUInt8 = BP.writeUInt8
              arr.writeUIntLE = BP.writeUIntLE
              arr.writeUIntBE = BP.writeUIntBE
              arr.writeUInt16LE = BP.writeUInt16LE
              arr.writeUInt16BE = BP.writeUInt16BE
              arr.writeUInt32LE = BP.writeUInt32LE
              arr.writeUInt32BE = BP.writeUInt32BE
              arr.writeIntLE = BP.writeIntLE
              arr.writeIntBE = BP.writeIntBE
              arr.writeInt8 = BP.writeInt8
              arr.writeInt16LE = BP.writeInt16LE
              arr.writeInt16BE = BP.writeInt16BE
              arr.writeInt32LE = BP.writeInt32LE
              arr.writeInt32BE = BP.writeInt32BE
              arr.writeFloatLE = BP.writeFloatLE
              arr.writeFloatBE = BP.writeFloatBE
              arr.writeDoubleLE = BP.writeDoubleLE
              arr.writeDoubleBE = BP.writeDoubleBE
              arr.fill = BP.fill
              arr.inspect = BP.inspect
              arr.toArrayBuffer = BP.toArrayBuffer
            
              return arr
            }
            
            var INVALID_BASE64_RE = /[^+\/0-9A-z\-]/g
            
            function base64clean (str) {
              // Node strips out invalid characters like \n and \t from the string, base64-js does not
              str = stringtrim(str).replace(INVALID_BASE64_RE, '')
              // Node converts strings with length < 2 to ''
              if (str.length < 2) return ''
              // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not
              while (str.length % 4 !== 0) {
                str = str + '='
              }
              return str
            }
            
            function stringtrim (str) {
              if (str.trim) return str.trim()
              return str.replace(/^\s+|\s+$/g, '')
            }
            
            function toHex (n) {
              if (n < 16) return '0' + n.toString(16)
              return n.toString(16)
            }
            
            function utf8ToBytes (string, units) {
              units = units || Infinity
              var codePoint
              var length = string.length
              var leadSurrogate = null
              var bytes = []
              var i = 0
            
              for (; i < length; i++) {
                codePoint = string.charCodeAt(i)
            
                // is surrogate component
                if (codePoint > 0xD7FF && codePoint < 0xE000) {
                  // last char was a lead
                  if (leadSurrogate) {
                    // 2 leads in a row
                    if (codePoint < 0xDC00) {
                      if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
                      leadSurrogate = codePoint
                      continue
                    } else {
                      // valid surrogate pair
                      codePoint = leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00 | 0x10000
                      leadSurrogate = null
                    }
                  } else {
                    // no lead yet
            
                    if (codePoint > 0xDBFF) {
                      // unexpected trail
                      if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
                      continue
                    } else if (i + 1 === length) {
                      // unpaired lead
                      if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
                      continue
                    } else {
                      // valid lead
                      leadSurrogate = codePoint
                      continue
                    }
                  }
                } else if (leadSurrogate) {
                  // valid bmp char, but last char was a lead
                  if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
                  leadSurrogate = null
                }
            
                // encode utf8
                if (codePoint < 0x80) {
                  if ((units -= 1) < 0) break
                  bytes.push(codePoint)
                } else if (codePoint < 0x800) {
                  if ((units -= 2) < 0) break
                  bytes.push(
                    codePoint >> 0x6 | 0xC0,
                    codePoint & 0x3F | 0x80
                  )
                } else if (codePoint < 0x10000) {
                  if ((units -= 3) < 0) break
                  bytes.push(
                    codePoint >> 0xC | 0xE0,
                    codePoint >> 0x6 & 0x3F | 0x80,
                    codePoint & 0x3F | 0x80
                  )
                } else if (codePoint < 0x200000) {
                  if ((units -= 4) < 0) break
                  bytes.push(
                    codePoint >> 0x12 | 0xF0,
                    codePoint >> 0xC & 0x3F | 0x80,
                    codePoint >> 0x6 & 0x3F | 0x80,
                    codePoint & 0x3F | 0x80
                  )
                } else {
                  throw new Error('Invalid code point')
                }
              }
            
              return bytes
            }
            
            function asciiToBytes (str) {
              var byteArray = []
              for (var i = 0; i < str.length; i++) {
                // Node's code seems to be doing this and not & 0x7F..
                byteArray.push(str.charCodeAt(i) & 0xFF)
              }
              return byteArray
            }
            
            function utf16leToBytes (str, units) {
              var c, hi, lo
              var byteArray = []
              for (var i = 0; i < str.length; i++) {
                if ((units -= 2) < 0) break
            
                c = str.charCodeAt(i)
                hi = c >> 8
                lo = c % 256
                byteArray.push(lo)
                byteArray.push(hi)
              }
            
              return byteArray
            }
            
            function base64ToBytes (str) {
              return base64.toByteArray(base64clean(str))
            }
            
            function blitBuffer (src, dst, offset, length) {
              for (var i = 0; i < length; i++) {
                if ((i + offset >= dst.length) || (i >= src.length)) break
                dst[i + offset] = src[i]
              }
              return i
            }
            
            function decodeUtf8Char (str) {
              try {
                return decodeURIComponent(str)
              } catch (err) {
                return String.fromCharCode(0xFFFD) // UTF 8 invalid char
              }
            }
            
        • ieee754
          • index.js
            exports.read = function (buffer, offset, isLE, mLen, nBytes) {
              var e, m,
                  eLen = nBytes * 8 - mLen - 1,
                  eMax = (1 << eLen) - 1,
                  eBias = eMax >> 1,
                  nBits = -7,
                  i = isLE ? (nBytes - 1) : 0,
                  d = isLE ? -1 : 1,
                  s = buffer[offset + i]
            
              i += d
            
              e = s & ((1 << (-nBits)) - 1)
              s >>= (-nBits)
              nBits += eLen
              for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}
            
              m = e & ((1 << (-nBits)) - 1)
              e >>= (-nBits)
              nBits += mLen
              for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}
            
              if (e === 0) {
                e = 1 - eBias
              } else if (e === eMax) {
                return m ? NaN : ((s ? -1 : 1) * Infinity)
              } else {
                m = m + Math.pow(2, mLen)
                e = e - eBias
              }
              return (s ? -1 : 1) * m * Math.pow(2, e - mLen)
            }
            
            exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
              var e, m, c,
                  eLen = nBytes * 8 - mLen - 1,
                  eMax = (1 << eLen) - 1,
                  eBias = eMax >> 1,
                  rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0),
                  i = isLE ? 0 : (nBytes - 1),
                  d = isLE ? 1 : -1,
                  s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0
            
              value = Math.abs(value)
            
              if (isNaN(value) || value === Infinity) {
                m = isNaN(value) ? 1 : 0
                e = eMax
              } else {
                e = Math.floor(Math.log(value) / Math.LN2)
                if (value * (c = Math.pow(2, -e)) < 1) {
                  e--
                  c *= 2
                }
                if (e + eBias >= 1) {
                  value += rt / c
                } else {
                  value += rt * Math.pow(2, 1 - eBias)
                }
                if (value * c >= 2) {
                  e++
                  c /= 2
                }
            
                if (e + eBias >= eMax) {
                  m = 0
                  e = eMax
                } else if (e + eBias >= 1) {
                  m = (value * c - 1) * Math.pow(2, mLen)
                  e = e + eBias
                } else {
                  m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)
                  e = 0
                }
              }
            
              for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}
            
              e = (e << mLen) | m
              eLen += mLen
              for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}
            
              buffer[offset + i - d] |= s * 128
            }
            
        • is-array
          • index.js
            /**
             * isArray
             */
            
            var isArray = Array.isArray;
            
            /**
             * toString
             */
            
            var str = Object.prototype.toString;
            
            /**
             * Whether or not the given `val`
             * is an array.
             *
             * example:
             *
             *        isArray([]);
             *        // > true
             *        isArray(arguments);
             *        // > false
             *        isArray('');
             *        // > false
             *
             * @param {mixed} val
             * @return {bool}
             */
            
            module.exports = isArray || function (val) {
              return !! val && '[object Array]' == str.call(val);
            };
            
      • HostedProcess.ts
        module noapi {
        
          export class HostedProcess {
        
            process: Process;
            mainModule: Module;
            global: Global;
            coreModules: { fs: FS; path: Path, os: OS; };
        
            private _scriptPath: string;
            private _drive: persistence.Drive;
            private _console: any;
        
            exitCode: number = null;
            finished = false;
        
            private _context: isolation.Context;
            private _waitFor = 0;
        
            constructor(options: {
              window: Window;
              drive: persistence.Drive;
              scriptPath: string;
        
              argv?: string[];
              cwd?: string;
              env?: any;
              console?: any;
            }) {
        
              this.global = <any>{};
        
              this.coreModules = {
                fs: <FS>null,
                os: <OS>null,
                path: <Path>null
              };
        
              var noopt = {
                argv: options.argv || ['/node', options.scriptPath],
                cwd: options.cwd,
                env: options.env || {}
              };
        
              this._scriptPath = options.scriptPath;
              this._drive = options.drive;
        
              if (!noopt.cwd)
                noopt.cwd = dirname(options.scriptPath);
        
              this.global.process = this.process = createProcess(this.coreModules, noopt);
              this.global.module = this.mainModule = createModule('repl' /*id*/, null /*filename*/, null /*parent*/, require);
        
              var noapicontext = this;
              function require(moduleName: string) { return noapicontext.requireModule(moduleName, dirname(options.scriptPath), null); }
        
              this.global.require = <any>(moduleName => require(moduleName));
              this.global.require.resolve = id => this.resolve(id, noopt.cwd);
              this.global.__filename = options.scriptPath;
              this.global.__dirname = dirname(options.scriptPath);
              if (options.console)
                this.global.console = options.console;
              this._console = options.console;
        
              this.coreModules.fs = createFS(options.drive, this.coreModules);
              this.coreModules.os = createOS(this.global);
              this.coreModules.path = createPath(this.global);
        
              this._context = new isolation.Context(window);
        
              this.process.exit = code => {
                this.finished = true;
                this.exitCode = code || 0;
                this.dispose();
              };
        
              this.process.abort = () => {
                this.finished = true;
                this.dispose();
              };
        
              var timeouts: Function[] = [];
              (<any>this.global).setTimeout = (fun: Function, time: number, ...args: any[]) => {
                if (this.finished) return 0;
                var wait = this.keepAlive();
                var complete = () => {
                  delete timeouts[result];
                  wait();
                  fun();
                };
        
                var passArgs = [];
                passArgs.push(complete);
                passArgs.push(time);
                for (var i = 0; i < args.length; i++) {
                  passArgs.push(args[i]);
                }
                var result = setTimeout.apply(this.global, passArgs);
        
                timeouts[result] = wait;
                return result;
              };
        
              (<any>this.global).clearTimeout = (tout: number) => {
                var wait = timeouts[tout];
                if (wait) wait();
                delete timeouts[tout];
                clearTimeout(tout);
              };
        
              var intervals: Function[] = [];
              (<any>this.global).setInterval = (fun: Function, time: number, ...args: any[]) => {
                if (this.finished) return 0;
                var wait = this.keepAlive();
        
                var passArgs = [];
                passArgs.push(fun);
                passArgs.push(time);
                for (var i = 0; i < args.length; i++) {
                  passArgs.push(args[i]);
                }
                var result = setInterval.apply(this.global, passArgs);
        
                intervals[result] = wait;
                return result;
              };
        
              (<any>this.global).clearInterval = (intv: number) => {
                var wait = intervals[intv];
                if (wait) wait();
                delete intervals[intv];
                clearTimeout(intv);
              };
        
              this.process.nextTick = fun => {
                var wait = this.keepAlive();
                setTimeout(() => {
                  wait();
                  fun();
                }, 1);
              };
        
            }
        
            eval(code: string) {
              var wait = this.keepAlive();
              try {
                return this._context.run(code, this._scriptPath, this.global);
              }
              finally {
                wait();
              }
            }
        
            resolve(id: string, modulePath: string) {
              if (id.charAt(0) === '.') {
                return this.coreModules.path.join(modulePath, id);
              }
              else if (id.charAt(0) === '/') {
                return id;
              }
              else {
                var tryPath = this.coreModules.path.normalize(modulePath);
                var probePatterns = [
                  '../' + i, '../' + id + '.js', '../' + id + '/index.js',
                  '../node_modules/' + id + '/index.js'];
        
                while (true) {
                  tryPath = this.coreModules.path.basename(tryPath);
                  if (!tryPath || tryPath === '/') return null;
                  for (var i = 0; i < probePatterns.length; i++) {
                    var p = this.coreModules.path.join(tryPath, probePatterns[i]);
                    if (this._drive.read(p)) return p;
                  }
                }
              }
            }
        
            requireModule(moduleName: string, parentModulePath: string, parentModule: Module) {
        
              if (this.coreModules.hasOwnProperty(moduleName))
                return this.coreModules[moduleName];
        
              var resolvedPath = this.resolve(moduleName, parentModulePath);
              if (resolvedPath) {
                var content = this._drive.read(resolvedPath);
                if (content) {
                  var loadedModule = createModule(moduleName, resolvedPath, parentModule, moduleName => this.requireModule(moduleName, resolvedPath, loadedModule));
                  var moduleScope = (() => {
        
                    var ModuleContext = () => { };
                    ModuleContext.prototype = this.global;
        
                    var moduleScope = new ModuleContext();
        
                    moduleScope.global = moduleScope;
                    moduleScope.require = function(moduleName) { return loadedModule.require(moduleName); };
                    moduleScope.exports = loadedModule.exports;
        
                    moduleScope.global.__filename = resolvedPath;
                    moduleScope.global.__dirname = dirname(resolvedPath);
                    if (this._console)
                      this.global.console = this._console;
        
        
                    moduleScope.module = loadedModule;
        
                    return moduleScope;
                  })();
        
                  this._context.run(content, resolvedPath, moduleScope);
        
                  return loadedModule.exports;
                }
              }
            }
        
            dispose() {
              this._context.dispose();
            }
        
            keepAlive() {
              this._waitFor++;
              return () => {
                this._waitFor--;
                if (this._waitFor <= 0) {
                  setTimeout(() => {
                    if (this._waitFor <= 0)
                      this.dispose();
                  }, 1000);
                }
              };
            }
          }
        }
      • apply.ts
        module noapi {
        
          export function apply(
            global: any,
            drive: persistence.Drive,
            options?: {
              argv?: string[];
              cwd?: string;
              env?: any;
            }) {
        
            var apiGlobal = {
              process: <Process>null,
              module: <Module>null
            };
        
            if (!options) options = {};
        
            var cleanOptions = {
              argv: options.argv || ['/node'],
              cwd: options.cwd || '/',
              env: options.env || {}
            };
        
            var coreModules = {
              fs: <FS>null,
              os: <OS>null,
              path: <Path>null
            };
        
            apiGlobal.process = createProcess(coreModules, cleanOptions);
            apiGlobal.module = createModule('repl' /*id*/, null /*filename*/, null /*parent*/, module_require);
        
            coreModules.fs = createFS(drive, coreModules);
            coreModules.os = createOS(apiGlobal);
            coreModules.path = createPath(apiGlobal);
        
            global.process = apiGlobal.process;
            global.module = apiGlobal.module;
            global.require = global_require;
        
            function global_require(moduleName: string) {
              return module_require(moduleName);
            }
        
            function module_require(moduleName: string): any {
              if (coreModules.hasOwnProperty(moduleName)) return coreModules[moduleName];
        
              throw new Error('Cannot find module \'' + moduleName + '\'');
            }
          }
        
          export function nextTick(callback: Function): void {
        
            function fire() {
              if (fired) return;
              fired = true;
              callback();
            }
        
            var fired = false;
            setTimeout(fire, 0);
            if (typeof requestAnimationFrame !== 'undefined') {
              requestAnimationFrame(fire);
            }
            else if (typeof msRequestAnimationFrame !== 'undefined') {
              msRequestAnimationFrame(fire);
            }
        
          }
        
          export function wrapAsync(fn: Function): () => void {
            return function() {
              var args = [];
              for (var i = 0; i < arguments.length - 1; i++) {
                args.push(arguments[i]);
              }
              var callback = arguments[arguments.length - 1];
        
              nextTick(function() {
                try {
                  var result = fn.apply(null, args);
                }
                catch (error) {
                  callback(error);
                }
                callback(null, result);
              });
            }
          }
        
          export function wrapAsyncNoError(fn: Function): () => void {
            return function() {
              var args = [];
              for (var i = 0; i < arguments.length - 1; i++) {
                args.push(arguments[i]);
              }
              var callback = arguments[arguments.length - 1];
        
              nextTick(function() {
                try {
                  var result = fn.apply(null, args);
                }
                catch (error) {
                  callback(error);
                }
                callback(result);
              });
            }
          }
        
        }
      • def.d.ts
        declare module noapi {
        
          export interface RequireFunction {
            (id: string): any;
            resolve(id: string): string;
            cache: any;
            extensions: any;
            main: any;
          }
        
          export interface Global {
            module: Module;
            process: Process;
            require: RequireFunction;
            exports?: any;
            __filename?: string;
            __dirname?: string;
            console?: { log: Function; };
          }
        
          export interface ErrnoError extends Error {
          }
        
          export interface Buffer {
            [index: number]: number;
            write(string: string, offset?: number, length?: number, encoding?: string): number;
            toString(encoding?: string, start?: number, end?: number): string;
            toJSON(): any;
            length: number;
            copy(targetBuffer: Buffer, targetStart?: number, sourceStart?: number, sourceEnd?: number): number;
            slice(start?: number, end?: number): Buffer;
            readUInt8(offset: number, noAsset?: boolean): number;
            readUInt16LE(offset: number, noAssert?: boolean): number;
            readUInt16BE(offset: number, noAssert?: boolean): number;
            readUInt32LE(offset: number, noAssert?: boolean): number;
            readUInt32BE(offset: number, noAssert?: boolean): number;
            readInt8(offset: number, noAssert?: boolean): number;
            readInt16LE(offset: number, noAssert?: boolean): number;
            readInt16BE(offset: number, noAssert?: boolean): number;
            readInt32LE(offset: number, noAssert?: boolean): number;
            readInt32BE(offset: number, noAssert?: boolean): number;
            readFloatLE(offset: number, noAssert?: boolean): number;
            readFloatBE(offset: number, noAssert?: boolean): number;
            readDoubleLE(offset: number, noAssert?: boolean): number;
            readDoubleBE(offset: number, noAssert?: boolean): number;
            writeUInt8(value: number, offset: number, noAssert?: boolean): void;
            writeUInt16LE(value: number, offset: number, noAssert?: boolean): void;
            writeUInt16BE(value: number, offset: number, noAssert?: boolean): void;
            writeUInt32LE(value: number, offset: number, noAssert?: boolean): void;
            writeUInt32BE(value: number, offset: number, noAssert?: boolean): void;
            writeInt8(value: number, offset: number, noAssert?: boolean): void;
            writeInt16LE(value: number, offset: number, noAssert?: boolean): void;
            writeInt16BE(value: number, offset: number, noAssert?: boolean): void;
            writeInt32LE(value: number, offset: number, noAssert?: boolean): void;
            writeInt32BE(value: number, offset: number, noAssert?: boolean): void;
            writeFloatLE(value: number, offset: number, noAssert?: boolean): void;
            writeFloatBE(value: number, offset: number, noAssert?: boolean): void;
            writeDoubleLE(value: number, offset: number, noAssert?: boolean): void;
            writeDoubleBE(value: number, offset: number, noAssert?: boolean): void;
            fill(value: any, offset?: number, end?: number): void;
          }
        
        }
      • events.d.ts
        declare module noapi {
        
          export interface EventEmitter {
            //static listenerCount(emitter: EventEmitter, event: string): number;
        
            addListener(event: string, listener: Function): EventEmitter;
        
            on(event: string, listener: Function): EventEmitter;
        
            once(event: string, listener: Function): EventEmitter;
        
            removeListener(event: string, listener: Function): EventEmitter;
        
            removeAllListeners(event?: string): EventEmitter;
        
            setMaxListeners(n: number): void;
        
            listeners(event: string): Function[];
        
            emit(event: string, ...args: any[]): boolean;
        
          }
        
        }
      • events.ts
        module noapi {
        
          export function createEventEmitter(): EventEmitter {
        
            var _listeners: { [eventKey: string]: Function[]; } = {};
        
            var result = {
              addListener, removeListener, removeAllListeners,
              on, once,
              setMaxListeners,
              listeners,
              emit
            };
            return result;
        
            function addListener(event: string, listener: Function): EventEmitter {
              var key = '*' + event;
              var list = _listeners[key] || (this._listeners[key] = []);
              list.push(listener);
              return result;
            }
        
            function removeListener(event: string, listener: Function): EventEmitter {
              var key = '*' + event;
              var list = _listeners[key];
              if (list) {
                for (var i = 0; i < list.length; i++) {
                  if (list[i] === listener) {
                    list.splice(i, 1);
                    break;
                  }
                }
              }
              return result;
            }
        
            function removeAllListeners(event?: string): EventEmitter {
              var key = '*' + event;
              delete _listeners[key];
              return result;
            }
        
            function setMaxListeners(n: number): void {
              // too complicated for now, ignore
            }
        
            function listeners(event: string): Function[] {
              var key = '*' + event;
              var list = _listeners[key];
              if (list)
                return list.slice(0);
              else
                return [];
            }
        
            function emit(event: string, ...args: any[]): boolean {
              var key = '*' + event;
              var list = _listeners[key];
              if (!list) return false;
              for (var i = 0; i < list.length; i++) {
                var f = list[i];
                f.apply(null, args);
              }
              return true;
            }
        
            function on(event: string, listener: Function): EventEmitter {
              return addListener(event, listener);
            }
        
            function once(event: string, listener: Function): EventEmitter {
              return on(event, listener);
            }
        
          }
        
        }
      • fs.d.ts
        declare module noapi {
        
          export interface FS {
        
            rename(oldPath: string, newPath: string, callback?: (err?: ErrnoError) => void): void;
            renameSync(oldPath: string, newPath: string): void;
        
        
            truncate(path: string, callback?: (err?: ErrnoError) => void): void;
            truncate(path: string, len: number, callback?: (err?: ErrnoError) => void): void;
            truncateSync(path: string, len?: number): void;
        
            ftruncate(fd: number, callback?: (err?: ErrnoError) => void): void;
            ftruncate(fd: number, len: number, callback?: (err?: ErrnoError) => void): void;
            ftruncateSync(fd: number, len?: number): void;
        
        
            chown(path: string, uid: number, gid: number, callback?: (err?: ErrnoError) => void): void;
            chownSync(path: string, uid: number, gid: number): void;
        
            fchown(fd: number, uid: number, gid: number, callback?: (err?: ErrnoError) => void): void;
            fchownSync(fd: number, uid: number, gid: number): void;
        
            lchown(path: string, uid: number, gid: number, callback?: (err?: ErrnoError) => void): void;
            lchownSync(path: string, uid: number, gid: number): void;
        
        
            chmod(path: string, mode: number, callback?: (err?: ErrnoError) => void): void;
            chmod(path: string, mode: string, callback?: (err?: ErrnoError) => void): void;
            chmodSync(path: string, mode: number): void;
            chmodSync(path: string, mode: string): void;
        
            fchmod(fd: number, mode: number, callback?: (err?: ErrnoError) => void): void;
            fchmod(fd: number, mode: string, callback?: (err?: ErrnoError) => void): void;
            fchmodSync(fd: number, mode: number): void;
            fchmodSync(fd: number, mode: string): void;
        
            lchmod(path: string, mode: number, callback?: (err?: ErrnoError) => void): void;
            lchmod(path: string, mode: string, callback?: (err?: ErrnoError) => void): void;
            lchmodSync(path: string, mode: number): void;
            lchmodSync(path: string, mode: string): void;
        
        
            stat(path: string, callback?: (err: ErrnoError, stats: Stats) => any): void;
            lstat(path: string, callback?: (err: ErrnoError, stats: Stats) => any): void;
            fstat(fd: number, callback?: (err: ErrnoError, stats: Stats) => any): void;
            statSync(path: string): Stats;
            lstatSync(path: string): Stats;
            fstatSync(fd: number): Stats;
        
        
            link(srcpath: string, dstpath: string, callback?: (err?: ErrnoError) => void): void;
            linkSync(srcpath: string, dstpath: string): void;
        
            symlink(srcpath: string, dstpath: string, type?: string, callback?: (err?: ErrnoError) => void): void;
            symlinkSync(srcpath: string, dstpath: string, type?: string): void;
        
        
            readlink(path: string, callback?: (err: ErrnoError, linkString: string) => any): void;
            readlinkSync(path: string): string;
        
        
            realpath(path: string, callback?: (err: ErrnoError, resolvedPath: string) => any): void;
            realpath(path: string, cache: { [path: string]: string }, callback: (err: ErrnoError, resolvedPath: string) => any): void;
            realpathSync(path: string, cache?: { [path: string]: string }): string;
        
        
            unlink(path: string, callback?: (err?: ErrnoError) => void): void;
            unlinkSync(path: string): void;
        
        
            rmdir(path: string, callback?: (err?: ErrnoError) => void): void;
            rmdirSync(path: string): void;
        
        
            mkdir(path: string, callback?: (err?: ErrnoError) => void): void;
            mkdir(path: string, mode: number, callback?: (err?: ErrnoError) => void): void;
            mkdir(path: string, mode: string, callback?: (err?: ErrnoError) => void): void;
            mkdirSync(path: string, mode?: number): void;
            mkdirSync(path: string, mode?: string): void;
        
        
            readdir(path: string, callback?: (err: ErrnoError, files: string[]) => void): void;
            readdirSync(path: string): string[];
        
        
            close(fd: number, callback?: (err?: ErrnoError) => void): void;
            closeSync(fd: number): void;
        
        
            open(path: string, flags: string, callback?: (err: ErrnoError, fd: number) => any): void;
            open(path: string, flags: string, mode: number, callback?: (err: ErrnoError, fd: number) => any): void;
            open(path: string, flags: string, mode: string, callback?: (err: ErrnoError, fd: number) => any): void;
            openSync(path: string, flags: string, mode?: number): number;
            openSync(path: string, flags: string, mode?: string): number;
        
        
            utimes(path: string, atime: number, mtime: number, callback?: (err?: ErrnoError) => void): void;
            utimes(path: string, atime: Date, mtime: Date, callback?: (err?: ErrnoError) => void): void;
            utimesSync(path: string, atime: number, mtime: number): void;
            utimesSync(path: string, atime: Date, mtime: Date): void;
        
            futimes(fd: number, atime: number, mtime: number, callback?: (err?: ErrnoError) => void): void;
            futimes(fd: number, atime: Date, mtime: Date, callback?: (err?: ErrnoError) => void): void;
            futimesSync(fd: number, atime: number, mtime: number): void;
            futimesSync(fd: number, atime: Date, mtime: Date): void;
        
        
            fsync(fd: number, callback?: (err?: ErrnoError) => void): void;
            fsyncSync(fd: number): void;
        
        
            read(fd: number, buffer: Buffer, offset: number, length: number, position: number, callback?: (err: ErrnoError, bytesRead: number, buffer: Buffer) => void): void;
            readSync(fd: number, buffer: Buffer, offset: number, length: number, position: number): number;
        
            readFile(filename: string, encoding: string, callback: (err: ErrnoError, data: string) => void): void;
            readFile(filename: string, options: { encoding: string; flag?: string; }, callback: (err: ErrnoError, data: string) => void): void;
            readFile(filename: string, options: { flag?: string; }, callback: (err: ErrnoError, data: Buffer) => void): void;
            readFile(filename: string, callback: (err: ErrnoError, data: Buffer) => void): void;
            readFileSync(filename: string, encoding: string): string;
            readFileSync(filename: string, options: { encoding: string; flag?: string; }): string;
            readFileSync(filename: string, options?: { flag?: string; }): Buffer;
        
            write(fd: number, buffer: Buffer, offset: number, length: number, position: number, callback?: (err: ErrnoError, written: number, buffer: Buffer) => void): void;
            writeSync(fd: number, buffer: Buffer, offset: number, length: number, position: number): number;
        
            writeFile(filename: string, data: any, callback?: (err: ErrnoError) => void): void;
            writeFile(filename: string, data: any, options: { encoding?: string; mode?: number; flag?: string; }, callback?: (err: ErrnoError) => void): void;
            writeFile(filename: string, data: any, options: { encoding?: string; mode?: string; flag?: string; }, callback?: (err: ErrnoError) => void): void;
            writeFileSync(filename: string, data: any, options?: { encoding?: string; mode?: number; flag?: string; }): void;
            writeFileSync(filename: string, data: any, options?: { encoding?: string; mode?: string; flag?: string; }): void;
        
        
            appendFile(filename: string, data: any, options: { encoding?: string; mode?: number; flag?: string; }, callback?: (err: ErrnoError) => void): void;
            appendFile(filename: string, data: any, options: { encoding?: string; mode?: string; flag?: string; }, callback?: (err: ErrnoError) => void): void;
            appendFile(filename: string, data: any, callback?: (err: ErrnoError) => void): void;
            appendFileSync(filename: string, data: any, options?: { encoding?: string; mode?: number; flag?: string; }): void;
            appendFileSync(filename: string, data: any, options?: { encoding?: string; mode?: string; flag?: string; }): void;
        
        
            watchFile(filename: string, listener: (curr: Stats, prev: Stats) => void): void;
            watchFile(filename: string, options: { persistent?: boolean; interval?: number; }, listener: (curr: Stats, prev: Stats) => void): void;
        
            unwatchFile(filename: string, listener?: (curr: Stats, prev: Stats) => void): void;
        
            watch(filename: string, listener?: (event: string, filename: string) => any): Watcher;
            watch(filename: string, options: { persistent?: boolean; }, listener?: (event: string, filename: string) => any): Watcher;
        
        
            exists(path: string, callback?: (exists: boolean) => void): void;
            existsSync(path: string): boolean;
        
        
            createReadStream(path: string, options?: { flags?: string; encoding?: string; fd?: string; mode?: number; bufferSize?: number; }): ReadStream;
            createReadStream(path: string, options?: { flags?: string; encoding?: string; fd?: string; mode?: string; bufferSize?: number; }): ReadStream;
        
            createWriteStream(path: string, options?: { flags?: string; encoding?: string; string?: string; }): WriteStream;
        
          }
        
          export interface Stats {
            isFile(): boolean;
            isDirectory(): boolean;
            isBlockDevice(): boolean;
            isCharacterDevice(): boolean;
            isSymbolicLink(): boolean;
            isFIFO(): boolean;
            isSocket(): boolean;
            dev: number;
            ino: number;
            mode: number;
            nlink: number;
            uid: number;
            gid: number;
            rdev: number;
            size: number;
            blksize: number;
            blocks: number;
            atime: Date;
            mtime: Date;
            ctime: Date;
          }
        
          export interface Watcher extends EventEmitter {
            close(): void;
          }
        
          export interface ReadStream extends Readable {
            close(): void;
          }
        
          export interface WriteStream extends Writable {
            close(): void;
          }
        
        }
      • fs.ts
        module noapi {
        
          export function createFS(drive: persistence.Drive, modules: { path: Path; }): FS {
        
            var fs: FS = {
        
              renameSync: renameSync,
              rename: wrapAsync(renameSync),
        
              statSync: statSync,
              lstatSync: statSync,
              stat: wrapAsync(statSync),
              lstat: wrapAsync(statSync),
              fstat: null, fstatSync: null, // TODO: implement fstat using fstab
        
        
              existsSync: existsSync,
              exists: wrapAsyncNoError(existsSync),
        
              openSync: openSync,
              open: wrapAsync(openSync),
              close: null, closeSync: null,
              fsync: null, fsyncSync: null,
        
        
        
              readFileSync: readFileSync,
              readFile: wrapAsync(readFileSync),
              createReadStream: null,
        
              writeFileSync: writeFileSync,
              writeFile: wrapAsync(writeFileSync),
              appendFile: null, appendFileSync: null,
              createWriteStream: null,
        
        
              readSync: readSync,
              read: wrapAsync(readSync),
        
              writeSync: writeSync,
              write: wrapAsync(writeSync),
        
        
        
              truncate: null, truncateSync: null,
              ftruncate: null, ftruncateSync: null,
        
              chown: null, chownSync: null,
              fchown: null, fchownSync: null,
              lchown: null, lchownSync: null,
        
              chmod: null, chmodSync: null,
              fchmod: null, fchmodSync: null,
              lchmod: null, lchmodSync: null,
        
              link: null, linkSync: null,
              readlink: null, readlinkSync: null,
        
              symlink: null, symlinkSync: null,
              unlink: null, unlinkSync: null,
        
              realpath: null, realpathSync: null,
        
              mkdir: wrapAsync(mkdirSync), mkdirSync: mkdirSync,
              rmdir: null, rmdirSync: null,
        
              readdir: null, readdirSync: null,
        
              utimes: null, utimesSync: null,
              futimes: null, futimesSync: null,
        
        
              watch: null, watchFile: null, unwatchFile: null
            };
        
            return fs;
        
            function existsSync(file: string): boolean {
              var content = drive.read(file);
              if (content || (content !== null && typeof content === 'undefined'))
                return true;
        
              var files = drive.files();
              var normPath = modules.path.normalize(file);
              if (normPath.slice(-1) !== '/') normPath += '/';
              var leadMatch = getStartMatcher(file);
              for (var i = 0; i < files.length; i++) {
                if (leadMatch(files[i])) return;
              }
        
              return false;
            }
        
            function mkdirSync(path: string, mode?: any): void {
              var normPath = modules.path.normalize(path);
              if (normPath.slice(-1) !== '/') normPath += '/';
        
              if (existsSync(path)) throw new Error('Directory \'' + path + '\'');
        
              drive.write(normPath, '');
            }
        
            function renameSync(oldPath: string, newPath: string): void {
        
              var oldContent = drive.read(oldPath);
              if (oldContent !== null) {
                // TODO: check if directory is in the way
                // if (nofs
                drive.write(newPath, oldContent);
                drive.write(oldPath, null);
                return;
              }
        
              if (drive.read(newPath) !== null) {
                // node actually reports oldPath here, but let's be reasonable
                throw new Error('ENOTDIR, not a directory \'' + newPath + '\'');
              }
        
              var norm_oldPath = modules.path.resolve(oldPath);
              if (norm_oldPath === '/')
                throw new Error('EBUSY, resource busy or locked \'/\'');
              else
                norm_oldPath += '/';
        
              var norm_newPath = modules.path.resolve(newPath);
              if (norm_newPath === '/')
                throw new Error('EBUSY, resource busy or locked \'/\'');
              else
                norm_newPath += '/';
        
        
              var files = drive.files();
        
        
              var startAsOld = getStartMatcher(norm_oldPath);
        
              for (var i = 0; i < files.length; i++) {
                var fi = files[i];
                if (startAsOld(fi)) {
                  var oldContent = drive.read(fi);
                  var restPath = fi.slice(norm_newPath.length);
                  var newFiPath = norm_newPath + restPath;
                  drive.write(newFiPath, oldContent);
                  drive.write(newFiPath, null);
                }
              }
        
            }
        
        
        
            function statSync(path: string): Stats {
              // TODO: implement
              throw new Error('Not implemented');
            }
            /*
              stat(path: string, callback?: (err: no_ErrnoError, stats: nofs_Stats) => any): void;
              lstat(path: string, callback?: (err: no_ErrnoError, stats: nofs_Stats) => any): void;
              fstat(fd: number, callback?: (err: no_ErrnoError, stats: nofs_Stats) => any): void;
              statSync(path: string): nofs_Stats;
              lstatSync(path: string): nofs_Stats;
              fstatSync(fd: number): nofs_Stats;
            */
        
        
        
            function readFileSync(filename: string, options?: { encoding?: string; flag?: string; }): any {
        
              // TODO: handle encoding and other
              return drive.read(filename);
        
            }
        
            function readSync(fd: number, buffer: Buffer, offset: number, length: number, position: number): number {
        
              // TODO: consider also std handles
              //var path = nofs_fdtable()[fd];
        
              throw new Error('Buffer-aware API fs.readSync is not implemented.');
            }
        
        
        
            function writeFileSync(filename: string, content: string) {
        
              drive.write(filename, content);
        
            }
        
        
            function writeSync(fd: number, buffer: Buffer, offset: number, length: number, position: number): number {
        
              if (fd === 1) {
                if (typeof console !== 'undefined')
                  console.log(buffer);
        
                return length;
              }
        
              var path = get_fdtable()[fd];
        
              throw new Error('Buffer-aware API fs.writeSync is not implemented.');
            }
        
        
        
        
            function openSync(path: string, flags: string, mode?: number): number;
            function openSync(path: string, flags: string, mode?: string): number;
            function openSync(path: string, flags?: string, mode?: any): number {
        
              var fdtable = get_fdtable();
        
              for (var fd in fdtable) {
                var fpath = fdtable[fd];
                if (fpath === path) {
                  return Number(fd);
                }
              }
        
              var newFD = _fdbase_++;
              fdtable[newFD] = path;
              return newFD;
            }
        
            var _fdbase_;
            var _fdtable_: string[];
        
            function get_fdtable() {
              if (!_fdtable_) {
                _fdtable_ = [];
                _fdbase_ = 34957346;
              }
              return _fdtable_;
            }
          }
        
        
        
        
        
          function getStartMatcher(oldPath: string) {
        
            if (!oldPath) return (txt: string) => !txt;
        
            return (txt: string) => {
              if (!txt) return false;
              if (txt.length < oldPath.length) return false;
              return txt.slice(0, oldPath.length) === oldPath;
            };
          }
        
        
        }
      • module.d.ts
        declare module noapi {
        
          export interface Module {
            exports: any;
            require(id: string): any;
            id: string;
            filename: string;
            loaded: boolean;
            parent: any;
            children: any[];
          }
        
        }
      • module.ts
        module noapi {
        
          export function createModule(
            id: string,
            filename: string,
            parent: any,
            requireForModule: (moduleName: string) => any): Module {
        
            var module: Module = {
              exports: {},
              id,
              filename,
              loaded: false,
              parent,
              children: [],
              require
            };
        
            return module;
        
            var _moduleCache: any;
            var _resolveCache: any;
        
            function require(moduleName: string): any {
              var key = '*' + moduleName;
              if (_moduleCache && key in _moduleCache)
                return _moduleCache[key];
        
              var mod = requireForModule(moduleName);
              (_moduleCache || (_moduleCache = {}))[key] = mod;
              return mod;
            }
        
          }
        
        }
      • os.d.ts
        declare module noapi {
        
          export interface OS {
            tmpdir(): string;
            hostname(): string;
            type(): string;
            platform(): string;
            arch(): string;
            release(): string;
            uptime(): number;
            loadavg(): number[];
            totalmem(): number;
            freemem(): number;
            cpus(): { model: string; speed: number; times: { user: number; nice: number; sys: number; idle: number; irq?: number; }; }[];
            networkInterfaces(): any;
            EOL: string;
          }
        
        }
      • os.ts
        module noapi {
        
          export function createOS(global: { process: Process; }) {
        
            return {
              EOL: '\n',
              tmpdir: () => '/.tmp',
              hostname: () => 'localhost',
              type: () => 'Linux',
              arch: () => global.process.arch,
              platform: () => global.process.platform,
              release: () => '3.16.0-38-generic',
              uptime: () => global.process.uptime(),
              loadavg: () => [0.7275390625, 0.65576171875, 0.4658203125],
              totalmem: () => 3680739328 + ((Math.random() * 1000) | 0),
              freemem: () => 2344873984 - ((Math.random() * 1000) | 0),
              cpus: () => [
                { model: 'AMD A4-1250 APU with Radeon(TM) HD Graphics', speed: 800, times: { user: 8058000, nice: 29600, sys: 1079400, idle: 128185400, irq: 0 } },
                { model: 'AMD A4-1250 APU with Radeon(TM) HD Graphics', speed: 800, times: { user: 7779400, nice: 33000, sys: 1069200, idle: 127970900, irq: 0 } }
              ],
              networkInterfaces: () => {
                return {
                  lo: [
                    { address: '127.0.0.1', family: 'IPv4', internal: true },
                    { address: '::1', family: 'IPv6', internal: true }
                  ],
                  wlan0: [
                    { address: '192.168.1.3', family: 'IPv4', internal: false },
                    { address: 'fe80::8256:f2ff:fe04:3d29', family: 'IPv6', internal: false }
                  ]
                }
              }
            };
          }
        
        }
      • path.d.ts
        declare module noapi {
        
          export interface Path {
        
            normalize(p: string): string;
            join(...paths: any[]): string;
            resolve(...pathSegments: any[]): string;
            isAbsolute(p: string): boolean;
            relative(from: string, to: string): string;
            dirname(p: string): string;
            basename(p: string, ext?: string): string;
            extname(p: string): string;
            sep: string;
            delimiter: string;
        
            // new apis? definitely not in v0.10.38
            parse?(p: string): { root: string; dir: string; base: string; ext: string; name: string; };
            format?(pP: { root: string; dir: string; base: string; ext: string; name: string; }): string;
        
          }
        
        }
      • path.ts
        module noapi {
        
          export function createPath(global: { process: Process; }): Path {
        
            var result: Path = {
              basename, extname,
              dirname,
              isAbsolute,
              normalize,
              join,
              relative, resolve,
              sep: '/',
              delimiter: ':'
            };
            return result;
        
            function isAbsolute(p: string): boolean {
              return /^\//.test(p);
            }
        
            function extname(p: string): string {
        
              var base = basename(p);
              var lastDot = base.lastIndexOf('.');
              if (lastDot >= 0)
                return base.slice(lastDot);
              else
                return '';
        
            }
        
            function join(...paths: any[]): string {
              return join_core(paths);
            }
        
            function join_core(paths: any[]): string {
              var parts: string[] = [];
              var trailSlash = false;
              for (var i = 0; i < paths.length; i++) {
                var part = paths[i];
                if (!part) continue;
        
                if (parts.length) {
                  var wlead = part;
                  part = part.replace(/^\/*/, '');
                  if (!part) continue;
                  if (wlead.length > part.length)
                    parts.push('');
                }
                var wtrail = part;
                part = part.replace(/\/*$/, '');
                if (!part) continue;
                parts.push(part);
        
                trailSlash = wtrail.length > part.length;
              }
        
              if (trailSlash)
                parts.push('/');
        
              return parts.join('/');
            }
        
            function relative(from: string, to: string): string {
              throw new Error('path/relative is not implemented');
            }
        
            function resolve(...pathSegments: any[]): string {
        
              var res = join_core(pathSegments);
        
              if (!/^\//.test(res))
                res = global.process.cwd() + res;
        
              return res;
            }
          }
        
          export function basename(p: string, ext?: string): string {
        
            p = normalize(p);
            if (p === '/')
              return '';
        
            var result: string;
        
            var lastSlash = p.lastIndexOf('/');
            if (lastSlash === p.length - 1) {
              var prevSlash = p.lastIndexOf('/', lastSlash - 1);
              if (prevSlash < 0)
                prevSlash = 0;
              result = p.slice(prevSlash + 1, lastSlash);
            }
            else {
              result = p.slice(lastSlash + 1);
            }
        
            if (ext && result.length >= ext.length && result.slice(-ext.length) === ext)
              result = result.slice(0, result.length - ext.length);
          }
        
          export function dirname(p: string): string {
            var p = normalize(p);
            if (p === '/') return '/';
            var lastSlash = p.lastIndexOf('/');
            if (lastSlash === p.length - 1)
              lastSlash = p.lastIndexOf('/', lastSlash - 1);
            return p.slice(0, lastSlash + 1);
          }
        
          export function normalize(p: string): string {
            return p;
          }
        
        }
      • process.d.ts
        declare module noapi {
        
          export interface Process extends EventEmitter {
        
            stdout: WritableStream;
            stderr: WritableStream;
            stdin: ReadableStream;
        
            argv: string[];
        
            execPath: string;
        
            abort(): void;
        
            chdir(directory: string): void;
            cwd(): string;
        
            env: any;
        
            exit(code?: number): void;
        
            getgid(): number;
            setgid(id: number): void;
            setgid(id: string): void;
        
            getuid(): number;
            setuid(id: number): void;
            setuid(id: string): void;
        
            version: string;
            versions: {
              http_parser: string;
              node: string;
              v8: string;
              ares: string;
              uv: string;
              zlib: string;
              openssl: string;
            };
        
            config: {
              target_defaults: {
                cflags: any[];
                default_configuration: string;
                defines: string[];
                include_dirs: string[];
                libraries: string[];
              };
              variables: {
                clang?: number;
                host_arch?: string;
                target_arch?: string;
                visibility?: string;
              };
            };
        
            kill(pid: number, signal?: string): void;
        
            pid: number;
        
            title: string;
        
            arch: string;
            platform: string;
        
            memoryUsage(): { rss: number; heapTotal: number; heapUsed: number; };
        
            nextTick(callback: Function): void;
        
            umask(mask?: number): number;
        
            uptime(): number;
            hrtime(time?: number[]): number[];
        
            // Worker
            send?(message: any, sendHandle?: any): void;
          }
        }
      • process.ts
        module noapi {
        
          export function createProcess(
            modules: { fs: FS; path: Path; },
            options: {
              argv: string[];
              cwd: string;
              env: any;
            }): Process {
        
            var evt = createEventEmitter();
        
            return {
              abort, exit, kill,
              nextTick,
              chdir, cwd,
        
              title: 'node',
              arch: 'ia32',
              platform: 'linux',
              execPath: '/usr/bin/nodejs',
        
              getgid, setgid, getuid, setuid,
        
              stdout: load_stdout(), stderr: load_stderr(), stdin: load_stdin(),
        
              memoryUsage,
        
              uptime: load_uptime(),
              hrtime: <any>function() { throw new Error('High resultion time is not implemenetd yet.'); },
        
              pid: load_pid(),
              umask: load_umask(),
              config: load_config(),
              versions: load_versions(),
              version: load_versions().node,
        
              argv: options.argv,
              env: options.env,
        
              addListener: evt.addListener,
              on: evt.on,
              once: evt.once,
              removeListener: evt.removeListener,
              removeAllListeners: evt.removeAllListeners,
              setMaxListeners: evt.setMaxListeners,
              listeners: evt.listeners,
              emit: evt.emit
        
            };
        
            function abort() {
            }
        
            function exit(code?: number) {
            }
        
            function kill(pid: number, signal?: string) {
              // when we emulate processes, implement process termination
            }
        
        
        
        
            function chdir(directory: string) {
              var dirStat = modules.fs.statSync(directory);
        
              if (dirStat && dirStat.isDirectory()) {
                if (directory !== cwd()) {
                  var normDirectory = modules.path.normalize(directory);
                  if (cwd() !== normDirectory) {
                    options.cwd = normDirectory;
                  }
                }
              }
              else {
                // TODO: throw a node-shaped error instead
                throw new Error('ENOENT, no such file or directory');
              }
            }
        
            function cwd(): string {
              return options.cwd;
            }
        
        
        
            function getgid() {
              // taken from node running on ubuntu
              return 1000;
            }
        
            function setgid(id: any) {
              // TODO: use node-shaped error
              throw new Error('EPERM, Operation not permitted');
            }
        
            function getuid(): number {
              // taken from node running on ubuntu
              return 1000;
            }
        
            function setuid(id: any) {
              // TODO: use node-shaped error
              throw new Error('EPERM, Operation not permitted');
            }
        
        
        
            function load_uptime() {
              var _uptime_start_ = typeof Date.now === 'function' ? Date.now() : +(new Date());
              return uptime;
        
              function uptime() {
                var now = typeof Date.now === 'function' ? Date.now() : +(new Date());
                return now - _uptime_start_;
              }
            }
        
        
        
            function load_stdout() {
              return <WritableStream>{
              };
            }
        
            function load_stderr() {
              return <WritableStream>{
              };
            }
        
            function load_stdin() {
              return <ReadableStream>{
              };
            }
        
        
        
            function memoryUsage(): { rss: number; heapTotal: number; heapUsed: number; } {
              return {
                rss: 13225984 + ((Math.random() * 3000) | 0),
                heapTotal: 7130752 + ((Math.random() * 3000) | 0),
                heapUsed: 2449612 + ((Math.random() * 3000) | 0)
              };
            }
        
        
        
            function load_pid() {
              return 32754 + ((Math.random() * 500) | 0);
            }
        
            function load_umask() {
              var _umask_;
              return umask;
        
              function umask(mask?: number): number {
                if (typeof _umask_ !== 'number') {
                  _umask_ = 2;
                }
        
                if (typeof mask === 'number') {
                  var res = _umask_;
                  _umask_ = mask;
                  return res;
                }
        
                return _umask_;
              }
            }
        
            function load_versions() {
              // real node running on ubuntu as of Friday 22 of May 2015
              // (these might not be properly implemented when hosted in browser)
              return {
                http_parser: '1.0',
                node: '0.10.38',
                v8: '3.14.5.9',
                ares: '1.9.0-DEV',
                uv: '0.10.36',
                zlib: '1.2.8',
                modules: '11',
                openssl: '1.0.1m'
              };
            }
        
        
            function load_config() {
              return {
                target_defaults:
                {
                  cflags: [],
                  default_configuration: 'Release',
                  defines: [],
                  include_dirs: [],
                  libraries: []
                },
                variables:
                {
                  clang: 0,
                  gcc_version: 48,
                  host_arch: 'ia32',
                  node_install_npm: true,
                  node_prefix: '/usr',
                  node_shared_cares: false,
                  node_shared_http_parser: false,
                  node_shared_libuv: false,
                  node_shared_openssl: false,
                  node_shared_v8: false,
                  node_shared_zlib: false,
                  node_tag: '',
                  node_unsafe_optimizations: 0,
                  node_use_dtrace: false,
                  node_use_etw: false,
                  node_use_openssl: true,
                  node_use_perfctr: false,
                  node_use_systemtap: false,
                  openssl_no_asm: 0,
                  python: '/usr/bin/python',
                  target_arch: 'ia32',
                  v8_enable_gdbjit: 0,
                  v8_no_strict_aliasing: 1,
                  v8_use_snapshot: false,
                  want_separate_host_toolset: 0
                }
              };
            }
          }
        }
      • stream.d.ts
        declare module noapi {
        
          export interface ReadableStream extends EventEmitter {
            readable: boolean;
            read(size?: number): string|Buffer;
            setEncoding(encoding: string): void;
            pause(): void;
            resume(): void;
            pipe<T extends WritableStream>(destination: T, options?: { end?: boolean; }): T;
            unpipe<T extends WritableStream>(destination?: T): void;
            unshift(chunk: string): void;
            unshift(chunk: Buffer): void;
            wrap(oldStream: ReadableStream): ReadableStream;
          }
        
          export interface WritableStream extends EventEmitter {
            writable: boolean;
            write(buffer: Buffer, cb?: Function): boolean;
            write(str: string, cb?: Function): boolean;
            write(str: string, encoding?: string, cb?: Function): boolean;
            end(): void;
            end(buffer: Buffer, cb?: Function): void;
            end(str: string, cb?: Function): void;
            end(str: string, encoding?: string, cb?: Function): void
          }
        
          export interface Stream extends EventEmitter {
            pipe<T extends WritableStream>(destination: T, options?: { end?: boolean; }): T;
          }
        
          export interface ReadableOptions {
            highWaterMark?: number;
            encoding?: string;
            objectMode?: boolean;
          }
        
          export interface Readable extends EventEmitter, ReadableStream {
            readable: boolean;
            //constructor(opts?: ReadableOptions)
            _read(size: number): void;
        
            read(size?: number): string|Buffer;
        
            setEncoding(encoding: string): void;
        
            pause(): void;
        
            resume(): void;
        
            pipe<T extends WritableStream>(destination: T, options?: { end?: boolean; }): T;
        
            unpipe(destination?: WritableStream): void;
        
            unshift(chunk: string): void;
        
            unshift(chunk: Buffer): void;
        
            wrap(oldStream: ReadableStream): ReadableStream;
        
            push(chunk: any, encoding?: string): boolean;
        
          }
        
          export interface WritableOptions {
            highWaterMark?: number;
            decodeStrings?: boolean;
          }
        
          export interface Writable extends EventEmitter, WritableStream {
            writable: boolean;
            // constructor(opts?: WritableOptions)
        
            _write(data: Buffer, encoding: string, callback: Function): void;
        
            _write(data: string, encoding: string, callback: Function): void;
        
            write(buffer: Buffer, cb?: Function): boolean;
        
            write(str: string, cb?: Function): boolean;
        
            write(str: string, encoding?: string, cb?: Function): boolean;
        
            end(): void;
        
            end(buffer: Buffer, cb?: Function): void;
        
            end(str: string, cb?: Function): void;
        
            end(str: string, encoding?: string, cb?: Function): void;
        
          }
        
          export interface DuplexOptions extends ReadableOptions, WritableOptions {
            allowHalfOpen?: boolean;
          }
        
          /**
           * Note: Duplex extends both Readable and Writable.
           */
          export interface Duplex extends Readable {
            writable: boolean;
            // constructor(opts?: DuplexOptions);
        
            _write(data: Buffer, encoding: string, callback: Function);
            _write(data: string, encoding: string, callback: Function): void;
        
            write(buffer: Buffer, cb?: Function);
            write(str: string, cb?: Function);
            write(str: string, encoding?: string, cb?: Function): boolean;
        
            end(): void;
            end(buffer: Buffer, cb?: Function): void;
            end(str: string, cb?: Function): void;
            end(str: string, encoding?: string, cb?: Function): void;
        
          }
        
          export interface TransformOptions extends ReadableOptions, WritableOptions { }
        
          /**
             * Note: Transform lacks the _read and _write methods of Readable/Writable.
             */
          interface Transform extends EventEmitter {
            readable: boolean;
            writable: boolean;
            // constructor(opts?: TransformOptions)
        
            _transform(chunk: Buffer, encoding: string, callback: Function): void;
            _transform(chunk: string, encoding: string, callback: Function): void;
        
            _flush(callback: Function): void;
        
            read(size?: number): any;
        
            setEncoding(encoding: string): void;
        
            pause(): void;
        
            resume(): void;
        
            pipe<T extends WritableStream>(destination: T, options?: { end?: boolean; }): T;
        
            unpipe(destination?: WritableStream): void;
        
            unshift(chunk: string): void;
        
            unshift(chunk: Buffer): void;
        
            wrap(oldStream: ReadableStream): ReadableStream;
        
            push(chunk: any, encoding?: string): boolean;
        
            write(buffer: Buffer, cb?: Function): boolean;
            write(str: string, cb?: Function): boolean;
            write(str: string, encoding?: string, cb?: Function): boolean;
        
            end(): void;
            end(buffer: Buffer, cb?: Function): void;
            end(str: string, cb?: Function): void;
            end(str: string, encoding?: string, cb?: Function): void;
        
          }
        }
    • nobrowser
      • HostedWindow.ts
        module nobrowser {
        
          export class HostedWindow {
        
            constructor(private _window: Window, private _drive: persistence.Drive) {
              
        
            }
        
          }
        
        }
      • overrideLocalStorage.ts
        module nobrowser {
        
          export function overrideLocalStorage(drive: persistence.Drive, cachePath: string) {
        
            var cachePathDir = cachePath + (cachePath.slice(-1) === '/' ? '' : '/');
        
            return LocalStorageOverride;
        
            class LocalStorageOverride {
        
              private _keys: string[] = null;
              length = 0;
        
              constructor() {
                var files = drive.files();
                for (var i = 0; i < files.length; i++) {
                  var f = files[i];
                  if (f.length > cachePathDir.length && f.slice(0, cachePathDir.length) === cachePathDir)
                    this._keys.push(f.slice(cachePathDir.length));
                }
                this.length = this._keys.length;
              }
        
              clear() {
                for (var i = 0; i < this._keys.length; i++) {
                  var f = cachePathDir + this._keys[i];
                  drive.write(f, null);
                }
                this._keys = [];
              }
        
            	key(index: number) {
                return this._keys[index];
              }
        
            	getItem(key: string): string {
                var keypath = cachePathDir + key;
                return drive.read(keypath);
              }
        
            	setItem(key: string, value: string): void {
                var keypath = cachePathDir + key;
                drive.write(keypath, value);
                for (var i = 0; i < this._keys.length; i++) {
                  if (key === this._keys[i]) return;
                }
                this._keys.push(key);
                this.length++;
              }
        
            	removeItem(key: string): void {
                var keypath = cachePathDir + key;
                for (var i = 0; i < this._keys.length; i++) {
                  if (key === this._keys[i]) {
                    this._keys.splice(i, 1);
                    this.length++;
                    drive.write(keypath, null);
                    return;
                  }
                }
              }
            }
        
          }
        }
      • overrideXMLHttpRequest.ts
        module nobrowser {
        
          export function overrideXMLHttpRequest(readCache: (url: string, callback: (content: string) => void) => void) {
        
            return XMLHttpRequestOverride;
        
            // urlBase - 'https://rawgit.com/jeffpar/pcjs/master'
        
        
            class XMLHttpRequestOverride {
        
              private _url: string = null;
        
              status = 0;
              readyState = 0;
              responseText = null;
              onreadystatechange: () => void = null;
        
              open(method: string, url: string) {
                this._url = url;
              }
        
              send() {
                var completed = false;
                this.readyState = 0;
                readCache(this._url, content => {
                  this.status = 200;
                  this.readyState = 4;
                  this.responseText = content;
                  if (completed)
                    this.onreadystatechange();
                  return;
                });
        
                if (this.readyState === 4) {
                  setTimeout(() => this.onreadystatechange(), 1);
                }
        
        
              }
        
              setRequestHeader() {
              }
        
            }
          }
        
        	export module overrideXMLHttpRequest {
        
            export function withDrive(drive: persistence.Drive, cachePath: string, realXMLHttpRequest: typeof XMLHttpRequest) {
              return overrideXMLHttpRequest(
                (url, callback) => {
                  var existing = cachePath + (cachePath.slice(-1) === '/' ? '' : '/') + (url.charAt(0) === '/' ? url.slice(1) : url);
        
                  var existingContent = drive.read(existing);
                  if (existingContent) {
                    callback(existingContent);
                    return;
                  }
        
                  var xhr = new realXMLHttpRequest();
                  xhr.open('GET', url);
                  xhr.onreadystatechange = () => {
                    if (xhr.readyState === 4 && xhr.status === 200) {
                      var response = xhr.responseText || xhr.response;
                      drive.write(existing, response);
                      callback(response);
                    }
                  };
                  xhr.send();
                });
            }
        
          }
        
        }
    • Context.ts
      module isolation {
      
        export class Context {
      
          private _frame;
          private _obscureScope: any = {};
          private _disposed = false;
      
          constructor(private _window: Window) {
            this._frame = createFrame(this._window);
            defineObscureScope(this._obscureScope, this._frame.global);
            defineObscureScope(this._obscureScope, this._frame.window);
            this._obscureScope.global = void 0;
            var setGlobal = this._frame.evalFN('(function() { return function(global) { window.global = global; }; })()');
            setGlobal(this._obscureScope);
          }
      
          run(code: string, path: string, scope: any) {
            path = path || typeof path === 'string' ? path : createTimebasedPath();
            this._obscureScope.global = scope || {};
            var decoratedCode =
              'with(window.global){with(global){   ' + code +
              '\n }}  //# sourceURL=' + path;
            var result = this._frame.evalFN(decoratedCode);
            this._obscureScope.global = null;
            return result;
          }
      
          dispose() {
            if (!this._disposed) {
              document.body.removeChild(this._frame.iframe);
              this._disposed = true;
            }
          }
      
        }
      
        function createTimebasedPath() {
          var now = new Date();
          var path = now.getFullYear() +
            (now.getMonth() + 1 > 9 ? '' : '0') + now.getMonth() +
            (now.getDate() > 9 ? '' : '0') + now.getDate() + '-' +
            (now.getHours() > 9 ? '' : '0') + now.getHours() +
            (now.getMinutes() > 9 ? '' : '0') + now.getMinutes() + '-' +
            (now.getSeconds() > 9 ? '' : '0') + now.getSeconds() +
            '.' + ((now.getMilliseconds() | 0) + 1000).toString().slice(1) +
            '.js';
          return path;
        }
      
        function createFrame(window: Window) {
          var ifr = window.document.createElement('iframe');
          ifr.style.display = 'none';
          window.document.body.appendChild(ifr);
      
          var ifrwin: Window = ifr.contentWindow || (<any>ifr).window;
          var ifrdoc = ifrwin.document;
      
          if (ifrdoc.open) ifrdoc.open();
          ifrdoc.write(
            '<!' + 'doctype html' + '>' +
            '<' + 'html' + '><' + 'body' + '>' +
            '<' + 'script' + '>window.__eval_export_=function(code) { return eval(code); }</' + 'script' + '>' +
            '<' + 'body' + '></' + 'html' + '>');
          if (ifrdoc.close) ifrdoc.close();
      
          var ifrwin_eval: typeof eval = (<any>ifrwin).__eval_export_;
          try {
            delete (<any>ifrwin).__eval_export_;
          }
          catch (weirdIEFailure) {
            // no big deal if it fails
          }
      
          ifrdoc.body.innerHTML = '';
      
          return {
            document: ifrdoc,
            window: ifrwin,
            global: ifrwin_eval('this'),
            iframe: ifr,
            evalFN: ifrwin_eval
          };
        }
      
        function defineObscureScope(scope: any, pollutedGlobal: any) {
      
          var natives = defineAllowedNatives();
      
          var dummy;
      
          // normal properties
          for (var k in pollutedGlobal) {
            if (scope[k] || natives[k]) continue;
            scope[k] = dummy;
          }
      
          // non-enumerable properties directly on global
          if (Object.getOwnPropertyNames) {
            var props = Object.getOwnPropertyNames(pollutedGlobal);
            for (var i = 0; i < props.length; i++) {
              if (scope[props[i]] || natives[props[i]]) continue;
              scope[props[i]] = dummy;
            }
      
            // non-enumerable properties on global's prototype
            if (pollutedGlobal.constructor
              && pollutedGlobal.constructor.prototype
              && pollutedGlobal.constructor.prototype !== Object.prototype) {
              props = Object.getOwnPropertyNames(pollutedGlobal.constructor.prototype);
              for (var i = 0; i < props.length; i++) {
                if (scope[props[i]] || natives[props[i]]) continue;
                scope[props[i]] = dummy;
              }
            }
          }
        }
      
        var allowedNatives = null;
      
        function defineAllowedNatives() {
          return {
            setTimeout: 1, setInterval: 1, clearTimeout: 1, clearInterval: 1,
            eval: 1,
            console: 1,
            undefined: 1,
            Object: 1, Array: 1, Date: 1, Function: 1, String: 1, Boolean: 1, Number: 1,
            Infinity: 1, NaN: 1, isNaN: 1, isFinite: 1, parseInt: 1, parseFloat: 1,
            escape: 1, unescape: 1,
      
            Int32Array: 1, Int8Array: 1, Int16Array: 1,
            UInt32Array: 1, UInt8Array: 1, UInt8ClampedArray: 1, UInt16Array: 1,
            Float32Array: 1, Float64Array: 1, ArrayBuffer: 1,
      
            Math: 1, JSON: 1, RegExp: 1,
            Error: 1, SyntaxError: 1, EvalError: 1, RangeError: 1, ReferenceError: 1,
      
            toString: 1, toJSON: 1, toValue: 1,
      
            Map: 1, Promise: 1
          };
        }
      }
  • load
    • shellLoader.ts
      //declare var showCommanderInContext;
      
      function shellLoader(uniqueKey: string, document: Document, boot: shellLoader.BootModuleAPI): shellLoader.ContinueLoading {
      
        var driveMount = persistence.bootMount(uniqueKey, document);
      
        return continueLoading();
      
        function continueLoading(): shellLoader.ContinueLoading {
          driveMount = driveMount.continueLoading();
      
          boot.api.title('Loading files: ' + progressText('dom'), 0.05 + 0.8* driveMount.loadedSize/driveMount.totalSize);
          return { continueLoading, finishLoading };
        }
      
        var timings;
        var prevStage;
        var prevStageStart;
        var prevTimeText;
        function progressText(stage) {
      
          var fileText = driveMount.loadedFileCount + ' (' + driveMount.totalSize + ' total)';
      
          var now = +new Date();
      
          if (!prevStage) {
            timings = [
              {stage: 'boot ui', time: boot.bootStartTime - boot.earlyStartTime}
            ];
            prevTimeText = ' boot UI ' + (boot.bootStartTime - boot.earlyStartTime) + 'ms init ' + (now - boot.bootStartTime) + 'ms';
            prevStageStart = boot.bootStartTime;
            prevStage = stage;
            return fileText + prevTimeText;
          }
          else if (prevStage !== stage) {
            timings.push({
              stage: prevStage,
              time: now-prevStageStart
            });
            prevTimeText += ' ' + prevStage + ' ' + (now - prevStageStart) + 'ms';
            prevStageStart = now;
            prevStage = stage;
            return fileText + prevTimeText;
          }
          else {
            return fileText + prevTimeText + ' ' + prevStage + ' ' + (now - prevStageStart) + 'ms';
          }
      
        }
      
        function finishLoading() {
      
          boot.api.title('Loading modifications: ' + progressText('local'), 0.85);
          driveMount.finishLoading(drive => {
      
            boot.api.title('Loading application: ' + progressText('ui-init'), 0.9);
      
            var uiframe = createFrame();
            uiframe.iframe.style.opacity = '0';
            uiframe.iframe.style.filter = 'alpha(opacity=0)';
            var uiframeBase = (<any>window).base(uiframe.global);
            uiframeBase.apply();
      
      
            var wasResized = false;
            var resizeHandlers: any[] = [];
            on(window, 'scroll', global_resize_detect);
            on(window, 'resize', global_resize_detect);
            on(document.body, 'resize', global_resize_detect);
            on(document.body, 'scroll', global_resize_detect);
            if (document.documentElement) on(document.documentElement, 'resize', global_resize_detect);
            if (document.documentElement) on(document.documentElement, 'scroll', global_resize_detect);
            on(uiframe.document.body, 'touchstart', global_resize_detect);
            on(uiframe.document.body, 'touchmove', global_resize_detect);
            on(uiframe.document.body, 'touchend', global_resize_detect);
            on(uiframe.document.body, 'pointerdown', global_resize_detect);
            on(uiframe.document.body, 'pointerup', global_resize_detect);
            on(uiframe.document.body, 'pointerout', global_resize_detect);
            on(uiframe.document.body, 'keydown', global_resize_detect);
            on(uiframe.document.body, 'keyup', global_resize_detect);
      
      
            (<any>uiframe.global).require = shell_require;
            boot.api.title('Loaded: ' + progressText('ui'), 0.95);
      
            global_resize_delayed();
      
            // TODO: do this concurrently with drive loading
            try {
              var files = drive.files();
              var shellScripts: string[] = [];
              for (var i = 0; i < files.length; i++) {
                if (!/^\/shell\//.test(files[i])) continue;
                var content = drive.read(files[i]);
                if (/\.js$/.test(files[i])) {
                  uiframe.document.write('<' + 'script' + '>' + content + ' //# sourceURL=' + files[i] + '</' + 'script' + '>');
                }
                else if (/\.css$/.test(files[i])) {
                  uiframe.document.write('<' + 'style' + ' type="text/css">' + content + ' //# sourceURL=' + files[i] + '</' + 'style' + '>');
                }
              }
            }
            catch (error) {
              alert('Shell initialisation failed ' + error.message+'\n'+error.stack+'\n'+error);
            }
      
            if (uiframe.document.close)
            	uiframe.document.close();
      
            function shell_require(moduleName): any {
              switch (moduleName) {
                case 'nowindow': return window;
                case 'noui': return uiframe;
                case 'nodrive': return drive;
                case 'resize': return { on: onresize, off: offresize };
                case 'timings': return timings;
              }
              throw new Error('Module ' + moduleName + ' is not supported.');
            }
      
            function onresize(handler) {
              if (typeof handler !== 'function') return;
              resizeHandlers.push(handler);
            }
      
            function offresize(handler) {
              if (typeof handler !== 'function') return;
              for (var i = 0; i < resizeHandlers.length; i++) {
                if (resizeHandlers[i] === handler) {
                  resizeHandlers.splice(i, 1);
                }
              }
            }
      
            function global_resize_detect() {
              if (wasResized) return;
              wasResized = true;
      
              if (typeof requestAnimationFrame === 'function') {
                requestAnimationFrame(global_resize_delayed);
              }
              else {
                setTimeout(global_resize_delayed, 5);
              }
            }
      
            var lastMetrics: any = null;
            var lastScroll: any = null;
            function global_resize_delayed() {
      
              var scrollPos = getScroll();
              if (!lastScroll || (scrollPos.x !== lastScroll.x || scrollPos.y !== lastScroll.y)) {
                lastScroll = scrollPos;
                uiframe.iframe.style.left = scrollPos.x + 'px';
                uiframe.iframe.style.top = scrollPos.y + 'px';
              }
      
              wasResized = false;
      
              var metrics = getMetrics();
              if (!lastMetrics || (metrics.windowWidth !== lastMetrics.windowWidth
                && metrics.windowHeight !== lastMetrics.windowHeight)) {
                lastMetrics = metrics;
                if (uiframe) {
                  var w = metrics.windowWidth + 'px';
                  var h = metrics.windowHeight + 'px';
                  uiframe.iframe.style.width = w;
                  uiframe.iframe.style.height = h;
                  document.body.style.width = w;
                  document.body.style.height = h;
                  if (document.body.parentElement) {
                    document.body.parentElement.style.width = w;
                    document.body.parentElement.style.height = h;
                  }
                }
      
                for (var i = 0; i < resizeHandlers.length; i++) {
                  var f = resizeHandlers[i];
                  if (f)
                    f(metrics);
                }
              }
            }
      
            function getScroll() {
              var x = window.scrollX || window.pageXOffset || document.body.scrollLeft || (document.body.parentElement ? document.body.parentElement.scrollLeft : 0) || 0;
              var y = window.scrollY || window.pageYOffset || document.body.scrollTop || (document.body.parentElement ? document.body.parentElement.scrollTop : 0) || 0;
              return { x, y };
            }
      
            function getMetrics() {
              var metrics = {
                windowWidth: window.innerWidth || (document.body.parentElement ? document.body.parentElement.clientWidth : 0) || document.body.clientWidth,
                windowHeight: window.innerHeight || (document.body.parentElement ? document.body.parentElement.clientHeight : 0) || document.body.clientHeight
              };
              return metrics;
            }
      
            var start = new Date().valueOf();
            var fadeintTime = Math.min(500, ((+new Date()) - boot.bootStartTime) * 0.9);
            var animateFadeIn = setInterval(function() {
              var passed = new Date().valueOf() - start;
              var opacity = Math.min(passed, fadeintTime) / fadeintTime;
              boot.iframe.style.opacity = (1 - opacity).toString();
              if (uiframe.iframe.style.filter)
              	boot.iframe.style.filter = 'alpha(opacity=' + ((opacity * 100) | 0) + ')';
              uiframe.iframe.style.opacity = '1';
      
              uiframe.iframe.style.filter = 'alpha(opacity=100)';
      
              if (passed >= fadeintTime) {
                clearInterval(animateFadeIn);
                if (boot.iframe.parentElement) // old Opera may keep firing even after clearInterval
                  boot.iframe.parentElement.removeChild(boot.iframe);
              }
            }, 10);
      
            (<any>uiframe.global).shell.start();
      
            boot.api.title('Completed: ' + progressText('ui') + ' ' + new Date(drive.timestamp), 0.99);
      
          });
      
        }
      
        function createFrame() {
      
          var ifr = <HTMLIFrameElement>elem(
            'iframe',
            {
              position: 'absolute',
              left: 0, top: 0,
              width: '100%', height: '100%',
              border: 'none',
              src: 'about:blank'
            },
            window.document.body);
      
          var ifrwin: Window = ifr.contentWindow || (<any>ifr).window;
          var ifrdoc = ifrwin.document;
      
          ifrdoc.write(
            '<!' + 'doctype html' + '>' +
            '<' + 'html' + '>' +
            '<' + 'head' + '><' + 'style' + '>' +
            'body,html{margin:0;padding:0;border:none;height:100%;border:none;background:black;}' +
            '*,*:before,*:after{box-sizing:inherit;}' +
            'html{box-sizing:border-box;}' +
            '</' + 'style' + '>\n' +
            '</'+'head'+'>'+
            '<' + 'body' + '>');
      
          return {
            document: ifrdoc,
            global: ifrwin,
            iframe: ifr
          };
      
        }
      }
      
      module shellLoader {
      
        export interface BootModuleAPI extends createFrame.LoadedResult {
          api?: any;
          earlyStartTime?: number;
          bootStartTime?: number;
        }
      
        export interface ContinueLoading {
      
          continueLoading(): ContinueLoading;
      
          finishLoading();
      
        }
      
      }
  • pcjs-embed
    • 1.18.3
      • common.css
        @CHARSET "UTF-8";
        /**
            @author Jeff Parsons (@jeffpar)
            @website http://www.pcjs.org/
            @created 2013-05-05
            @modified 2014-02-23
            @license http://www.gnu.org/licenses/gpl.html
         */
        body {
            margin: 0;
            background: #202020;
        }
        h1, h2 {
            margin-top: 0;
            color: #cccccc;
        }
        h1, h2, h3, h4 {
            word-wrap: break-word;
        }
        
        h4 a {
            color: #cccccc !important;
        }
        p {
            line-height: 1.5em;
        }
        img {
            max-width: 100%;
        }
        a img {
            vertical-align: bottom;
        }
        pre, code {
            color: #000000;
            background-color: #cccccc;
            font-family: Monaco, Consolas, "Lucida Console", monospace;
            font-size: 12px;
        }
        pre {
            margin: 1em 2em;
            padding: 1em;
            border-radius: 5px;
            overflow: auto;
        }
        code {
            padding: 1px;
        }
        pre a, code a {
            color: #006400 !important;
        }
        .common {
            width: 100%;
            margin: 0 auto;
            color: #cccccc;
        }
        .common a {
        
            color: #7fc07f;
            text-decoration: none;
        }
        .common hr {
            border-color: #808080;
        }
        .common a:hover {
            text-decoration: underline;
        }
        .common, .machine {
            font-family: "Helvetica Neue", Helvetica, Arial, Geneva, sans-serif;
            font-size: 15px;
        }
        .machine {
            margin: 15px;
            overflow: hidden;
        }
        .c1pjs {
            overflow: visible;
        }
        .machine-placeholder {
            text-align: center;
            font-weight: bold;
        }
        .common-top {
            background: #202020;
            font-size: small;
        }
        .common-top-left {
            float: left;
            width: 60%;
        }
        .common-top-left ul {
            line-height: 1.5em;
            list-style-type: none;
            margin: 0;
            padding: 1em 1em 1em 9px;
            overflow: hidden;
        }
        .common-top-left ul li {
            display: block;
            float: left;
        }
        .common-top-left ul li a {
            border-right: 1px solid #6f6f6f;
            padding: 2px 6px 2px 6px;
        }
        .common-top-left ul li:last-child a {
            border-right: none;
        }
        .common-top-right {
            float: right;
            width: 40%;
        }
        .common-top-right p {
            float: right;
            margin: 0;
            padding: 1em;
        }
        .common-middle {
            clear: both;
            padding: 1px 1em 1px 1em;
            background: #404040;
        }
        .common-sidebar {
            float: left;
            font-size: small;
            width: 140px;
            padding-bottom: 20px;
            overflow: hidden;
            white-space: nowrap;
            word-wrap: break-word;
        }
        .common-list {
            list-style-type: none;
            margin-top: 0;
            margin-bottom: 0;
            padding-left: 0;
        }
        .common-list li {
        
            padding-bottom: 7px;
        }
        .common-list-data {
            list-style-type: none;
            margin-top: 0;
            margin-bottom: 0;
            padding-left: 0;
        }
        .common-list-data li {
            line-height: 1.5em;
        }
        .common-list-data-items, .common-list-data-subitems {
            font-size: x-small;
            list-style-type: none;
            margin-top: 0;
            margin-bottom: 0;
            padding-left: 2em;
        }
        .common-list-data-items li, .common-list-data-subitems li {
            padding-bottom: 0;
        }
        .common-main {
            margin-left: 150px;
        
        }
        .common-image-gallery {
            margin: 0 auto;
            text-align: center;
        }
        .common-image-gallery:after {
            content: '';
            display: block;
        }
        .common-image-frame {
            display: inline-block;
            margin: 8px;
            text-align: center;
        }
        .common-image-link {
            padding: 5px;
            border: 1px solid black;
            border-radius: 5px;
            background-color: #FAEBD7;
        }
        .common-image-label {
            font-size: x-small;
        }
        .common-bottom {
            clear: both;
            padding-top: 1em;
        }
        .common-bottom:after {
            content: '';
            display: block;
            clear: both;
        }
        .common-reference {
            float: left;
            font-size: x-small;
        }
        .common-reference a {
            text-decoration: none;
        }
        .common-copyright {
            float: right;
            font-size: x-small;
        }
        .common-copyright a {
            text-decoration: none;
        }
        .md-list {
        }
        .md-list li {
            line-height: 1.5em;
            margin-bottom: 1em;
        }
        .md-list li p {
            padding-left: 2em;
        }
        .md-list-compact {
        }
        .md-list-compact li {
            margin-bottom: 0;
        }
        .md-list-none {
            list-style-type: none;
            padding-left: 2em;
        }
        .md-list-none li {
            margin-bottom: 0;
        }
        @media screen and (max-width: 900px) {
        
            .common-sidebar {
                width: 100%;
                white-space: normal;
            }
            .common-list {
                padding-left: 0;
            }
            .common-list-data {
                padding-left: 0;
            }
            .common-sidebar h4, .common-list li, .common-list-data li, .common-list-data-items li {
                width: 130px;
                float: left;
                overflow: hidden;
                vertical-align: top;
                padding-right: 1em;
                margin-top: 0;
            }
            .common-list-data-subitems {
                display: none;
            }
            .common-main {
                clear: both;
                margin-left: 0;
                padding-left: 0;
                padding-right: 0;
            }
            .md-list-none {
                padding-left: 1em;
            }
        }
        
      • common.xsl
        <?xml version="1.0" encoding="UTF-8"?>
        <!-- author="Jeff Parsons (@jeffpar)" website="http://www.pcjs.org/" created="2012-05-05" modified="2014-02-23" license="http://www.gnu.org/licenses/gpl.html" -->
        <!DOCTYPE xsl:stylesheet [
        	<!ENTITY nbsp "&#160;"> <!ENTITY ne "&#8800;"> <!ENTITY le "&#8804;"> <!ENTITY ge "&#8805;">
        	<!ENTITY times "&#215;"> <!ENTITY sdot "&#8901;"> <!ENTITY divide "&#247;">
        	<!ENTITY copy "&#169;"> <!ENTITY Sigma "&#931;"> <!ENTITY sigma "&#963;"> <!ENTITY sum "&#8721;"> <!ENTITY lbrace "&#123;">
        ]>
        <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
        
        	<xsl:template name="commonStyles">
        		<meta charset="utf-8"/>
        		<link rel="shortcut icon" href="/versions/images/current/favicon.ico" type="image/x-icon"/>
        		<link rel="stylesheet" type="text/css" href="/versions/pcjs/1.18.3/common.css"/>
        	</xsl:template>
        
        	<xsl:template name="commonTop">
        		<div class="common-top">
        			<div class="common-top-left">
        				<ul>
        					<li><a href="/">Home</a></li>
        					<li><a href="/apps/pc/">Apps</a></li>
        					<li><a href="/disks/pc/">Disks</a></li>
        					<li><a href="/devices/pc/machine/">Machines</a></li>
        					<li><a href="/docs/">Docs</a></li>
        					<li><a href="/pubs/">Pubs</a></li>
        					<li><a href="/blog/">Blog</a></li>
        					<li><a href="/docs/about/">About</a></li>
        				</ul>
        			</div>
        			<div class="common-top-right">
        				<p>Powered by <a href="http://nodejs.org" target="_blank">Node.js</a> and <a href="http://aws.amazon.com/elasticbeanstalk/" target="_blank">AWS</a> | <a href="http://github.com/jeffpar/pcjs" target="_blank">GitHub</a></p>
        			</div>
        		</div>
        	</xsl:template>
        
        	<xsl:template name="commonBottom">
        		<div class="common-bottom">
        			<p class="common-reference"></p>
        			<p class="common-copyright">
        				<span class="common-copyright"><a href="http://www.pcjs.org/">pcjs.org</a> website © 2012-2015 by <a href="http://twitter.com/jeffpar">@jeffpar</a></span><br/>
        				<span class="common-copyright">PCjs and C1Pjs released under <a href="http://gnu.org/licenses/gpl.html">GPL version 3 or later</a></span>
        			</p>
        		</div>
        	</xsl:template>
        
        </xsl:stylesheet>
        
      • components.css
        @CHARSET "UTF-8";
        
        
        *:not(input,textarea) {
            -webkit-user-select: none;
        }
        .pcjs-embed {
        }
        .pcjs-embed:after {
            clear:both;
        }
        .pcjs-name, .pcjs-menu {
            clear: both;
            font-weight: bold;
            padding-bottom: 4px;
        }
        .pcjs-menu {
            float: left;
        }
        .pcjs-canvas {
            width: 100%;
            height: auto;
        }
        .pcjs-container {
            color: #000000;
            position: relative;
        }
        .pcjs-label {
            font-size: small;
            line-height: 19px;
            vertical-align: middle;
            float: left;
            font-family: "Lucida Console", monospace;
        }
        .pcjs-control textarea {
            font-family: Monaco, monospace;
            font-size: x-small;
        }
        .pcjs-fieldset {
            border: none;
            margin: 0;
            padding: 0;
        }
        .pcjs-flag {
            font-family: "Lucida Console", monospace;
            font-size: small;
            text-align: center;
            line-height: 19px;
            vertical-align: middle;
        }
        .pcjs-register {
            font-family: "Lucida Console", monospace;
            font-size: small;
            text-align: center;
            line-height: 19px;
            vertical-align: middle;
            border: 1px solid black;
        }
        .pcjs-switches {
            float: left;
        }
        .pcjs-bitBucket {
            float: left;
            width: 19px;
            height: 38px;
        }
        .pcjs-bitCell {
            float: left;
            width: 19px;
            height: 19px;
            margin-right: -1px;
            margin-bottom: -1px;
            border: 1px solid black;
            text-align: center;
            line-height: 19px;
        }
        .pcjs-bitCellLeft {
            border-left: 1px solid black;
        }
        .pcjs-bitLabel {
            font-size: xx-small;
            text-align: center;
        }
        .pcjs-description, .pcjs-status {
            font-size: x-small;
            line-height: 2em;
        }
        .pcjs-key {
            border: 1px solid black;
            font-size: x-small;
            text-align: center;
            position: absolute;
            height: 34px;
            line-height: 34px;
            background-color: #ffffff;
        }
        .pcjs-led {
            float: left;
            width: 8px;
            height: 8px;
            margin: 4px;
            border: 1px solid black;
            text-align: center;
            line-height: 19px;
            background-color: #000000;
        }
        .pcjs-video-object {
            clear: both;
            height: auto;
            position: relative;
            line-height: 0;
        }
        .pcjs-video-object textarea {
            position: absolute;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            opacity: 0;
            border: 0;
            padding: 0;
            line-height: 0;
        }
        .pcjs-reference {
            float: left;
            font-size: x-small;
        }
        .pcjs-reference a {
            text-decoration: none;
        }
        .pcjs-copyright {
            float: right;
            font-size: x-small;
        }
        .pcjs-copyright a {
            text-decoration: none;
        }
        
        @media screen and (max-width: 900px) {
            .pcjs-textarea {
                width: 100% !important;
            }
            .pcjs-registers {
                width: 100% !important;
            }
        }
        
      • components.xsl
        <?xml version="1.0" encoding="UTF-8"?>
        <!-- author="Jeff Parsons (@jeffpar)" website="http://www.pcjs.org/" created="2012-05-05" modified="2014-02-23" license="http://www.gnu.org/licenses/gpl.html" -->
        <!DOCTYPE xsl:stylesheet [
        ]>
        <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
        	<xsl:param name="rootDir" select="''"/>
        	<xsl:param name="generator" select="'client'"/>
        
        	<xsl:variable name="MACHINECLASS">pc</xsl:variable>
        	<xsl:variable name="APPCLASS">pcjs</xsl:variable>
        	<xsl:variable name="APPVERSION">1.18.3</xsl:variable>
        	<xsl:variable name="SITEHOST">www.pcjs.org</xsl:variable>
        
        	<xsl:template name="componentStyles">
        		<link rel="stylesheet" type="text/css" href="/versions/{$APPCLASS}/{$APPVERSION}/components.css"/>
        	</xsl:template>
        
        	<xsl:template name="componentScripts">
        		<xsl:param name="component"/>
        		<script type="text/javascript" src="/versions/{$APPCLASS}/{$APPVERSION}/{$component}.js"> </script>
        	</xsl:template>
        
        	<xsl:template name="componentIncludes">
        		<xsl:param name="component"/>
        		<xsl:call-template name="componentScripts"><xsl:with-param name="component" select="$component"/></xsl:call-template>
        	</xsl:template>
        
        	<xsl:template name="machine">
        		<xsl:param name="href">/devices/pc/machine/5150/mda/64kb/machine.xml</xsl:param>
        		<xsl:param name="state" select="''"/>
        		<xsl:variable name="componentFile"><xsl:value-of select="$rootDir"/><xsl:value-of select="$href"/></xsl:variable>
        		<xsl:apply-templates select="document($componentFile)/machine">
        			<xsl:with-param name="machineState" select="$state"/>
        		</xsl:apply-templates>
        	</xsl:template>
        
        	<xsl:template match="machine[@ref]">
        		<xsl:param name="machineState" select="''"/>
        		<xsl:variable name="componentFile"><xsl:value-of select="$rootDir"/><xsl:value-of select="@ref"/></xsl:variable>
        		<xsl:apply-templates select="document($componentFile)/machine">
        			<xsl:with-param name="machine" select="@id"/>
        			<xsl:with-param name="machineState">
        				<xsl:choose>
        					<xsl:when test="$machineState != ''"><xsl:value-of select="$machineState"/></xsl:when>
        					<xsl:otherwise><xsl:value-of select="@state"/></xsl:otherwise>
        				</xsl:choose>
        			</xsl:with-param>
        		</xsl:apply-templates>
        	</xsl:template>
        
        	<xsl:template match="machine[not(@ref)]">
        		<xsl:param name="machine"><xsl:value-of select="@id"/></xsl:param>
        		<xsl:param name="machineState" select="''"/>
        		<xsl:variable name="machineStyle">
        			<xsl:if test="@float">float:<xsl:value-of select="@float"/></xsl:if>
        		</xsl:variable>
        		<div id="{$machine}" class="machine {@class}js" style="{$machineStyle}">
        			<xsl:call-template name="component">
        				<xsl:with-param name="machine" select="$machine"/>
        				<xsl:with-param name="machineState">
        					<xsl:choose>
        						<xsl:when test="$machineState != ''"><xsl:value-of select="$machineState"/></xsl:when>
        						<xsl:otherwise><xsl:value-of select="@state"/></xsl:otherwise>
        					</xsl:choose>
        				</xsl:with-param>
        				<xsl:with-param name="component" select="'machine'"/>
        				<xsl:with-param name="class"><xsl:value-of select="@class"/>js</xsl:with-param>
        				<xsl:with-param name="parms"><xsl:if test="@parms">,<xsl:value-of select="@parms"/></xsl:if></xsl:with-param>
        				<xsl:with-param name="url"><xsl:value-of select="@url"/></xsl:with-param>
        			</xsl:call-template>
        		</div>
        	</xsl:template>
        
        	<xsl:template match="component[@ref]">
        		<xsl:param name="machine" select="''"/>
        		<xsl:variable name="componentFile"><xsl:value-of select="$rootDir"/><xsl:value-of select="@ref"/></xsl:variable>
        		<xsl:apply-templates select="document($componentFile)/component">
        			<xsl:with-param name="machine" select="$machine"/>
        		</xsl:apply-templates>
        	</xsl:template>
        
        	<xsl:template match="component[not(@ref)]">
        		<xsl:param name="machine" select="''"/>
        		<xsl:call-template name="component">
        			<xsl:with-param name="machine" select="$machine"/>
        			<xsl:with-param name="class" select="@class"/>
        			<xsl:with-param name="parms"><xsl:if test="@parms">,<xsl:value-of select="@parms"/></xsl:if></xsl:with-param>
        		</xsl:call-template>
        	</xsl:template>
        
        	<xsl:template name="component">
        		<xsl:param name="machine" select="''"/>
        		<xsl:param name="machineState" select="''"/>
        		<xsl:param name="component" select="name(.)"/>
        		<xsl:param name="class" select="''"/>
        		<xsl:param name="parms" select="''"/>
        		<xsl:param name="url" select="''"/>
        		<xsl:variable name="id">
        			<xsl:choose>
        				<xsl:when test="$component = 'machine'"><xsl:value-of select="$machine"/>.machine</xsl:when>
        				<xsl:when test="$machine != '' and @id"><xsl:value-of select="$machine"/>.<xsl:value-of select="@id"/></xsl:when>
        				<xsl:when test="$machine != ''"><xsl:value-of select="$machine"/>.<xsl:value-of select="$component"/></xsl:when>
        				<xsl:when test="@id"><xsl:value-of select="@id"/></xsl:when>
        				<xsl:otherwise><xsl:value-of select="$component"/></xsl:otherwise>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:variable name="componentURL">
        			<xsl:choose>
        				<xsl:when test="$component = 'machine'">url:'<xsl:value-of select="$url"/>'</xsl:when>
        				<xsl:otherwise/>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:variable name="name">
        			<xsl:choose>
        				<xsl:when test="name"><xsl:value-of select="name"/></xsl:when>
        				<xsl:when test="@name"><xsl:value-of select="@name"/></xsl:when>
        				<xsl:otherwise/>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:variable name="comment">
        			<xsl:choose>
        				<xsl:when test="@comment">,comment:'<xsl:value-of select="@comment"/>'</xsl:when>
        				<xsl:otherwise/>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:variable name="border">
        			<xsl:choose>
        				<xsl:when test="@border = '1'">border:1px solid black;border-radius:15px;</xsl:when>
        				<xsl:when test="@border">border:<xsl:value-of select="@border"/>;</xsl:when>
        				<xsl:otherwise/>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:variable name="left">
        			<xsl:choose>
        				<xsl:when test="@left">left:<xsl:value-of select="@left"/>;</xsl:when>
        				<xsl:otherwise/>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:variable name="top">
        			<xsl:choose>
        				<xsl:when test="@top">top:<xsl:value-of select="@top"/>;</xsl:when>
        				<xsl:otherwise/>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:variable name="width">
        			<xsl:choose>
        				<xsl:when test="@width">
        					<xsl:choose>
        						<xsl:when test="$left != '' or $top != ''">width:<xsl:value-of select="@width"/>;</xsl:when>
        						<xsl:otherwise>width:auto;max-width:<xsl:value-of select="@width"/>;</xsl:otherwise>
        					</xsl:choose>
        				</xsl:when>
        				<xsl:otherwise/>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:variable name="height">
        			<xsl:choose>
        				<xsl:when test="@height">height:<xsl:value-of select="@height"/>;</xsl:when>
        				<xsl:otherwise/>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:variable name="padding">
        			<xsl:choose>
        				<xsl:when test="@padding">padding:<xsl:value-of select="@padding"/>;</xsl:when>
        				<xsl:otherwise>
        					<xsl:if test="@padtop">padding-top:<xsl:value-of select="@padtop"/>;</xsl:if>
        					<xsl:if test="@padright">padding-right:<xsl:value-of select="@padright"/>;</xsl:if>
        					<xsl:if test="@padbottom">padding-bottom:<xsl:value-of select="@padbottom"/>;</xsl:if>
        					<xsl:if test="@padleft">padding-left:<xsl:value-of select="@padleft"/>;</xsl:if>
        				</xsl:otherwise>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:variable name="pos">
        			<xsl:choose>
        				<xsl:when test="@pos = 'left'">float:left;</xsl:when>
        				<xsl:when test="@pos = 'right'">float:right;</xsl:when>
        				<xsl:when test="@pos = 'center'">margin:0 auto;</xsl:when>
        				<xsl:when test="@pos">position:<xsl:value-of select="@pos"/>;</xsl:when>
        				<xsl:when test="$left != '' or $top != ''">position:relative;</xsl:when>
        				<xsl:otherwise/>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:variable name="style">
        			<xsl:if test="$component = 'machine'">overflow:auto;width:100%;</xsl:if>
        			<xsl:if test="@background">background-color:<xsl:value-of select="@background"/>;</xsl:if>
        			<xsl:if test="@style"><xsl:value-of select="@style"/></xsl:if>
        		</xsl:variable>
        		<xsl:variable name="componentClass">
        			<xsl:value-of select="$APPCLASS"/><xsl:text>-</xsl:text><xsl:value-of select="$component"/><xsl:text> </xsl:text><xsl:value-of select="$APPCLASS"/><xsl:text>-component</xsl:text>
        		</xsl:variable>
        		<div id="{$id}" class="{$componentClass}" style="{$width}{$height}{$pos}{$left}{$top}{$padding}" data-value="{$componentURL}">
        			<xsl:if test="$component = 'machine'">
        				<xsl:apply-templates select="name" mode="machine"/>
        			</xsl:if>
        			<xsl:if test="$component != 'machine'">
        				<xsl:apply-templates select="name" mode="component"/>
        			</xsl:if>
        			<div class="{$APPCLASS}-container" style="{$border}{$style}">
        				<xsl:if test="$component = 'machine'">
        					<xsl:apply-templates select="menu" mode="machine"/>
        				</xsl:if>
        				<xsl:if test="$component != 'machine'">
        					<xsl:apply-templates select="menu" mode="component"/>
        				</xsl:if>
        				<xsl:if test="$class != '' and $component != 'machine'">
        					<div class="{$APPCLASS}-{$class}-object" data-value="id:'{$id}',name:'{$name}'{$comment}{$parms}"> </div>
        				</xsl:if>
        				<xsl:if test="control">
        					<div class="{$APPCLASS}-controls">
        						<xsl:apply-templates select="control" mode="component"/>
        					</div>
        				</xsl:if>
        				<xsl:apply-templates>
        					<xsl:with-param name="machine" select="$machine"/>
        					<xsl:with-param name="machineState" select="$machineState"/>
        				</xsl:apply-templates>
        			</div>
        			<xsl:if test="$component = 'machine'">
        				<xsl:choose>
        					<xsl:when test="$url != ''"><div class="{$APPCLASS}-reference">[<a href="{$url}">XML</a>]</div></xsl:when>
        					<xsl:otherwise/>
        				</xsl:choose>
        				<div class="{$APPCLASS}-copyright">
        					<a href="http://{$SITEHOST}" target="_blank">PCjs</a> v<xsl:value-of select="$APPVERSION"/> © 2012-2015 by <a href="http://twitter.com/jeffpar" target="_blank">@jeffpar</a>
        				</div>
        				<div style="clear:both"> </div>
        			</xsl:if>
        		</div>
        	</xsl:template>
        
        	<xsl:template match="name" mode="machine">
        		<xsl:variable name="pos">
        			<xsl:choose>
        				<xsl:when test="@pos = 'center'">text-align:center;</xsl:when>
        				<xsl:otherwise/>
        			</xsl:choose>
        		</xsl:variable>
        		<h2 style="{$pos}"><xsl:apply-templates/></h2>
        	</xsl:template>
        
        	<xsl:template match="name" mode="component">
        		<div class="{$APPCLASS}-name"><xsl:apply-templates/></div>
        	</xsl:template>
        
        	<xsl:template match="menu" mode="component">
        		<xsl:apply-templates mode="component"/>
        	</xsl:template>
        
        	<xsl:template match="title" mode="component">
        		<div class="{$APPCLASS}-menu"><xsl:apply-templates/></div>
        	</xsl:template>
        
        	<xsl:template match="control" mode="component">
        		<xsl:variable name="type">
        			<xsl:text>type:'</xsl:text><xsl:value-of select="@type"/><xsl:text>'</xsl:text>
        		</xsl:variable>
        		<xsl:variable name="binding">
        			<xsl:text>binding:'</xsl:text><xsl:value-of select="@binding"/><xsl:text>'</xsl:text>
        		</xsl:variable>
        		<xsl:variable name="border">
        			<xsl:choose>
        				<xsl:when test="@border = '1'">border:1px solid black;</xsl:when>
        				<xsl:when test="@border">border:<xsl:value-of select="@border"/>;</xsl:when>
        				<xsl:otherwise/>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:variable name="width">
        			<xsl:choose>
        				<xsl:when test="@width">width:<xsl:value-of select="@width"/>;</xsl:when>
        				<xsl:otherwise/>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:variable name="height">
        			<xsl:choose>
        				<xsl:when test="@height">height:<xsl:value-of select="@height"/>;</xsl:when>
        				<xsl:otherwise/>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:variable name="left">
        			<xsl:choose>
        				<xsl:when test="@left">left:<xsl:value-of select="@left"/>;</xsl:when>
        				<xsl:otherwise/>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:variable name="top">
        			<xsl:choose>
        				<xsl:when test="@top">top:<xsl:value-of select="@top"/>;</xsl:when>
        				<xsl:otherwise/>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:variable name="padding">
        			<xsl:choose>
        				<xsl:when test="@padding">padding:<xsl:value-of select="@padding"/>;</xsl:when>
        				<xsl:otherwise>
        					<xsl:if test="@padtop">padding-top:<xsl:value-of select="@padtop"/>;</xsl:if>
        					<xsl:if test="@padright">padding-right:<xsl:value-of select="@padright"/>;</xsl:if>
        					<xsl:if test="@padbottom">padding-bottom:<xsl:value-of select="@padbottom"/>;</xsl:if>
        					<xsl:if test="@padleft">padding-left:<xsl:value-of select="@padleft"/>;</xsl:if>
        				</xsl:otherwise>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:variable name="pos">
        			<xsl:choose>
        				<xsl:when test="@pos = 'left'">float:left;</xsl:when>
        				<xsl:when test="@pos = 'right'">float:right;</xsl:when>
        				<xsl:when test="@pos = 'center'">margin:0 auto;</xsl:when>
        				<xsl:when test="@pos">position:<xsl:value-of select="@pos"/>;</xsl:when>
        				<xsl:when test="$left != '' or $top != ''">position:relative;</xsl:when>
        				<xsl:otherwise><xsl:if test="$left = ''">float:left;</xsl:if></xsl:otherwise>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:variable name="style">
        			<xsl:choose>
        				<xsl:when test="@style"><xsl:value-of select="@style"/></xsl:when>
        				<xsl:otherwise/>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:variable name="containerClass">
        			<xsl:if test="@type = 'container' and @class"><xsl:text> </xsl:text><xsl:value-of select="@class"/></xsl:if>
        		</xsl:variable>
        		<xsl:variable name="containerStyle">
        			<xsl:value-of select="$pos"/><xsl:value-of select="$left"/><xsl:value-of select="$top"/><xsl:value-of select="$padding"/>
        			<xsl:choose>
        				<xsl:when test="@type = 'container'"><xsl:value-of select="$border"/><xsl:value-of select="$width"/><xsl:value-of select="$height"/><xsl:value-of select="$style"/></xsl:when>
        				<xsl:otherwise/>
        			</xsl:choose>
        		</xsl:variable>
        		<div class="{$APPCLASS}-control{$containerClass}" style="{$containerStyle}">
        			<xsl:variable name="fontsize">
        				<xsl:choose>
        					<xsl:when test="@size = 'large' or @size = 'small'">font-size:<xsl:value-of select="@size"/>;</xsl:when>
        					<xsl:otherwise/>
        				</xsl:choose>
        			</xsl:variable>
        			<xsl:variable name="subClass">
        				<xsl:if test="@label"><xsl:text> </xsl:text><xsl:value-of select="$APPCLASS"/><xsl:text>-label</xsl:text></xsl:if>
        			</xsl:variable>
        			<xsl:variable name="labelWidth">
        				<xsl:if test="@labelwidth">width:<xsl:value-of select="@labelwidth"/>;</xsl:if>
        			</xsl:variable>
        			<xsl:variable name="labelStyle">
        				<xsl:choose>
        					<xsl:when test="@labelstyle"><xsl:value-of select="@labelstyle"/></xsl:when>
        					<xsl:otherwise>text-align:right;</xsl:otherwise>
        				</xsl:choose>
        			</xsl:variable>
        			<xsl:if test="@label">
        				<xsl:if test="not(@labelpos) or @labelpos = 'left'">
        					<div class="{$APPCLASS}-label" style="{$labelWidth}{$labelStyle}"><xsl:value-of select="@label"/></div>
        				</xsl:if>
        			</xsl:if>
        			<xsl:choose>
        				<xsl:when test="@type = 'canvas'">
        					<canvas class="{$APPCLASS}-binding {$APPCLASS}-canvas" width="{@width}" height="{@height}" style="-webkit-user-select:none;{$border}{$fontsize}{$style}" data-value="{$type},{$binding}"><xsl:apply-templates/></canvas>
        				</xsl:when>
        				<xsl:when test="@type = 'button'">
        					<button class="{$APPCLASS}-binding" style="-webkit-user-select:none;{$border}{$width}{$height}{$fontsize}{$style}" data-value="{$type},{$binding}"><xsl:apply-templates/></button>
        				</xsl:when>
        				<xsl:when test="@type = 'list'">
        					<select class="{$APPCLASS}-binding" style="{$border}{$width}{$height}{$fontsize}{$style}" data-value="{$type},{$binding}">
        						<xsl:apply-templates select="disk|app|manifest" mode="component"/>
        					</select>
        				</xsl:when>
        				<xsl:when test="@type = 'text'">
        					<input class="{$APPCLASS}-binding" type="text" style="{$border}{$width}{$height}{$style}" data-value="{$type},{$binding}" value="{.}" autocapitalize="off" autocorrect="off"/>
        				</xsl:when>
        				<xsl:when test="@type = 'submit'">
        					<input class="{$APPCLASS}-binding" type="submit" style="{$border}{$fontsize}{$style}" data-value="{$type},{$binding}" value="{.}"/>
        				</xsl:when>
        				<xsl:when test="@type = 'textarea'">
        					<textarea class="{$APPCLASS}-binding" style="{$border}{$width}{$height}{$style}" data-value="{$type},{$binding}" readonly="readonly"> </textarea>
        				</xsl:when>
        				<xsl:when test="@type = 'heading'">
        					<div><xsl:value-of select="."/></div>
        				</xsl:when>
        				<xsl:when test="@type = 'file'">
        					<form class="{$APPCLASS}-binding" data-value="{$type},{$binding}">
        						<fieldset class="{$APPCLASS}-fieldset">
        							<input type="file"/>
        							<input type="submit" value="Mount" disabled="true"/>
        						</fieldset>
        					</form>
        				</xsl:when>
        				<xsl:when test="@type = 'led'">
        					<div class="{$APPCLASS}-binding {$APPCLASS}-{@type}" data-value="{$type},{$binding}"><xsl:value-of select="."/></div>
        				</xsl:when>
        				<xsl:when test="@type = 'separator'">
        					<hr/>
        				</xsl:when>
        				<xsl:when test="@type = 'container'">
        					<xsl:apply-templates mode="component"/>
        				</xsl:when>
        				<xsl:when test="not(@type)">
        					<div style="clear:both"> </div>
        				</xsl:when>
        				<xsl:otherwise>
        					<div class="{$APPCLASS}-binding{$subClass} {$APPCLASS}-{@type}" style="-webkit-user-select:none;{$border}{$width}{$height}{$fontsize}{$style}" data-value="{$type},{$binding}"><xsl:apply-templates/></div>
        				</xsl:otherwise>
        			</xsl:choose>
        			<xsl:if test="@label">
        				<xsl:if test="@labelpos = 'right'">
        					<div class="{$APPCLASS}-label" style="{$labelWidth}{$labelStyle}"><xsl:value-of select="@label"/></div>
        				</xsl:if>
        				<div style="clear:both"> </div>
        			</xsl:if>
        		</div>
        	</xsl:template>
        
        	<xsl:template match="disk[@ref]" mode="component">
        		<xsl:variable name="componentFile"><xsl:value-of select="$rootDir"/><xsl:value-of select="@ref"/></xsl:variable>
        		<xsl:apply-templates select="document($componentFile)/disk" mode="component"/>
        	</xsl:template>
        
        	<xsl:template match="disk[not(@ref)]" mode="component">
        		<xsl:variable name="desc">
        			<xsl:if test="@desc">
        				<xsl:text>desc:'</xsl:text><xsl:value-of select="@desc"/><xsl:text>'</xsl:text>
        				<xsl:if test="@href">
        					<xsl:text>,href:'</xsl:text><xsl:value-of select="@href"/><xsl:text>'</xsl:text>
        				</xsl:if>
        			</xsl:if>
        		</xsl:variable>
        		<option value="{@path}" data-value="{$desc}"><xsl:if test="name"><xsl:value-of select="name"/></xsl:if><xsl:if test="not(name)"><xsl:value-of select="."/></xsl:if></option>
        	</xsl:template>
        
        	<xsl:template match="app[@ref]" mode="component">
        		<xsl:variable name="componentFile"><xsl:value-of select="$rootDir"/><xsl:value-of select="@ref"/></xsl:variable>
        		<xsl:apply-templates select="document($componentFile)/app" mode="component"/>
        	</xsl:template>
        
        	<xsl:template match="app[not(@ref)]" mode="component">
        		<xsl:variable name="desc">
        			<xsl:if test="@desc">
        				<xsl:text>desc:'</xsl:text><xsl:value-of select="@desc"/><xsl:text>'</xsl:text>
        				<xsl:if test="@href">
        					<xsl:text>,href:'</xsl:text><xsl:value-of select="@href"/><xsl:text>'</xsl:text>
        				</xsl:if>
        			</xsl:if>
        		</xsl:variable>
        		<xsl:variable name="path">
        			<xsl:if test="@path"><xsl:value-of select="@path"/></xsl:if>
        		</xsl:variable>
        		<xsl:variable name="files">
        			<xsl:for-each select="file"><xsl:if test="position() = 1"><xsl:value-of select="$path"/></xsl:if><xsl:value-of select="@name"/><xsl:if test="position() != last()">;</xsl:if></xsl:for-each>
        		</xsl:variable>
        		<option value="{$files}" data-value="{$desc}"><xsl:value-of select="@name"/></option>
        	</xsl:template>
        
        	<xsl:template match="manifest[@ref]" mode="component">
        		<xsl:variable name="componentFile"><xsl:value-of select="$rootDir"/><xsl:value-of select="@ref"/></xsl:variable>
        		<xsl:apply-templates select="document($componentFile)/manifest" mode="component">
        			<xsl:with-param name="disk"><xsl:value-of select="@disk"/></xsl:with-param>
        		</xsl:apply-templates>
        	</xsl:template>
        
        	<xsl:template match="manifest[not(@ref)]" mode="component">
        		<xsl:param name="disk"><xsl:value-of select="@disk"/></xsl:param>
        		<xsl:if test="$disk != ''">
        			<xsl:variable name="prefix">
        				<xsl:if test="title/@prefix"><xsl:value-of select="title/@prefix"/><xsl:text>: </xsl:text></xsl:if>
        			</xsl:variable>
        			<xsl:for-each select="disk">
        				<xsl:if test="$disk = @id or $disk = '*'">
        					<xsl:variable name="name">
        						<xsl:choose>
        							<xsl:when test="name"><xsl:value-of select="$prefix"/><xsl:value-of select="name"/></xsl:when>
        							<xsl:when test="normalize-space(./text()) != ''">
        								<xsl:value-of select="$prefix"/><xsl:value-of select="normalize-space(./text())"/>
        							</xsl:when>
        							<xsl:otherwise>
        								<xsl:value-of select="../title"/><xsl:if test="../version != ''"><xsl:text> </xsl:text><xsl:value-of select="../version"/></xsl:if>
        							</xsl:otherwise>
        						</xsl:choose>
        					</xsl:variable>
        					<xsl:variable name="link">
        						<xsl:if test="link">
        							<xsl:text>desc:'</xsl:text><xsl:value-of select="link"/><xsl:text>'</xsl:text>
        							<xsl:if test="link/@href">
        								<xsl:text>,href:'</xsl:text><xsl:value-of select="link/@href"/><xsl:text>'</xsl:text>
        							</xsl:if>
        						</xsl:if>
        					</xsl:variable>
        					<xsl:if test="@href">
        						<option value="{@href}" data-value="{$link}"><xsl:value-of select="$name"/></option>
        					</xsl:if>
        					<xsl:if test="not(@href)">
        						<xsl:variable name="dir">
        							<xsl:if test="@dir"><xsl:value-of select="@dir"/></xsl:if>
        						</xsl:variable>
        						<xsl:variable name="files">
        							<xsl:for-each select="file"><xsl:if test="position() = 1"><xsl:value-of select="$dir"/></xsl:if><xsl:value-of select="@dir"/><xsl:value-of select="."/><xsl:if test="position() != last()">;</xsl:if></xsl:for-each>
        						</xsl:variable>
        						<option value="{$files}" data-value="{$link}"><xsl:value-of select="$name"/></option>
        					</xsl:if>
        				</xsl:if>
        			</xsl:for-each>
        		</xsl:if>
        	</xsl:template>
        
        	<xsl:template match="name">
        	</xsl:template>
        
        	<xsl:template match="title">
        	</xsl:template>
        
        	<xsl:template match="control">
        	</xsl:template>
        
        	<xsl:template match="cpu[@ref]">
        		<xsl:param name="machine" select="''"/>
        		<xsl:variable name="componentFile"><xsl:value-of select="$rootDir"/><xsl:value-of select="@ref"/></xsl:variable>
        		<xsl:apply-templates select="document($componentFile)/cpu"><xsl:with-param name="machine" select="$machine"/></xsl:apply-templates>
        	</xsl:template>
        
        	<xsl:template match="cpu[not(@ref)]">
        		<xsl:param name="machine" select="''"/>
        		<xsl:variable name="model">
        			<xsl:choose>
        				<xsl:when test="@model"><xsl:value-of select="@model"/></xsl:when>
        				<xsl:otherwise>8088</xsl:otherwise>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:variable name="cycles">
        			<xsl:choose>
        				<xsl:when test="@cycles"><xsl:value-of select="@cycles"/></xsl:when>
        				<xsl:otherwise>0</xsl:otherwise>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:variable name="multiplier">
        			<xsl:choose>
        				<xsl:when test="@multiplier"><xsl:value-of select="@multiplier"/></xsl:when>
        				<xsl:otherwise>1</xsl:otherwise>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:variable name="autoStart">
        			<xsl:choose>
        				<xsl:when test="@autostart"><xsl:value-of select="@autostart"/></xsl:when>
        				<xsl:otherwise>null</xsl:otherwise>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:variable name="csStart">
        			<xsl:choose>
        				<xsl:when test="@csstart"><xsl:value-of select="@csstart"/></xsl:when>
        				<xsl:otherwise>-1</xsl:otherwise>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:variable name="csInterval">
        			<xsl:choose>
        				<xsl:when test="@csinterval"><xsl:value-of select="@csinterval"/></xsl:when>
        				<xsl:otherwise>-1</xsl:otherwise>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:variable name="csStop">
        			<xsl:choose>
        				<xsl:when test="@csstop"><xsl:value-of select="@csstop"/></xsl:when>
        				<xsl:otherwise>-1</xsl:otherwise>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:call-template name="component">
        			<xsl:with-param name="machine" select="$machine"/>
        			<xsl:with-param name="class" select="'cpu'"/>
        			<xsl:with-param name="parms">,model:<xsl:value-of select="$model"/>,cycles:<xsl:value-of select="$cycles"/>,multiplier:<xsl:value-of select="$multiplier"/>,autoStart:<xsl:value-of select="$autoStart"/>,csStart:<xsl:value-of select="$csStart"/>,csInterval:<xsl:value-of select="$csInterval"/>,csStop:<xsl:value-of select="$csStop"/></xsl:with-param>
        		</xsl:call-template>
        	</xsl:template>
        
        	<xsl:template match="chipset[@ref]">
        		<xsl:param name="machine" select="''"/>
        		<xsl:variable name="componentFile"><xsl:value-of select="$rootDir"/><xsl:value-of select="@ref"/></xsl:variable>
        		<xsl:apply-templates select="document($componentFile)/chipset"><xsl:with-param name="machine" select="$machine"/></xsl:apply-templates>
        	</xsl:template>
        
        	<xsl:template match="chipset[not(@ref)]">
        		<xsl:param name="machine" select="''"/>
        		<xsl:variable name="model">
        			<xsl:choose>
        				<xsl:when test="@model"><xsl:value-of select="@model"/></xsl:when>
        				<xsl:otherwise>5150</xsl:otherwise>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:variable name="sw1">
        			<xsl:choose>
        				<xsl:when test="@sw1"><xsl:value-of select="@sw1"/></xsl:when>
        				<xsl:otherwise/>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:variable name="sw2">
        			<xsl:choose>
        				<xsl:when test="@sw2"><xsl:value-of select="@sw2"/></xsl:when>
        				<xsl:otherwise/>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:variable name="sound">
        			<xsl:choose>
        				<xsl:when test="@sound"><xsl:value-of select="@sound"/></xsl:when>
        				<xsl:otherwise>true</xsl:otherwise>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:variable name="scaletimers">
        			<xsl:choose>
        				<xsl:when test="@scaletimers"><xsl:value-of select="@scaletimers"/></xsl:when>
        				<xsl:otherwise>false</xsl:otherwise>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:variable name="floppies">
        			<xsl:choose>
        				<xsl:when test="@floppies"><xsl:value-of select="@floppies"/></xsl:when>
        				<xsl:otherwise>{}</xsl:otherwise>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:variable name="monitor">
        			<xsl:choose>
        				<xsl:when test="@monitor"><xsl:value-of select="@monitor"/></xsl:when>
        				<xsl:otherwise/>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:variable name="rtcdate">
        			<xsl:choose>
        				<xsl:when test="@rtcdate"><xsl:value-of select="@rtcdate"/></xsl:when>
        				<xsl:otherwise/>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:call-template name="component">
        			<xsl:with-param name="machine" select="$machine"/>
        			<xsl:with-param name="class">chipset</xsl:with-param>
        			<xsl:with-param name="parms">,model:'<xsl:value-of select="$model"/>',scaleTimers:<xsl:value-of select="$scaletimers"/>,sw1:'<xsl:value-of select="$sw1"/>',sw2:'<xsl:value-of select="$sw2"/>',sound:<xsl:value-of select="$sound"/>,floppies:<xsl:value-of select="$floppies"/>,monitor:'<xsl:value-of select="$monitor"/>',rtcDate:'<xsl:value-of select="$rtcdate"/>'</xsl:with-param>
        		</xsl:call-template>
        	</xsl:template>
        
        	<xsl:template match="keyboard[@ref]">
        		<xsl:param name="machine" select="''"/>
        		<xsl:variable name="componentFile"><xsl:value-of select="$rootDir"/><xsl:value-of select="@ref"/></xsl:variable>
        		<xsl:apply-templates select="document($componentFile)/keyboard"><xsl:with-param name="machine" select="$machine"/></xsl:apply-templates>
        	</xsl:template>
        
        	<xsl:template match="keyboard[not(@ref)]">
        		<xsl:param name="machine" select="''"/>
        		<xsl:variable name="model">
        			<xsl:choose>
        				<xsl:when test="@model"><xsl:value-of select="@model"/></xsl:when>
        				<xsl:otherwise/>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:call-template name="component">
        			<xsl:with-param name="machine" select="$machine"/>
        			<xsl:with-param name="class">keyboard</xsl:with-param>
        			<xsl:with-param name="parms">,model:'<xsl:value-of select="$model"/>'</xsl:with-param>
        		</xsl:call-template>
        	</xsl:template>
        
        	<xsl:template match="serial[@ref]">
        		<xsl:param name="machine" select="''"/>
        		<xsl:variable name="componentFile"><xsl:value-of select="$rootDir"/><xsl:value-of select="@ref"/></xsl:variable>
        		<xsl:apply-templates select="document($componentFile)/serial"><xsl:with-param name="machine" select="$machine"/></xsl:apply-templates>
        	</xsl:template>
        
        	<xsl:template match="serial[not(@ref)]">
        		<xsl:param name="machine" select="''"/>
        		<xsl:variable name="adapter">
        			<xsl:choose>
        				<xsl:when test="@adapter"><xsl:value-of select="@adapter"/></xsl:when>
        				<xsl:otherwise>0</xsl:otherwise>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:variable name="binding">
        			<xsl:choose>
        				<xsl:when test="@binding"><xsl:value-of select="@binding"/></xsl:when>
        				<xsl:otherwise/>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:call-template name="component">
        			<xsl:with-param name="machine" select="$machine"/>
        			<xsl:with-param name="class">serial</xsl:with-param>
        			<xsl:with-param name="parms">,adapter:<xsl:value-of select="$adapter"/>,binding:'<xsl:value-of select="$binding"/>'</xsl:with-param>
        		</xsl:call-template>
        	</xsl:template>
        
        	<xsl:template match="mouse[@ref]">
        		<xsl:param name="machine" select="''"/>
        		<xsl:variable name="componentFile"><xsl:value-of select="$rootDir"/><xsl:value-of select="@ref"/></xsl:variable>
        		<xsl:apply-templates select="document($componentFile)/mouse"><xsl:with-param name="machine" select="$machine"/></xsl:apply-templates>
        	</xsl:template>
        
        	<xsl:template match="mouse[not(@ref)]">
        		<xsl:param name="machine" select="''"/>
        		<xsl:variable name="serial">
        			<xsl:choose>
        				<xsl:when test="@serial"><xsl:value-of select="@serial"/></xsl:when>
        				<xsl:otherwise/>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:call-template name="component">
        			<xsl:with-param name="machine" select="$machine"/>
        			<xsl:with-param name="class">mouse</xsl:with-param>
        			<xsl:with-param name="parms">,serial:'<xsl:value-of select="$serial"/>'</xsl:with-param>
        		</xsl:call-template>
        	</xsl:template>
        
        	<xsl:template match="fdc[@ref]">
        		<xsl:param name="machine" select="''"/>
        		<xsl:variable name="componentFile"><xsl:value-of select="$rootDir"/><xsl:value-of select="@ref"/></xsl:variable>
        		<xsl:apply-templates select="document($componentFile)/fdc">
        			<xsl:with-param name="machine" select="$machine"/>
        			<xsl:with-param name="mount" select="@automount"/>
        		</xsl:apply-templates>
        	</xsl:template>
        
        	<xsl:template match="fdc[not(@ref)]">
        		<xsl:param name="machine" select="''"/>
        		<xsl:param name="mount" select="''"/>
        		<xsl:variable name="automount">
        			<xsl:choose>
        				<xsl:when test="$mount != ''"><xsl:value-of select="$mount"/></xsl:when>
        				<xsl:otherwise><xsl:value-of select="@automount"/></xsl:otherwise>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:call-template name="component">
        			<xsl:with-param name="machine" select="$machine"/>
        			<xsl:with-param name="class">fdc</xsl:with-param>
        			<xsl:with-param name="parms">,autoMount:'<xsl:value-of select="$automount"/>'</xsl:with-param>
        		</xsl:call-template>
        	</xsl:template>
        
        	<xsl:template match="hdc[@ref]">
        		<xsl:param name="machine" select="''"/>
        		<xsl:variable name="componentFile"><xsl:value-of select="$rootDir"/><xsl:value-of select="@ref"/></xsl:variable>
        		<xsl:apply-templates select="document($componentFile)/hdc"><xsl:with-param name="machine" select="$machine"/></xsl:apply-templates>
        	</xsl:template>
        
        	<xsl:template match="hdc[not(@ref)]">
        		<xsl:param name="machine" select="''"/>
        		<xsl:variable name="drives">
        			<xsl:choose>
        				<xsl:when test="@drives"><xsl:value-of select="@drives"/></xsl:when>
        				<xsl:otherwise/>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:variable name="type">
        			<xsl:choose>
        				<xsl:when test="@type"><xsl:value-of select="@type"/></xsl:when>
        				<xsl:otherwise>xt</xsl:otherwise>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:call-template name="component">
        			<xsl:with-param name="machine" select="$machine"/>
        			<xsl:with-param name="class">hdc</xsl:with-param>
        			<xsl:with-param name="parms">,drives:'<xsl:value-of select="$drives"/>',type:'<xsl:value-of select="$type"/>'</xsl:with-param>
        		</xsl:call-template>
        	</xsl:template>
        
        	<xsl:template match="rom[@ref]">
        		<xsl:param name="machine" select="''"/>
        		<xsl:variable name="componentFile"><xsl:value-of select="$rootDir"/><xsl:value-of select="@ref"/></xsl:variable>
        		<xsl:apply-templates select="document($componentFile)/rom"><xsl:with-param name="machine" select="$machine"/></xsl:apply-templates>
        	</xsl:template>
        
        	<xsl:template match="rom[not(@ref)]">
        		<xsl:param name="machine" select="''"/>
        		<xsl:variable name="addr">
        			<xsl:choose>
        				<xsl:when test="@addr"><xsl:value-of select="@addr"/></xsl:when>
        				<xsl:otherwise>0</xsl:otherwise>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:variable name="size">
        			<xsl:choose>
        				<xsl:when test="@size"><xsl:value-of select="@size"/></xsl:when>
        				<xsl:otherwise>0</xsl:otherwise>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:variable name="alias">
        			<xsl:choose>
        				<xsl:when test="@alias"><xsl:value-of select="@alias"/></xsl:when>
        				<xsl:otherwise>null</xsl:otherwise>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:variable name="file">
        			<xsl:choose>
        				<xsl:when test="@file"><xsl:value-of select="@file"/></xsl:when>
        				<xsl:otherwise/>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:variable name="notify">
        			<xsl:choose>
        				<xsl:when test="@notify"><xsl:value-of select="@notify"/></xsl:when>
        				<xsl:otherwise/>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:call-template name="component">
        			<xsl:with-param name="machine" select="$machine"/>
        			<xsl:with-param name="class">rom</xsl:with-param>
        			<xsl:with-param name="parms">,addr:<xsl:value-of select="$addr"/>,size:<xsl:value-of select="$size"/>,alias:<xsl:value-of select="$alias"/>,file:'<xsl:value-of select="$file"/>',notify:'<xsl:value-of select="$notify"/>'</xsl:with-param>
        		</xsl:call-template>
        	</xsl:template>
        
        	<xsl:template match="ram[@ref]">
        		<xsl:param name="machine" select="''"/>
        		<xsl:variable name="componentFile"><xsl:value-of select="$rootDir"/><xsl:value-of select="@ref"/></xsl:variable>
        		<xsl:apply-templates select="document($componentFile)/ram"><xsl:with-param name="machine" select="$machine"/></xsl:apply-templates>
        	</xsl:template>
        
        	<xsl:template match="ram[not(@ref)]">
        		<xsl:param name="machine" select="''"/>
        		<xsl:variable name="addr">
        			<xsl:choose>
        				<xsl:when test="@addr"><xsl:value-of select="@addr"/></xsl:when>
        				<xsl:otherwise>0</xsl:otherwise>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:variable name="size">
        			<xsl:choose>
        				<xsl:when test="@size"><xsl:value-of select="@size"/></xsl:when>
        				<xsl:otherwise>0</xsl:otherwise>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:variable name="test">
        			<xsl:choose>
        				<xsl:when test="@test"><xsl:value-of select="@test"/></xsl:when>
        				<xsl:otherwise>true</xsl:otherwise>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:call-template name="component">
        			<xsl:with-param name="machine" select="$machine"/>
        			<xsl:with-param name="class">ram</xsl:with-param>
        			<xsl:with-param name="parms">,addr:<xsl:value-of select="$addr"/>,size:<xsl:value-of select="$size"/>,test:<xsl:value-of select="$test"/></xsl:with-param>
        		</xsl:call-template>
        	</xsl:template>
        
        	<xsl:template match="video[@ref]">
        		<xsl:param name="machine" select="''"/>
        		<xsl:variable name="componentFile"><xsl:value-of select="$rootDir"/><xsl:value-of select="@ref"/></xsl:variable>
        		<xsl:apply-templates select="document($componentFile)/video"><xsl:with-param name="machine" select="$machine"/></xsl:apply-templates>
        	</xsl:template>
        
        	<xsl:template match="video[not(@ref)]">
        		<xsl:param name="machine" select="''"/>
        		<xsl:variable name="model">
        			<xsl:choose>
        				<xsl:when test="@model"><xsl:value-of select="@model"/></xsl:when>
        				<xsl:otherwise/>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:variable name="mode">
        			<xsl:choose>
        				<xsl:when test="@mode"><xsl:value-of select="@mode"/></xsl:when>
        				<xsl:otherwise>7</xsl:otherwise>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:variable name="screenWidth">
        			<xsl:choose>
        				<xsl:when test="@screenwidth"><xsl:value-of select="@screenwidth"/></xsl:when>
        				<xsl:otherwise>256</xsl:otherwise>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:variable name="screenHeight">
        			<xsl:choose>
        				<xsl:when test="@screenheight"><xsl:value-of select="@screenheight"/></xsl:when>
        				<xsl:otherwise>224</xsl:otherwise>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:variable name="memory">
        			<xsl:choose>
        				<xsl:when test="@memory"><xsl:value-of select="@memory"/></xsl:when>
        				<xsl:otherwise>0</xsl:otherwise>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:variable name="switches">
        			<xsl:choose>
        				<xsl:when test="@switches"><xsl:value-of select="@switches"/></xsl:when>
        				<xsl:otherwise/>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:variable name="scale">
        			<xsl:choose>
        				<xsl:when test="@scale"><xsl:value-of select="@scale"/></xsl:when>
        				<xsl:otherwise>false</xsl:otherwise>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:variable name="charCols">
        			<xsl:choose>
        				<xsl:when test="@cols"><xsl:value-of select="@cols"/></xsl:when>
        				<xsl:otherwise>80</xsl:otherwise>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:variable name="charRows">
        			<xsl:choose>
        				<xsl:when test="@rows"><xsl:value-of select="@rows"/></xsl:when>
        				<xsl:otherwise>25</xsl:otherwise>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:variable name="fontROM">
        			<xsl:choose>
        				<xsl:when test="@charset"><xsl:value-of select="@charset"/></xsl:when>
        				<xsl:when test="@fontrom"><xsl:value-of select="@fontrom"/></xsl:when>
        				<xsl:otherwise/>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:variable name="screenColor">
        			<xsl:choose>
        				<xsl:when test="@screencolor"><xsl:value-of select="@screencolor"/></xsl:when>
        				<xsl:otherwise>black</xsl:otherwise>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:variable name="touchScreen">
        			<xsl:choose>
        				<xsl:when test="@touchscreen"><xsl:value-of select="@touchscreen"/></xsl:when>
        				<xsl:otherwise>false</xsl:otherwise>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:variable name="autoLock">
        			<xsl:choose>
        				<xsl:when test="@autolock"><xsl:value-of select="@autolock"/></xsl:when>
        				<xsl:otherwise>false</xsl:otherwise>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:call-template name="component">
        			<xsl:with-param name="machine" select="$machine"/>
        			<xsl:with-param name="class">video</xsl:with-param>
        			<xsl:with-param name="parms">,model:'<xsl:value-of select="$model"/>',mode:<xsl:value-of select="$mode"/>,screenWidth:<xsl:value-of select="$screenWidth"/>,screenHeight:<xsl:value-of select="$screenHeight"/>,memory:<xsl:value-of select="$memory"/>,switches:'<xsl:value-of select="$switches"/>',scale:<xsl:value-of select="$scale"/>,charCols:<xsl:value-of select="$charCols"/>,charRows:<xsl:value-of select="$charRows"/>,fontROM:'<xsl:value-of select="$fontROM"/>',screenColor:'<xsl:value-of select="$screenColor"/>',touchScreen:<xsl:value-of select="$touchScreen"/>,autoLock:<xsl:value-of select="$autoLock"/></xsl:with-param>
        		</xsl:call-template>
        	</xsl:template>
        
        	<xsl:template match="debugger[@ref]">
        		<xsl:param name="machine" select="''"/>
        		<xsl:variable name="componentFile"><xsl:value-of select="$rootDir"/><xsl:value-of select="@ref"/></xsl:variable>
        		<xsl:apply-templates select="document($componentFile)/debugger"><xsl:with-param name="machine" select="$machine"/></xsl:apply-templates>
        	</xsl:template>
        
        	<xsl:template match="debugger[not(@ref)]">
        		<xsl:param name="machine" select="''"/>
        		<xsl:variable name="commands">
        			<xsl:choose>
        				<xsl:when test="@commands"><xsl:value-of select="@commands"/></xsl:when>
        				<xsl:otherwise/>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:variable name="messages">
        			<xsl:choose>
        				<xsl:when test="@messages"><xsl:value-of select="@messages"/></xsl:when>
        				<xsl:otherwise/>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:call-template name="component">
        			<xsl:with-param name="machine" select="$machine"/>
        			<xsl:with-param name="class">debugger</xsl:with-param>
        			<xsl:with-param name="parms">,commands:'<xsl:value-of select="$commands"/>',messages:'<xsl:value-of select="$messages"/>'</xsl:with-param>
        		</xsl:call-template>
        	</xsl:template>
        
        	<xsl:template match="panel[@ref]">
        		<xsl:param name="machine" select="''"/>
        		<xsl:variable name="componentFile"><xsl:value-of select="$rootDir"/><xsl:value-of select="@ref"/></xsl:variable>
        		<xsl:apply-templates select="document($componentFile)/panel"><xsl:with-param name="machine" select="$machine"/></xsl:apply-templates>
        	</xsl:template>
        
        	<xsl:template match="panel[not(@ref)]">
        		<xsl:param name="machine" select="''"/>
        		<xsl:call-template name="component">
        			<xsl:with-param name="machine" select="$machine"/>
        			<xsl:with-param name="class">panel</xsl:with-param>
        		</xsl:call-template>
        	</xsl:template>
        
        	<xsl:template match="computer[@ref]">
        		<xsl:param name="machine" select="''"/>
        		<xsl:param name="machineState" select="''"/>
        		<xsl:variable name="componentFile"><xsl:value-of select="$rootDir"/><xsl:value-of select="@ref"/></xsl:variable>
        		<xsl:apply-templates select="document($componentFile)/computer">
        			<xsl:with-param name="machine" select="$machine"/>
        			<xsl:with-param name="machineState" select="$machineState"/>
        		</xsl:apply-templates>
        	</xsl:template>
        
        	<xsl:template match="computer[not(@ref)]">
        		<xsl:param name="machine" select="''"/>
        		<xsl:param name="machineState" select="''"/>
        		<xsl:variable name="busWidth">
        			<xsl:choose>
        				<xsl:when test="@buswidth"><xsl:value-of select="@buswidth"/></xsl:when>
        				<xsl:otherwise>20</xsl:otherwise>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:variable name="resume">
        			<xsl:choose>
        				<xsl:when test="@resume and $machineState = ''"><xsl:value-of select="@resume"/></xsl:when>
        				<xsl:otherwise>0</xsl:otherwise>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:variable name="state">
        			<xsl:choose>
        				<xsl:when test="$machineState != ''"><xsl:value-of select="$machineState"/></xsl:when>
        				<xsl:when test="@state"><xsl:value-of select="@state"/></xsl:when>
        				<xsl:otherwise/>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:call-template name="component">
        			<xsl:with-param name="machine" select="$machine"/>
        			<xsl:with-param name="class">computer</xsl:with-param>
        			<xsl:with-param name="parms">,busWidth:<xsl:value-of select="$busWidth"/>,resume:<xsl:value-of select="$resume"/>,state:'<xsl:value-of select="$state"/>'</xsl:with-param>
        		</xsl:call-template>
        	</xsl:template>
        
        </xsl:stylesheet>
        
      • document.css
        @CHARSET "UTF-8";
        
        .page {
            margin: 2% 2%;
            padding: 2% 2%;
            min-width: 30em;
            overflow: auto;
            font-size: large;
            font-family: Helvetica, Arial, sans-serif;
            background: #303030;
            color: #ccc;
        
        }
        .page-header {
        }
        .page-header-title {
        	text-align: center;
        
        }
        .page a {
            color: #7fc07f;
            text-decoration: none;
        }
        a.footlink, a.paralink {
        	text-decoration: none;
        }
        a.footlink:link, a.paralink:link {
        	color: blue;
        }
        a.footlink:visited, a.paralink:visited {
        	color: blue;
        }
        .galleryitem {
        	float: left;
        	width: 200px;
        }
        .item {
        	float: left;
        	width: 2em;
        	text-indent: 1em;
        }
        .list {
        	margin-left: 3em;
        	text-indent: 0;
        	text-align: justify;
        }
        ul {
        	list-style: none;
        }
        div.pnumber {
        	float: left;
        	width: 2em;
        	text-indent: 1em;
        }
        div.pitem {
        	margin-left: 10em;
        }
        p.indent, .justified p {
        	text-indent: 2em;
        	text-align: justify;
        	line-height: 1.5em;
        }
        p.noindent {
        	text-indent: 0;
        	text-align: justify;
        }
        p.center, .center {
        	text-align: center;
        }
        li.para {
        	margin-top: 1em;
        	margin-bottom: 1em;
        }
        .left {
        	text-align: left;
        }
        .right {
        	text-align: right;
        }
        blockquote.tag {
        	font-size: small;
        	font-family: Monaco, Fixed, monospace;
        	margin-top: 0;
        	margin-bottom: 0;
        }
        .blockquote {
        	padding-left: 1em;
        	text-indent: 0;
        	text-align: justify;
        }
        .italics {
        	font-style: italic;
        }
        .medium {
        	font-size: medium;
        }
        .small {
        	font-size: x-small;
        }
        .smallcaps {
        	font-variant: small-caps;
        }
        .strike {
        	text-decoration: line-through;
        }
        .summation, .bracelist {
        	display: inline-block;
        	position: relative;
        	vertical-align: middle;
        	text-align: center;
        	margin-bottom: 0.5ex;
        	text-indent: 0;
        }
        .bracelist-symbol {
        	font-size: 3em;
        	vertical-align: -40%;
        }
        .summation .summation-lower, .summation .summation-upper, .bracelist-item {
        	display: block;
        	font-size: 75%;
        	text-align: center;
        }
        .summation .summation-upper {
        	margin-bottom: 0;
        	margin-left: 0.8ex;
        	font-style: italic;
        }
        .summation .summation-lower{
        	margin-bottom: -0.6ex;
        	font-style: italic;
        }
        .summation .summation-symbol {
        	font-size: 2em;
        }
        p sup {
        	vertical-align: baseline;
        	position: relative;
        	bottom: .5em;
        	font-size: small;
        }
        p sub {
        	vertical-align: baseline;
        	position: relative;
        	bottom: -.5em;
        	font-size: small;
        }
        .footnote {
        	font-size: medium;
        	text-indent: 1em;
        	text-align: justify;
        	margin-top: .5em;
        }
        .image-right {
        	float: right;
        	margin-left: 1em;
        	margin-top: 1em;
        	margin-bottom: 1em;
        }
        .image-caption {
        	font-size: small;
        	text-align: center;
        }
      • document.xsl
        <?xml version="1.0" encoding="UTF-8"?>
        <!-- author="Jeff Parsons (@jeffpar)" website="http://www.pcjs.org/" created="2012-05-05" modified="2014-02-23" license="http://www.gnu.org/licenses/gpl.html" -->
        <!DOCTYPE xsl:stylesheet [
        	<!ENTITY nbsp "&#160;"> <!ENTITY ne "&#8800;"> <!ENTITY le "&#8804;"> <!ENTITY ge "&#8805;">
        	<!ENTITY times "&#215;"> <!ENTITY sdot "&#8901;"> <!ENTITY divide "&#247;">
        	<!ENTITY copy "&#169;"> <!ENTITY Sigma "&#931;"> <!ENTITY sigma "&#963;"> <!ENTITY sum "&#8721;"> <!ENTITY lbrace "&#123;">
        ]>
        <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
        
        	<xsl:template name="documentStyles">
        		<link rel="stylesheet" type="text/css" href="/versions/pcjs/1.18.3/document.css"/>
        	</xsl:template>
        
        	<xsl:template match="title">
        		<h1><xsl:apply-templates/></h1>
        	</xsl:template>
        
        	<xsl:template name="p">
        		<xsl:if test="@id">
        			<a name="{@id}"></a>
        		</xsl:if>
        		<xsl:choose>
        			<xsl:when test="not(@class)">
        				<p><xsl:apply-templates/></p>
        			</xsl:when>
        			<xsl:otherwise>
        				<p class="{@class}"><xsl:apply-templates/></p>
        			</xsl:otherwise>
        		</xsl:choose>
        	</xsl:template>
        
        	<xsl:template match="p">
        		<xsl:call-template name="p"/>
        	</xsl:template>
        
        	<xsl:template match="br">
        		<br/>
        	</xsl:template>
        
        	<xsl:template match="p[@number]">
        		<div class="pnumber">
        			<xsl:choose>
        				<xsl:when test="not(@number) or @number = ''">&nbsp;</xsl:when>
        				<xsl:otherwise><xsl:value-of select="@number"/></xsl:otherwise>
        			</xsl:choose>
        		</div>
        		<div class="pitem">
        			<xsl:call-template name="p"/>
        		</div>
        	</xsl:template>
        
        	<xsl:template match="span">
        		<xsl:choose>
        			<xsl:when test="not(@class)">
        				<span><xsl:apply-templates/></span>
        			</xsl:when>
        			<xsl:when test="@class = 'italics'">
        				<em><xsl:apply-templates/></em>
        			</xsl:when>
        			<xsl:otherwise>
        				<span class="{@class}"><xsl:apply-templates/></span>
        			</xsl:otherwise>
        		</xsl:choose>
        	</xsl:template>
        
        	<xsl:template match="h2">
        		<h2><xsl:apply-templates/></h2>
        	</xsl:template>
        
        	<xsl:template match="h3">
        		<h3><xsl:apply-templates/></h3>
        	</xsl:template>
        
        	<xsl:template match="h4">
        		<h4><xsl:apply-templates/></h4>
        	</xsl:template>
        
        	<xsl:template match="h5">
        		<h5><xsl:apply-templates/></h5>
        	</xsl:template>
        
        	<xsl:template match="h6">
        		<h6><xsl:apply-templates/></h6>
        	</xsl:template>
        
        	<xsl:template match="em">
        		<em><xsl:apply-templates/></em>
        	</xsl:template>
        
        	<xsl:template match="strong">
        		<strong><xsl:apply-templates/></strong>
        	</xsl:template>
        
        	<xsl:template match="a">
        		<a href="{@href}" target="{@target}"><xsl:apply-templates/></a>
        	</xsl:template>
        
        	<xsl:template match="ol">
        		<blockquote><ol><xsl:apply-templates/></ol></blockquote>
        	</xsl:template>
        
        	<xsl:template match="ul">
        		<blockquote><ul><xsl:apply-templates/></ul></blockquote>
        	</xsl:template>
        
        	<xsl:template match="li">
        		<li><xsl:apply-templates/></li>
        	</xsl:template>
        
        	<xsl:template match="img">
        		<div><img src="{@src}" alt="image"/></div>
        	</xsl:template>
        
        	<xsl:template match="pre">
        		<pre><xsl:apply-templates/></pre>
        	</xsl:template>
        
        	<xsl:template match="figure">
        		<xsl:choose>
        			<xsl:when test="@pos">
        				<div class="{@pos}"><img src="{@ref}" alt="{.}"/><br/><xsl:value-of select="."/></div>
        			</xsl:when>
        			<xsl:otherwise>
        				<div><img src="{@ref}" alt="{.}"/><br/><xsl:value-of select="."/></div>
        			</xsl:otherwise>
        		</xsl:choose>
        	</xsl:template>
        
        	<xsl:template match="sub">
        		<sub><xsl:apply-templates/></sub>
        	</xsl:template>
        
        	<xsl:template match="sup">
        		<sup><xsl:apply-templates/></sup>
        	</xsl:template>
        
        	<xsl:template match="lt">&lt;</xsl:template>
        	<xsl:template match="gt">&gt;</xsl:template>
        	<xsl:template match="ne">&ne;</xsl:template>
        	<xsl:template match="le">&le;</xsl:template>
        	<xsl:template match="ge">&ge;</xsl:template>
        	<xsl:template match="times">&times;</xsl:template>
        	<xsl:template match="dot">&sdot;</xsl:template>
        	<xsl:template match="divide">&divide;</xsl:template>
        	<xsl:template match="sigma">&sigma;</xsl:template>
        
        	<xsl:template match="summation">
        		<span class="summation">
        			<span class="summation-upper"><xsl:value-of select="@upper"/></span>
        			<span class="summation-symbol">&sum;</span>
        			<span class="summation-lower"><xsl:value-of select="@lower"/></span>
        		</span>
        		<xsl:apply-templates/>
        	</xsl:template>
        
        	<xsl:template match="bracelist">
        		<span class="bracelist-symbol">&lbrace;</span>
        		<span class="bracelist">
        			<xsl:for-each select="item">
        				<span class="bracelist-item"><xsl:apply-templates/></span>
        			</xsl:for-each>
        		</span>
        	</xsl:template>
        
        	<xsl:template match="footlink">
        		<xsl:variable name="docID" select="/document/@id"/>
        		<a class="footlink" id="fn{$docID}_ref{@n}" href="#fn{$docID}_{@n}"><sup><xsl:if test="@quoted"><xsl:text>[</xsl:text></xsl:if><xsl:value-of select="@n"/><xsl:if test="@quoted"><xsl:text>]</xsl:text></xsl:if></sup></a>
        	</xsl:template>
        
        	<xsl:template match="footnote">
        		<xsl:variable name="docID" select="/document/@id"/>
        		<div class="footnote"><a id="fn{$docID}_{@n}" href="#fn{$docID}_ref{@n}"><sup><xsl:value-of select="@n"/></sup></a><xsl:text> </xsl:text>
        			<xsl:apply-templates/>
        		</div>
        	</xsl:template>
        
        	<xsl:template name="authors">
        		<xsl:for-each select="author"><xsl:if test="position() != 1"><xsl:text>, </xsl:text></xsl:if><xsl:if test="position() != 1 and position() = last()"><xsl:text>and </xsl:text></xsl:if><xsl:value-of select="."/></xsl:for-each>
        	</xsl:template>
        
        	<xsl:template name="formatDate">
        		<xsl:param name="date"/>
        		<xsl:param name="format">MDY</xsl:param>
        		<xsl:variable name="year">
        			<xsl:value-of select="substring-before($date,'-')"/>
        		</xsl:variable>
        		<xsl:variable name="mon-day">
        			<xsl:value-of select="substring-after($date,'-')"/>
        		</xsl:variable>
        		<xsl:variable name="mon">
        			<xsl:value-of select="substring-before($mon-day,'-')"/>
        		</xsl:variable>
        		<xsl:variable name="full-day">
        			<xsl:value-of select="substring-after($mon-day,'-')"/>
        		</xsl:variable>
        		<xsl:variable name="day">
        			<xsl:choose>
        				<xsl:when test="substring($full-day,1,1) = '0'"><xsl:value-of select="substring($full-day,2)"/></xsl:when>
        				<xsl:otherwise><xsl:value-of select="$full-day"/></xsl:otherwise>
        			</xsl:choose>
        		</xsl:variable>
        		<xsl:choose>
        			<xsl:when test="$mon = '01'">January </xsl:when>
        			<xsl:when test="$mon = '02'">February </xsl:when>
        			<xsl:when test="$mon = '03'">March </xsl:when>
        			<xsl:when test="$mon = '04'">April </xsl:when>
        			<xsl:when test="$mon = '05'">May </xsl:when>
        			<xsl:when test="$mon = '06'">June </xsl:when>
        			<xsl:when test="$mon = '07'">July </xsl:when>
        			<xsl:when test="$mon = '08'">August </xsl:when>
        			<xsl:when test="$mon = '09'">September </xsl:when>
        			<xsl:when test="$mon = '10'">October </xsl:when>
        			<xsl:when test="$mon = '11'">November </xsl:when>
        			<xsl:when test="$mon = '12'">December </xsl:when>
        			<xsl:when test="$mon = '00'"/>		</xsl:choose>
        		<xsl:if test="$day != '0' and $format = 'MDY'">
        			<xsl:value-of select="$day"/><xsl:text>, </xsl:text>
        		</xsl:if>
        		<xsl:value-of select="$year"/>
        	</xsl:template>
        
        	<xsl:template match="gallery">
        		<h2><xsl:value-of select="description"/></h2>
        		<div class="gallery">
        			<xsl:apply-templates select="item" mode="gallery"/>
        		</div>
        		<div style="clear:both;"></div>
        	</xsl:template>
        
        	<xsl:template match="item" mode="gallery">
        		<div class="galleryitem">
        			<a href="{@ref}"><img src="/versions/images/current/pdf-192.jpg" alt="{.}"/></a><br/>
        			<div style="font-size:small; text-align:center;"><xsl:value-of select="."/></div>
        		</div>
        	</xsl:template>
        
        	<xsl:template match="list[@type = 'timeline']">
        		<xsl:if test="not(description)">
        			<h2>Timeline</h2>
        		</xsl:if>
        		<xsl:if test="description">
        			<h2><xsl:value-of select="description"/></h2>
        		</xsl:if>
        		<blockquote>
        			<xsl:apply-templates select="item" mode="timeline"/>
        		</blockquote>
        	</xsl:template>
        
        	<xsl:template match="item" mode="timeline">
        		<xsl:if test="@ref">
        			<xsl:variable name="documentFile"><xsl:value-of select="$rootDir"/><xsl:value-of select="@ref"/></xsl:variable>
        			<xsl:apply-templates select="document($documentFile)/document" mode="withDate">
        				<xsl:with-param name="itemRef" select="@ref"/>
        			</xsl:apply-templates>
        		</xsl:if>
        		<xsl:if test="not(@ref)">
        			<h3><xsl:call-template name="formatDate"><xsl:with-param name="date" select="@date"/></xsl:call-template></h3>
        			<blockquote>
        				<xsl:value-of select="."/>
        			</blockquote>
        		</xsl:if>
        	</xsl:template>
        
        	<xsl:template match="list[@type = 'people']">
        		<xsl:if test="not(description)">
        			<h2>People</h2>
        		</xsl:if>
        		<xsl:if test="description">
        			<h2><xsl:value-of select="description"/></h2>
        		</xsl:if>
        		<blockquote>
        			<xsl:apply-templates select="item" mode="people"/>
        		</blockquote>
        	</xsl:template>
        
        	<xsl:template match="item" mode="people">
        		<h3><xsl:value-of select="name"/></h3>
        		<xsl:apply-templates select="list"/>
        	</xsl:template>
        
        	<xsl:template match="list[@type = 'documents']">
        		<xsl:if test="description"><h2><xsl:value-of select="description"/></h2></xsl:if>
        		<ul>
        			<xsl:apply-templates select="item" mode="document"/>
        		</ul>
        	</xsl:template>
        
        	<xsl:template match="item" mode="document">
        		<xsl:variable name="documentFile"><xsl:value-of select="$rootDir"/><xsl:value-of select="@ref"/></xsl:variable>
        		<xsl:apply-templates select="document($documentFile)/document">
        			<xsl:with-param name="itemRef" select="@ref"/>
        		</xsl:apply-templates>
        	</xsl:template>
        
        	<xsl:template match="document">
        		<xsl:param name="itemRef"/>
        		<li>
        			<xsl:call-template name="documentSummary"><xsl:with-param name="itemRef" select="$itemRef"/></xsl:call-template>
        		</li>
        	</xsl:template>
        
        	<xsl:template match="document" mode="withDate">
        		<xsl:param name="itemRef"/>
        		<h3><xsl:call-template name="formatDate"><xsl:with-param name="date" select="date"/><xsl:with-param name="format" select="MY"/></xsl:call-template></h3>
        		<blockquote>
        			<p>
        				<xsl:call-template name="documentSummary"><xsl:with-param name="itemRef" select="$itemRef"/><xsl:with-param name="multiLine" select="'true'"/></xsl:call-template>
        			</p>
        		</blockquote>
        	</xsl:template>
        
        	<xsl:template name="documentSummary">
        		<xsl:param name="itemRef"/>
        		<xsl:param name="multiLine">false</xsl:param>
        		<xsl:choose>
        			<xsl:when test="content|include">
        				<a href="{$itemRef}"><xsl:value-of select="title"/></a>
        				<xsl:if test="@ref">
        					<span class="small">
        						<xsl:text> [</xsl:text><a href="{@ref}">Original</a><xsl:text>]</xsl:text>
        					</span>
        				</xsl:if>
        			</xsl:when>
        			<xsl:otherwise>
        				<a href="{$itemRef}"><xsl:value-of select="title"/></a>
        			</xsl:otherwise>
        		</xsl:choose>
        		<xsl:if test="copy">
        			<span class="small">
        				<xsl:text> [</xsl:text><a href="{copy/@ref}"><xsl:value-of select="copy"/></a><xsl:text>]</xsl:text>
        			</span>
        		</xsl:if>
        		<xsl:if test="author"><xsl:if test="$multiLine = 'true'"><br/></xsl:if><span class="medium"><xsl:text> by </xsl:text><xsl:call-template name="authors"/></span></xsl:if>
        		<xsl:if test="source">
        			<span class="small">
        				<br/>
        				<xsl:text>[Source: </xsl:text>
        				<xsl:if test="site">
        					<a href="{site/@url}"><xsl:value-of select="site"/></a>
        				</xsl:if>
        				<xsl:if test="not(site)">
        					<a href="{source/@url}"><xsl:value-of select="source"/></a>
        				</xsl:if>
        				<xsl:text>]</xsl:text>
        			</span>
        		</xsl:if>
        	</xsl:template>
        
        	<xsl:template match="list[@type = 'resources']">
        		<xsl:if test="not(description)">
        			<h2>Resources</h2>
        		</xsl:if>
        		<xsl:if test="description">
        			<h2><xsl:value-of select="description"/></h2>
        		</xsl:if>
        		<blockquote>
        			<xsl:apply-templates select="item" mode="resources"/>
        		</blockquote>
        	</xsl:template>
        
        	<xsl:template match="item" mode="resources">
        		<h3><xsl:value-of select="description"/></h3>
        		<xsl:apply-templates select="list"/>
        	</xsl:template>
        
        	<xsl:template match="list[@type = 'links']">
        		<xsl:if test="description">
        			<h4><xsl:value-of select="description"/></h4>
        		</xsl:if>
        		<ul>
        			<xsl:apply-templates select="item" mode="links"/>
        		</ul>
        	</xsl:template>
        
        	<xsl:template match="item" mode="links">
        		<li><a href="{@ref}"><xsl:value-of select="."/></a></li>
        	</xsl:template>
        
        	<xsl:template match="list[not(@type)]">
        		<xsl:if test="description">
        			<h2><xsl:value-of select="description"/></h2>
        		</xsl:if>
        		<blockquote>
        			<xsl:apply-templates select="item|tag" mode="outer"/>
        		</blockquote>
        	</xsl:template>
        
        	<xsl:template match="item" mode="outer">
        		<xsl:if test="description">
        			<h3><xsl:value-of select="description"/></h3>
        		</xsl:if>
        		<xsl:apply-templates select="list|item|tag" mode="inner"/>
        	</xsl:template>
        
        	<xsl:template match="list" mode="inner">
        		<xsl:if test="description">
        			<h4><xsl:value-of select="description"/></h4>
        		</xsl:if>
        		<ul>
        			<xsl:apply-templates select="list|item|para|tag" mode="inner"/>
        		</ul>
        	</xsl:template>
        
        	<xsl:template name="innerlist">
        		<xsl:if test="description">
        			<xsl:value-of select="description"/>
        		</xsl:if>
        		<ul>
        			<xsl:apply-templates select="list|item|para|tag" mode="inner"/>
        		</ul>
        	</xsl:template>
        
        	<xsl:template match="item" mode="inner">
        		<xsl:choose>
        			<xsl:when test="@ref">
        				<li><a href="{@ref}"><xsl:apply-templates/></a></li>
        			</xsl:when>
        			<xsl:when test="description">
        				<li><xsl:call-template name="innerlist"/></li>
        			</xsl:when>
        			<xsl:otherwise>
        				<li><xsl:apply-templates/></li>
        			</xsl:otherwise>
        		</xsl:choose>
        	</xsl:template>
        
        	<xsl:template match="para" mode="inner">
        		<li class="para"><xsl:apply-templates/></li>
        	</xsl:template>
        
        	<xsl:template match="tag" mode="outer">
        		<xsl:call-template name="tag"/>
        	</xsl:template>
        
        	<xsl:template match="tag" mode="inner">
        		<xsl:call-template name="tag"/>
        	</xsl:template>
        
        	<xsl:template name="tag">
        		<blockquote class="tag">
        			<xsl:text>&lt;</xsl:text><xsl:if test="@href"><a href="{@href}"><xsl:value-of select="@name"/></a></xsl:if><xsl:if test="not(@href)"><xsl:value-of select="@name"/></xsl:if><xsl:for-each select="attr"><xsl:text> </xsl:text><xsl:value-of select="@name"/><xsl:text>="</xsl:text><xsl:value-of select="@value"/><xsl:text>"</xsl:text></xsl:for-each>
        			<xsl:choose>
        				<xsl:when test="tag"><xsl:text>&gt;</xsl:text><xsl:apply-templates mode="inner"/><xsl:text>&lt;/</xsl:text><xsl:value-of select="@name"/><xsl:text>&gt;</xsl:text></xsl:when>
        				<xsl:when test="normalize-space(.) != ''"><xsl:text>&gt;</xsl:text><xsl:value-of select="."/><xsl:text>&lt;/</xsl:text><xsl:value-of select="@name"/><xsl:text>&gt;</xsl:text></xsl:when>
        				<xsl:otherwise><xsl:text>/&gt;</xsl:text></xsl:otherwise>
        			</xsl:choose>
        		</blockquote>
        	</xsl:template>
        
        </xsl:stylesheet>
        
      • machine.xsl
        <?xml version="1.0" encoding="UTF-8"?>
        <!-- author="Jeff Parsons (@jeffpar)" website="http://www.pcjs.org/" created="2012-05-05" modified="2014-02-23" license="http://www.gnu.org/licenses/gpl.html" -->
        <!DOCTYPE xsl:stylesheet [
        	<!ENTITY nbsp "&#160;"> <!ENTITY sect "&#167;"> <!ENTITY copy "&#169;"> <!ENTITY para "&#182;"> <!ENTITY ndash "&#8211;"> <!ENTITY mdash "&#8212;">
        	<!ENTITY lsquo "&#8216;"> <!ENTITY rsquo "&#8217;"> <!ENTITY ldquo "&#8220;"> <!ENTITY rdquo "&#8221;"> <!ENTITY dagger "&#8224;"> <!ENTITY Dagger "&#8225;">
        ]>
        <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
        
        	<xsl:output doctype-system="about:legacy-compat"/>
        
        	<xsl:include href="/versions/pcjs/1.18.3/common.xsl"/>
        	<xsl:include href="/versions/pcjs/1.18.3/components.xsl"/>
        
        	<xsl:template match="/machine">
        		<html lang="en">
        			<head>
        				<title><xsl:value-of select="$SITEHOST"/></title>
        				<xsl:call-template name="commonStyles"/>
        				<xsl:call-template name="componentStyles"/>
        			</head>
        			<body>
        				<div class="common">
        					<xsl:call-template name="commonTop"/>
        					<div class="common-middle">
        						<p></p>
        						<div id="{@id}" class="machine {@class}js">
        							<xsl:call-template name="component">
        								<xsl:with-param name="machine" select="@id"/>
        								<xsl:with-param name="component" select="'machine'"/>
        								<xsl:with-param name="class"><xsl:value-of select="@class"/>js</xsl:with-param>
        								<xsl:with-param name="parms"><xsl:if test="@parms">,<xsl:value-of select="@parms"/></xsl:if></xsl:with-param>
        							</xsl:call-template>
        						</div>
        					</div>
        					<xsl:call-template name="commonBottom"/>
        				</div>
        				<xsl:call-template name="componentScripts">
        					<xsl:with-param name="component">
        						<xsl:choose>
        							<xsl:when test="debugger"><xsl:value-of select="@class"/>-dbg</xsl:when>
        							<xsl:otherwise><xsl:value-of select="@class"/></xsl:otherwise>
        						</xsl:choose>
        					</xsl:with-param>
        				</xsl:call-template>
        			</body>
        		</html>
        	</xsl:template>
        
        </xsl:stylesheet>
        
      • manifest.xsl
        <?xml version="1.0" encoding="UTF-8"?>
        <!-- author="Jeff Parsons (@jeffpar)" website="http://www.pcjs.org/" created="2014-04-10" modified="2014-04-10" license="http://www.gnu.org/licenses/gpl.html" -->
        <!DOCTYPE xsl:stylesheet [
        	<!ENTITY nbsp "&#160;"> <!ENTITY sect "&#167;"> <!ENTITY copy "&#169;"> <!ENTITY para "&#182;"> <!ENTITY ndash "&#8211;"> <!ENTITY mdash "&#8212;">
        	<!ENTITY lsquo "&#8216;"> <!ENTITY rsquo "&#8217;"> <!ENTITY ldquo "&#8220;"> <!ENTITY rdquo "&#8221;"> <!ENTITY dagger "&#8224;"> <!ENTITY Dagger "&#8225;">
        ]>
        <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
        
        	<xsl:output doctype-system="about:legacy-compat"/>
        
        	<xsl:include href="/versions/pcjs/1.18.3/common.xsl"/>
        	<xsl:include href="/versions/pcjs/1.18.3/components.xsl"/>
        
        	<xsl:template match="/manifest[@type = 'document']">
        		<html lang="en">
        			<head>
        				<title><xsl:value-of select="$SITEHOST"/></title>
        				<xsl:call-template name="commonStyles"/>
        				<xsl:call-template name="componentStyles"/>
        			</head>
        			<body>
        				<div class="common">
        					<xsl:call-template name="commonTop"/>
        					<div class="common-middle">
        						<h4>Document Manifest</h4>
        						<div class="common-sidebar">
        							<ul class="common-list-data">
        								<xsl:call-template name="listItem">
        									<xsl:with-param name="label" select="'Title'"/>
        									<xsl:with-param name="node" select="title"/>
        									<xsl:with-param name="default">None</xsl:with-param>
        								</xsl:call-template>
        								<xsl:call-template name="listItem">
        									<xsl:with-param name="label" select="'Version'"/>
        									<xsl:with-param name="node" select="version"/>
        									<xsl:with-param name="default" select="''"/>
        								</xsl:call-template>
        								<xsl:call-template name="listItem">
        									<xsl:with-param name="label" select="'Source'"/>
        									<xsl:with-param name="node" select="source"/>
        									<xsl:with-param name="default" select="''"/>
        								</xsl:call-template>
        								<xsl:call-template name="listItem">
        									<xsl:with-param name="label" select="'Documents'"/>
        									<xsl:with-param name="node" select="document"/>
        									<xsl:with-param name="default"><xsl:value-of select="title"/> <xsl:if test="version != ''"><xsl:text> </xsl:text><xsl:value-of select="version"/></xsl:if></xsl:with-param>
        								</xsl:call-template>
        							</ul>
        						</div>
        						<div class="common-main">
        							<p><xsl:value-of select="desc"/></p>
        							<xsl:call-template name="commonBottom"/>
        						</div>
        					</div>
        				</div>
        			</body>
        		</html>
        	</xsl:template>
        
        	<xsl:template match="/manifest[@type = 'software' or not(@type)]">
        		<xsl:variable name="machineClass">
        			<xsl:choose>
        				<xsl:when test="machine/@class"><xsl:value-of select="machine/@class"/></xsl:when>
        				<xsl:otherwise><xsl:value-of select="$MACHINECLASS"/></xsl:otherwise>
        			</xsl:choose>
        		</xsl:variable>
        		<html lang="en">
        			<head>
        				<title><xsl:value-of select="$SITEHOST"/></title>
        				<xsl:call-template name="commonStyles"/>
        				<xsl:call-template name="componentStyles"/>
        			</head>
        			<body>
        				<div class="common">
        					<xsl:call-template name="commonTop"/>
        					<div class="common-middle">
        						<h4>Software Manifest</h4>
        						<div class="common-sidebar">
        							<ul class="common-list-data">
        								<xsl:call-template name="listItem">
        									<xsl:with-param name="label" select="'Title'"/>
        									<xsl:with-param name="node" select="title"/>
        									<xsl:with-param name="default">None</xsl:with-param>
        								</xsl:call-template>
        								<xsl:call-template name="listItem">
        									<xsl:with-param name="label" select="'Version'"/>
        									<xsl:with-param name="node" select="version"/>
        									<xsl:with-param name="default">Unknown</xsl:with-param>
        								</xsl:call-template>
        								<xsl:call-template name="listItem">
        									<xsl:with-param name="label" select="'Type'"/>
        									<xsl:with-param name="node" select="type"/>
        									<xsl:with-param name="default">None</xsl:with-param>
        								</xsl:call-template>
        								<xsl:call-template name="listItem">
        									<xsl:with-param name="label" select="'Category'"/>
        									<xsl:with-param name="node" select="category"/>
        									<xsl:with-param name="default">None</xsl:with-param>
        								</xsl:call-template>
        								<xsl:call-template name="listItem">
        									<xsl:with-param name="label" select="'Created'"/>
        									<xsl:with-param name="node" select="creationDate"/>
        									<xsl:with-param name="default" select="''"/>
        								</xsl:call-template>
        								<xsl:call-template name="listItem">
        									<xsl:with-param name="label" select="'Creators'"/>
        									<xsl:with-param name="node" select="creator"/>
        									<xsl:with-param name="default" select="''"/>
        								</xsl:call-template>
        								<xsl:call-template name="listItem">
        									<xsl:with-param name="label"><xsl:if test="creationDate">Updated</xsl:if><xsl:if test="not(creationDate)">Released</xsl:if></xsl:with-param>
        									<xsl:with-param name="node" select="releaseDate"/>
        									<xsl:with-param name="default">Unknown</xsl:with-param>
        								</xsl:call-template>
        								<xsl:call-template name="listItem">
        									<xsl:with-param name="label" select="'Company'"/>
        									<xsl:with-param name="node" select="company"/>
        									<xsl:with-param name="default" select="''"/>
        								</xsl:call-template>
        								<xsl:call-template name="listItem">
        									<xsl:with-param name="label" select="'Authors'"/>
        									<xsl:with-param name="node" select="author"/>
        									<xsl:with-param name="default" select="''"/>
        								</xsl:call-template>
        								<xsl:call-template name="listItem">
        									<xsl:with-param name="label" select="'Contributors'"/>
        									<xsl:with-param name="node" select="contributor"/>
        									<xsl:with-param name="default" select="''"/>
        								</xsl:call-template>
        								<xsl:call-template name="listItem">
        									<xsl:with-param name="label" select="'Publisher'"/>
        									<xsl:with-param name="node" select="publisher"/>
        									<xsl:with-param name="default" select="''"/>
        								</xsl:call-template>
        								<xsl:call-template name="listItem">
        									<xsl:with-param name="label" select="'License'"/>
        									<xsl:with-param name="node" select="license"/>
        									<xsl:with-param name="default" select="''"/>
        								</xsl:call-template>
        								<xsl:call-template name="listItem">
        									<xsl:with-param name="label" select="'Source'"/>
        									<xsl:with-param name="node" select="source"/>
        									<xsl:with-param name="default" select="''"/>
        								</xsl:call-template>
        								<xsl:call-template name="listItem">
        									<xsl:with-param name="label" select="'Disks'"/>
        									<xsl:with-param name="node" select="disk"/>
        									<xsl:with-param name="default"><xsl:value-of select="title"/> <xsl:if test="version != ''"><xsl:text> </xsl:text><xsl:value-of select="version"/></xsl:if></xsl:with-param>
        								</xsl:call-template>
        							</ul>
        						</div>
        						<div class="common-main">
        							<xsl:for-each select="machine[not(@type) or @type = 'default']">
        								<xsl:call-template name="machine">
        									<xsl:with-param name="href" select="@href"/>
        									<xsl:with-param name="state" select="@state"/>
        								</xsl:call-template>
        							</xsl:for-each>
        							<xsl:if test="not(machine[not(@type) or @type = 'default'])">
        								<p>No default machine specified for '<xsl:value-of select="title"/>' in manifest.xml</p>
        							</xsl:if>
        							<xsl:call-template name="commonBottom"/>
        						</div>
        					</div>
        				</div>
        				<xsl:call-template name="componentScripts">
        					<xsl:with-param name="component">
        						<xsl:choose>
        							<xsl:when test="machine/@debugger"><xsl:value-of select="$machineClass"/>-dbg</xsl:when>
        							<xsl:otherwise><xsl:value-of select="$machineClass"/></xsl:otherwise>
        						</xsl:choose>
        					</xsl:with-param>
        				</xsl:call-template>
        			</body>
        		</html>
        	</xsl:template>
        
        	<xsl:template name="listItem">
        		<xsl:param name="label"/>
        		<xsl:param name="node"/>
        		<xsl:param name="default">Unknown</xsl:param>
        		<xsl:if test="$node != '' or $default != ''">
        			<li><xsl:value-of select="$label"/>
        				<ul class="common-list-data-items">
        					<xsl:for-each select="$node">
        						<xsl:variable name="desc">
        							<xsl:choose>
        								<xsl:when test="desc"><xsl:value-of select="desc"/></xsl:when>
        								<xsl:when test="org"><xsl:value-of select="org"/></xsl:when>
        								<xsl:otherwise/>
        							</xsl:choose>
        						</xsl:variable>
        						<li title="{$desc}">
        							<xsl:variable name="value">
        								<xsl:choose>
        									<xsl:when test="name">
        										<xsl:value-of select="name"/>
        									</xsl:when>
        									<xsl:when test="normalize-space(./text()) != ''">
        										<xsl:value-of select="normalize-space(./text())"/>
        									</xsl:when>
        									<xsl:otherwise>
        										<xsl:value-of select="$default"/>
        									</xsl:otherwise>
        								</xsl:choose>
        							</xsl:variable>
        							<xsl:variable name="href">
        								<xsl:if test="@href"><xsl:value-of select="@href"/></xsl:if>
        							</xsl:variable>
        							<xsl:choose>
        								<xsl:when test="$href != ''">
        									<a href="{$href}"><xsl:value-of select="$value"/></a>
        								</xsl:when>
        								<xsl:otherwise>
        									<xsl:value-of select="$value"/>
        								</xsl:otherwise>
        							</xsl:choose>
        							<xsl:if test="page">
        								<ul class="common-list-data-subitems">
        									<xsl:for-each select="page">
        										<li>
        											<xsl:if test="@href">
        												<a href="{$href}{@href}"><xsl:value-of select="."/></a>
        											</xsl:if>
        											<xsl:if test="not(@href)">
        												<xsl:value-of select="."/>
        											</xsl:if>
        										</li>
        									</xsl:for-each>
        								</ul>
        							</xsl:if>
        						</li>
        					</xsl:for-each>
        					<xsl:if test="not($node)">
        						<xsl:if test="@href">
        							<a href="{@href}"><xsl:value-of select="$default"/></a>
        						</xsl:if>
        						<xsl:if test="not(@href)">
        							<xsl:value-of select="$default"/>
        						</xsl:if>
        					</xsl:if>
        				</ul>
        			</li>
        		</xsl:if>
        	</xsl:template>
        
        </xsl:stylesheet>
        
      • outline.xsl
        <?xml version="1.0" encoding="UTF-8"?>
        <!-- author="Jeff Parsons (@jeffpar)" website="http://www.pcjs.org/" created="2012-05-05" modified="2014-02-23" license="http://www.gnu.org/licenses/gpl.html" -->
        <!DOCTYPE xsl:stylesheet [
        	<!ENTITY nbsp "&#160;"> <!ENTITY sect "&#167;"> <!ENTITY copy "&#169;"> <!ENTITY para "&#182;"> <!ENTITY ndash "&#8211;"> <!ENTITY mdash "&#8212;">
        	<!ENTITY lsquo "&#8216;"> <!ENTITY rsquo "&#8217;"> <!ENTITY ldquo "&#8220;"> <!ENTITY rdquo "&#8221;"> <!ENTITY dagger "&#8224;"> <!ENTITY Dagger "&#8225;">
        ]>
        <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
        
        	<xsl:output doctype-system="about:legacy-compat"/>
        
        	<xsl:include href="/versions/pcjs/1.18.3/common.xsl"/>
        	<xsl:include href="/versions/pcjs/1.18.3/document.xsl"/>
        	<xsl:include href="/versions/pcjs/1.18.3/components.xsl"/>
        
        	<xsl:template match="/outline">
        		<xsl:variable name="machineClass">
        			<xsl:choose>
        				<xsl:when test="machine/@class"><xsl:value-of select="machine/@class"/></xsl:when>
        				<xsl:otherwise><xsl:value-of select="$MACHINECLASS"/></xsl:otherwise>
        			</xsl:choose>
        		</xsl:variable>
        		<html lang="en">
        			<head>
        				<title><xsl:value-of select="title"/><xsl:text> | </xsl:text><xsl:value-of select="$SITEHOST"/></title>
        				<xsl:call-template name="commonStyles"/>
        				<xsl:call-template name="documentStyles"/>
        				<xsl:call-template name="componentStyles"/>
        			</head>
        			<body>
        				<div class="common">
        					<div class="page justified">
        						<xsl:apply-templates/>
        					</div>
        				</div>
        				<xsl:call-template name="componentScripts">
        					<xsl:with-param name="component">
        						<xsl:choose>
        							<xsl:when test="debugger"><xsl:value-of select="$machineClass"/>-dbg</xsl:when>
        							<xsl:otherwise><xsl:value-of select="$machineClass"/></xsl:otherwise>
        						</xsl:choose>
        					</xsl:with-param>
        				</xsl:call-template>
        			</body>
        		</html>
        	</xsl:template>
        
        </xsl:stylesheet>
        
      • pc-dbg.js
        (function(){var f,aa,ba,ea={163840:[40,1,8],184320:[40,1,9],327680:[40,2,8],368640:[40,2,9],737280:[80,2,9],1228800:[80,2,15],1474560:[80,2,18],2949120:[80,2,36]};
        function fa(a,b){var c;if(a){b||(b=16);if("$"==a.charAt(0))b=16,a=a.substr(1);else if("0x"==a.substr(0,2))b=16,a=a.substr(2);else{var d=a.charAt(a.length-1).toLowerCase();"h"==d?(b=16,d=null):"."==d&&(b=10,d=null);null===d&&(a=a.substr(0,a.length-1))}var e,d=a;(b&&10!=b?16==b?null!==d.match(/^[0-9a-f]+$/i):1:null!==d.match(/^[0-9]+$/))&&!isNaN(e=parseInt(a,b))&&(c=e|0)}return c}
        function h(a,b){var c="";void 0===b?b=8:8<b&&(b=8);if(null==a||isNaN(a))for(;0<b--;)c="?"+c;else for(;0<b--;){var d=a&15,d=d+(0<=d&&9>=d?48:55),c=String.fromCharCode(d)+c;a>>=4}return c}function k(a){return"0x"+h(a,2)}function ga(a){return"0x"+h(a,4)}function ha(a,b){var c=a,d=a.lastIndexOf("/");0<=d&&(c=a.substr(d+1));d=c.indexOf("&");0<d&&(c=c.substr(0,d));b&&(d=c.lastIndexOf("."),0<d&&(c=c.substring(0,d)));return c}
        function ia(a){var b="",c=a.lastIndexOf(".");0<=c&&(b=a.substr(c+1).toLowerCase());return b}var ja={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};function ka(a){return a.replace(/[&<>"']/g,function(a){return ja[a]})}function la(a,b){var c="",d;for(d in a)d=d.replace(/([\\[\]*{}().+?])/g,"\\$1"),c+=(c?"|":"")+d;return b.replace(new RegExp("("+c+")","g"),function(b){return a[b]})}function ma(a,b){return a+"                                        ".substr(0,b-a.length)}
        function na(a){return String.prototype.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}function oa(a,b,c){var d=0,e=a.length,g=0;for(void 0===c&&(c=function(a,b){return a>b?1:a<b?-1:0});d<e;){var l=d+e>>1,p;p=c(b,a[l]);0<p?d=l+1:(e=l,g=!p)}return g?d:~d}function pa(a,b,c){c=oa(a,b,c);0>c&&a.splice(-(c+1),0,b)}var ra=Date.now||function(){return+new Date};
        function sa(){function a(a){return(10>a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())}var ua=[31,28,31,30,31,30,31,31,30,31,30,31];function va(a,b){var c=0,d=1,e;for(e in a){if(d>=arguments.length)break;d++;c=void 0}return c}function wa(a,b){return(b&a.Sq)>>a.shift}
        function ya(a,b){var c;if(Array.prototype.indexOf)return a.indexOf(b,c);c=c||0;0>c&&(c+=a.length);0>c&&(c=0);for(var d=a.length;c<d;c++)if(c in a&&a[c]===b)return c;return-1}
        function za(a,b,c,d,e,g){b=!!b;var l=0,p=null,v=ha(a),w=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");b&&(w.onreadystatechange=function(){4===w.readyState&&(p=w.responseText,200==w.status||!w.status&&p.length&&"file:"==(window?window.location.protocol:"file:")||(l=w.status||-1),e&&(d?e.call(d,v,p,l,g):e(v,p,l,g)))});if(c){var F="",K;for(K in c)c.hasOwnProperty(K)&&(F&&(F+="&"),F+=K+"="+encodeURIComponent(c[K]));F=F.replace(/%20/g,"+");w.open("POST",
        a,b);w.setRequestHeader("Content-type","application/x-www-form-urlencoded");w.send(F)}else w.open("GET",a,b),w.send();a=[];b||(p=w.responseText,200!=w.status&&(l=w.status||-1),e&&(d?e.call(d,v,p,l,g):e(v,p,l,g)),a=[l,p]);return a}function Aa(){return"http://"+(window?window.location.host:"www.pcjs.org")}function Ba(a){window&&window.alert(a)}function Ca(a){var b=!1;window&&(b=window.confirm(a));return b}var Da=null;
        function Ea(){if(null==Da){var a=!1;if(window)try{window.localStorage.setItem("PCjs.localStorage","PCjs.localStorage"),a="PCjs.localStorage"==window.localStorage.getItem("PCjs.localStorage"),window.localStorage.removeItem("PCjs.localStorage")}catch(b){a=!1}Da=a}return Da}function Fa(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b}function Ga(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}
        function Ia(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}function Ja(a,b,c){function d(){--a;0<=a&&(b()||(a=0));0<a?setTimeout(d,0):c()}d()}
        function Ka(a,b){function c(){b(100===d)&&(e=setTimeout(c,d),d=100)}var d=0,e=null,g=!1;a.onmousedown=function(){g||e||(d=500,c())};a.ontouchstart=function(){e||(d=500,c())};a.onmouseup=a.onmouseout=function(){e&&(clearTimeout(e),e=null)};a.ontouchend=a.ontouchcancel=function(){e&&(clearTimeout(e),e=null);g=!0}}var La={init:[],show:[],exit:[]},Ma=!1,Na=!0;function Oa(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function Pa(a){La.init.push(a)}
        function Qa(a){if(Na)try{for(var b=0;b<a.length;b++)a[b]()}catch(c){Ba("An unexpected exception occurred:\n\n"+c.message+"\n\nPlease send this information to support@pcjs.org. Thanks.")}}function Ra(a){!Na&&a?(Na=!0,Ma&&Ta("init")):Na=a}function Ta(a){La[a]&&Qa(La[a])}Oa("onload",function(){Ma=!0;Qa(La.init)});Oa("onpageshow",function(){Qa(La.show)});Oa(Ia("Opera")||Ia("iOS")?"onunload":"onbeforeunload",function(){Qa(La.exit)});
        function Ua(a,b,c,d){this.type=a;b||(b={id:"",name:""});this.id=b.id;this.name=b.name;this.Gn=b.comment;this.ls=b;void 0===this.id&&(this.id="");b=this.id.indexOf(".");0<b?(this.fo=this.id.substr(0,b),this.Lg=this.id.substr(b+1)):this.Lg=this.id;this[a]=c;this.fa={Dg:!1,$c:!1,il:!1,jc:!1,Ld:!1};this.gj=null;this.fa.Ld=!1;this.va={};this.Y=null;this.Yb=d||-1;Wa[Wa.length]=this}var Xa=void 0,Ya={};
        if(window){Xa||(Xa=window.location.search.substr(1));for(var ab,bb=/\+/g,cb=/([^&=]+)=?([^&]*)/g;ab=cb.exec(Xa);)Ya[decodeURIComponent(ab[1].replace(bb," "))]=decodeURIComponent(ab[2].replace(bb," "))}function db(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b}
        function eb(a,b){b||(b=Ua);a.prototype=db(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}var Wa=[];function fb(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b<Wa.length;b++){var d=Wa[b];a&&d.id.indexOf(a)||c.push(d)}return c}function gb(a,b){if(void 0!==a){var c;b&&0<(c=b.indexOf("."))&&(a=b.substr(0,c+1)+a);for(c=0;c<Wa.length;c++)if(Wa[c].id===a)return Wa[c]}return null}
        function hb(a,b){var c;if(void 0!==a){var d;b&&(b=0<(d=b.indexOf("."))?b.substr(0,d+1):"");for(d=0;d<Wa.length;d++)if(c)c==Wa[d]&&(c=null);else if(!(a!=Wa[d].type||b&&Wa[d].id.indexOf(b)))return Wa[d]}return null}function ib(a){var b=null;if(a=a.getAttribute("data-value"))try{b=eval("({"+a+"})")}catch(c){Ba(c.message+" ("+a+")")}return b}window&&!window.document.ELEMENT_NODE&&(window.document.ELEMENT_NODE=1);
        function jb(a,b){for(var c=kb(b.parentNode,"pcjs-control"),d=0;d<c.length;d++)for(var e=c[d].childNodes,g=0;g<e.length;g++){var l=e[g];if(l.nodeType===window.document.ELEMENT_NODE){var p=l.getAttribute("class");if(p)for(var v=p.split(" "),w=0;w<v.length;w++)switch(p=v[w],p){case "pcjs-binding":(p=ib(l))&&p.binding&&a.Nb(p.type,p.binding,l),w=v.length}}}}
        function kb(a,b,c){c&&(b+="-"+c+"-object");if(a.getElementsByClassName)return a.getElementsByClassName(b);var d;c=[];a=a.getElementsByTagName("*");var e=new RegExp("(^| )"+b+"( |$)");b=0;for(d=a.length;b<d;b++)e.test(a[b].className)&&c.push(a[b]);return c}
        Ua.prototype={constructor:Ua,parent:null,toString:function(){return this.name?this.name:this.id||this.type},Nb:function(a,b,c){switch(b){case "clear":return this.va[b]||(this.va[b]=c,c.onclick=function(a){return function(){a.va.print&&(a.va.print.value="")}}(this)),!0;case "print":return this.va[b]||(this.Ih=this.va[b]=c,c.value="",this.R=function(a){return function(b,c){8192<a.value.length&&(a.value=a.value.substr(a.value.length-4096));a.value+=(void 0!==c?c+": ":"")+(b||"")+"\n";a.scrollTop=a.scrollHeight}}(c),
        this.Da=function(a,b,c){this.R(a,"notice",c)}),!0;default:return!1}},log:function(){},assert:function(){},R:function(){},status:function(a){this.R(this.Lg+": "+a)},Da:function(a,b){b||Ba(a)},lc:function(){return this.fa.jc=!0},kc:function(a,b){b&&(this.fa.jc=!1);return!0},qa:function(a){if(this.Y){a=this===this.Y?a|0:a||this.Yb;var b=this.Y.Yb&a;return b===a||!!(b&this.Y.fp)}return!1},ab:function(a,b,c){return this.Y?((!0===b||this.qa(b|0))&&this.Y.message(a,c),!0):!1}};
        function m(a,b,c,d,e,g,l){a.Y&&(!0===l?l=0:null==l&&(l=a.Yb),lb(a.Y,a,b,c,d,e,g,l))}function mb(a,b){if(a.fa.il)return a.fa.$c&&(a.fa.$c=!1),a.fa.il=!1;if(a.fa.Ld)return a.R(a.toString()+" error"),!1;a.fa.$c=b;return a.fa.$c}function nb(a,b){a.fa.$c&&(b?a.fa.il=!0:void 0===b&&a.R(a.toString()+" busy"));return a.fa.$c}function ob(a,b){if(!a.fa.Ld&&(a.fa.Dg=!1!==b,a.fa.Dg)){var c=a.gj;a.gj=null;c&&c()}}function pb(a,b){b&&(a.fa.Dg?b():a.gj=b);return a.fa.Dg}function qb(a,b){a.fa.Ld=!0;a.Da(b)}
        var rb="undefined"!==typeof ArrayBuffer;function tb(a){Ua.call(this,"Panel",a,tb);this.canvas=null;this.Pe=this.Qe=this.Th=-1}eb(tb);function ub(a,b,c,d){this.$f=[a,b,c,d];this.zk=null;void 0===a&&(this.$f[0]=256*Math.random()|0,this.$f[1]=256*Math.random()|0,this.$f[2]=256*Math.random()|0,this.$f[3]=255,this.zk=null)}ub.prototype.toString=function(){this.zk||(this.zk="#"+h(this.$f[0],2)+h(this.$f[1],2)+h(this.$f[2],2));return this.zk};function vb(a,b,c,d){this.x=a;this.y=b;this.Xc=c;this.nd=d}
        vb.prototype.contains=function(a,b){return a>=this.x&&a<this.x+this.Xc&&b>=this.y&&b<this.y+this.nd};function wb(a,b,c,d){void 0===d&&(d=b>=c>>2);d?(b=new vb(a.x,a.y,a.Xc,a.nd*b/c|0),a.y+=b.nd,a.nd-=b.nd):(b=new vb(a.x,a.y,a.Xc*b/c|0,a.nd),a.x+=b.Xc,a.Xc-=b.Xc);return b}f=tb.prototype;f.Nb=function(a,b,c){return this.Fa&&this.Fa.Nb(a,b,c)||this.O&&this.O.Nb(a,b,c)||this.Ja&&this.Ja.Nb(a,b,c)||this.Y&&this.Y.Nb(a,b,c)?!0:this.parent.Nb.call(this,a,b,c)};
        f.Kc=function(a,b,c,d){this.Fa=a;this.ma=b;this.O=c;this.Y=d;this.Ja=xb(a,"Keyboard")};f.lc=function(a,b){b||yb();return!0};f.kc=function(){return!0};f.bl=function(a,b){a.button||(this.Th=b?0:-1,zb(this,a,b))};f.lo=function(a){zb(this,a)};
        function zb(a,b,c){var d=1280/a.canvas.offsetWidth,e=720/a.canvas.offsetHeight,g=a.canvas.getBoundingClientRect(),d=(b.clientX-g.left)*d|0;b=(b.clientY-g.top)*e|0;null==c&&(a.Th||(a.Th=Math.abs(a.Pe-d)>Math.abs(a.Qe-b)?1:2),1==a.Th?b=a.Qe:2==a.Th&&(d=a.Pe));a.Pe=d;a.Qe=b;if(0<=d&&1280>d&&0<=b&&720>b){a:{c=d;if(960>c&&a.mb&&a.mb.og)for(g=0;g<a.mb.og.length;g++)if(e=a.mb.og[g],e.contains(c,b)){c-=e.x;b-=e.y;var d=a.mb.sh[g],l=wa(Ab.Ao,a.mb.Gk[d.Hp]),g=l*a.ma.nb,d=(l+d.re)*a.ma.nb-1;0<b&&(g+=e.Xc*(b-
        1)*a.Do);g+=c*a.Do;g|=0;g>d&&(g=d);c=g;break a}c=n}c!==n&&(c&=-16,c!=a.pn&&(Bb(a,c,!0),a.pn=c))}}
        f.zd=function(){if(this.canvas&&this.Wi&&this.cf&&this.Kf){var a=this.cf.width,b=this.cf.height;this.Kf.fillStyle="black";this.Kf.fillRect(0,0,a,b);Cb(this,18,this.cf,this.Kf,this.canvas.style.color);Db(this,3);Eb(this,"CPU");Eb(this,"Target");Eb(this,"Current");Hb(this);Eb(this,this.O.ka);Eb(this,Ib(this.O));Eb(this,Kb(this.O));Hb(this,2);Db(this,8);var c=this.O.ka<Lb?4:8;this.ar=16;this.to=c;Eb(this,"AX",this.O.F,2);Eb(this,"DS",this.O.bb.ia,0,1);Eb(this,"DX",this.O.H,2);Eb(this,"SI",this.O.K,0,
        1.5);Eb(this,"BX",this.O.D,2);Eb(this,"ES",this.O.Ma.ia,0,1);Eb(this,"CX",this.O.G,2);Eb(this,"DI",this.O.J,0,1.5);Eb(this,"CS",Mb(this.O),2);Eb(this,"SS",this.O.ua.ia,0,1);Eb(this,"IP",q(this.O),2);Eb(this,"SP",r(this.O),0,1.5);Eb(this,"PS",c=Nb(this.O),2);Eb(this,"BP",this.O.L,0,1.5);this.O.ka>=Lb&&(Eb(this,"FS",this.O.xc.ia,2),Eb(this,"CR0",this.O.hb,0,1),Eb(this,"GS",this.O.yc.ia,2),Eb(this,"CR3",this.O.uf,0,1.5));Db(this,9);Eb(this,"V"+(c&Ob?1:0));Eb(this,"D"+(c&Pb?1:0));Eb(this,"I"+(c&Qb?1:
        0));Eb(this,"T"+(c&Rb?1:0));Eb(this,"S"+(c&Sb?1:0));Eb(this,"Z"+(c&Tb?1:0));Eb(this,"A"+(c&Ub?1:0));Eb(this,"P"+(c&Vb?1:0));Eb(this,"C"+(c&Wb?1:0),0,2);Bb(this,this.pn);this.Wi.drawImage(this.cf,0,0,a,b,this.Iu,this.Lu,this.gu,this.ju)}};function Xb(a,b,c,d){a.mb.sh[a.mb.An++]={Hp:b,re:c,type:d};return va(Ab,b,c,0,d)}
        function Bb(a,b,c){if(a.Wi&&a.cf&&a.Kf){var d=a.cf.width;a.Kf.fillStyle="black";a.Kf.fillRect(0,360,d,360);Cb(a,378,a.cf,a.Kf,a.canvas.style.color);Db(a,24);if(null==b)Eb(a,"Mouse over memory to dump");else{Eb(a,"0x"+h(b),null,0,1);for(var e=1;16>=e;e++){for(var g="",l=1;8>=l;l++){var p=Yb(a.ma,b++);Eb(a,h(p,2),null,1);g+=32<=p&&128>p?String.fromCharCode(p):"."}Eb(a,g,null,0,1)}}c&&a.Wi.drawImage(a.cf,0,360,d,360,a.Gu,a.Ju,a.eu,a.hu)}}
        function Cb(a,b,c,d,e){var g,l=a.et=10;a.Ad=l;a.kg=b;a.Ig=a.bo=18;g||(g=a.Yn||a.bo+"px Monaco, Lucida Console, Courier New");a.hj=a.Yn=g;c&&(a.hp=c);d&&(a.$d=d,a.np=e||"white")}function Db(a,b){a.cl=a.hp.width/b|0}function Hb(a,b){a.Ad=a.et;a.kg+=(a.Ig+2)*(b||1)}function Eb(a,b,c,d,e){a.$d.font=a.hj;a.$d.fillStyle=a.np;a.$d.fillText(b,a.Ad,a.kg);a.Ad+=a.cl;null!=c&&(16!=a.ar?b=c.toString():(b=8>a.to?"0x":"",b+=h(c,a.to)),a.$d.fillText(b,a.Ad,a.kg),a.Ad+=a.cl);d&&(a.Ad+=a.cl*d);e&&Hb(a,e)}
        function yb(){for(var a=!1,b=kb(window.document,"pcjs","panel"),c=0;c<b.length;c++){var d=b[c],e=ib(d),g=gb(e.id);g||(a=!0,g=new tb(e));jb(g,d);a&&ob(g)}}Pa(yb);
        function Zb(a,b,c){Ua.call(this,"Bus",a,Zb);this.O=b;this.Y=c;this.Be=a.buswidth||20;this.Mk=Math.pow(2,this.Be);this.Vh=this.Db=this.Mk-1|0;this.Ca=32==this.Be||20>=this.Be?12:24>=this.Be?14:15;this.nb=1<<this.Ca;this.oo=this.nb>>2;this.Ga=this.nb-1;this.Ae=this.Mk/this.nb|0;this.td=this.Ae-1;this.le=[];this.me=[];this.Qh=this.Rh=!1;this.xl();ob(this)}eb(Zb);var Ab,$b={Ao:20,count:8,cu:1,type:3},ac=0,bc;for(bc in $b){var cc=$b[bc];$b[bc]={Sq:(1<<cc)-1<<ac,shift:ac};ac+=cc}Ab=void 0;f=Zb.prototype;
        f.xl=function(){var a=new t;this.na=Array(this.Ae);for(var b=0;b<this.Ae;b++)this.na[b]=a;this.O.xl(this.na,this.Ca);a=this.O;a.Db=a.Ee=this.Db};f.reset=function(){dc(this,!0)};f.lc=function(a,b){b||this.reset();return!0};
        function ec(a,b,c,d,e){for(var g=b>>>a.Ca;0<c&&g<a.na.length;){var l=a.na[g],p=g*a.nb,v=c>a.nb?a.nb:c;if(l&&l.size){if(l.type==d&&l.Z==e){if(b+c<=l.Ba)return l.gg+=l.Ba-b,l.Ba=b,!0;if(b>=l.Ba+l.gg){v=l.size-(b-p);v>c&&(v=c);l.gg=b-l.Ba+v;c-=v;b=p+a.nb;continue}}return fc(1,b,c)}l=a.na[g++]=new t(b,v,a.nb,d,e);a.Y&&gc(l,a.Y,b,a.nb);c-=v;b=p+a.nb}return 0<c?fc(2,b,c):!0}
        function dc(a,b){if(32==a.Be)b?a.lg&&(hc(a,1048576,1048576,a.lg),a.lg=null):a.lg||(a.lg=ic(a,1048576,1048576),hc(a,1048576,1048576,ic(a,0,1048576)));else if(20<a.Be){var c=a.Db&-1048577|(b?1048576:0);if(c!=a.Db&&(a.Db=c,a.O)){var d=a.O;d.Db=d.Ee=c}}}f.Bk=function(a,b,c){if(!(a&this.Ga||!b||b&this.Ga)){for(var d=a>>>this.Ca;0<b;){var e=this.na[d];if(!e.Z)return fc(5,a,b);e.Sd(c);b-=this.nb;d++}return!0}return fc(3,a,b)};
        function jc(a,b,c){if(!(b&a.Ga||!c||c&a.Ga)){for(var d=b>>>a.Ca;0<c;){b=d*a.nb;var e=a.na[d++]=new t(b);a.Y&&gc(e,a.Y,b,a.nb);c-=a.nb}return!0}return fc(4,b,c)}function ic(a,b,c){var d=[];for(b>>>=a.Ca;0<c&&b<a.na.length;)d.push(a.na[b++]),c-=a.nb;return d}function hc(a,b,c,d,e){for(var g=0,l=b>>>a.Ca;0<c&&l<a.na.length;){var p=d[g++];if(!p)break;if(void 0!==e){var v=new t(b);a.Y&&gc(v,a.Y,b,a.nb);v.clone(p,e);p=v}a.na[l++]=p;c-=a.nb}}
        f.Qa=function(a){return this.na[(a&this.Db)>>>this.Ca].tc(a&this.Ga,a)};function Yb(a,b){return a.na[(b&a.Db)>>>a.Ca].Yg(b&a.Ga,b)}f.ra=function(a){var b=a&this.Ga,c=(a&this.Db)>>>this.Ca;return b!=this.Ga?this.na[c].ji(b,a):this.na[c++].tc(b,a)|this.na[c&this.td].tc(0,a+1)<<8};function kc(a,b){var c=b&a.Ga,d=(b&a.Db)>>>a.Ca;return c!=a.Ga?a.na[d].Nm(c,b):a.na[d++].Yg(c,b)|a.na[d&a.td].Yg(0,b+1)<<8}
        f.fe=function(a){var b=a&this.Ga,c=(a&this.Db)>>>this.Ca;if(b<this.Ga-2)return this.na[c].Ec(b,a);var d=(b&3)<<3;return this.na[c].Ec(b&-4,a)>>>d|this.na[c+1&this.td].Ec(0,a+3)<<32-d};f.dd=function(a,b){this.na[(a&this.Db)>>>this.Ca].Fc(a&this.Ga,b&255,a)};f.Kb=function(a,b){var c=a&this.Ga,d=(a&this.Db)>>>this.Ca;c!=this.Ga?this.na[d].ui(c,b&65535,a):(this.na[d++].Fc(c,b&255,a),this.na[d&this.td].Fc(0,b>>8&255,a+1))};
        function lc(a,b,c){var d=b&a.Ga,e=(b&a.Db)>>>a.Ca;d!=a.Ga?a.na[e].an(d,c&65535,b):(a.na[e++].ti(d,c&255,b),a.na[e&a.td].ti(0,c>>8&255,b+1))}f.Ak=function(a,b){var c=a&this.Ga,d=(a&this.Db)>>>this.Ca;if(c<this.Ga-2)this.na[d].Oe(c,b);else{var e,g=(c&3)<<3,c=c&-4;e=this.na[d].Ec(c,a);this.na[d].Oe(c,e&~(-1<<g)|b<<g,a);d=d+1&this.td;a+=3;e=this.na[d].Ec(0,a);this.na[d].Oe(0,e&-1<<g|b>>>32-g,a)}};
        function mc(a){for(var b=0,c=[],d=0;d<a.Ae;d++){var e=a.na[d];if(e.Ta||e.On){c[b++]=d;var g=b++;a:if(e=e.save()){for(var l=0,p=0,v=[];l<e.length;){for(var w=e[l],F=l+1;F<e.length&&e[F]===w;)F++;v[p++]=F-l;v[p++]=w;l=F}if(v.length<e.length){e=v;break a}}c[g]=e}}c[b]=!a.lg&&a.Vh==a.Db;return c}function nc(a,b){if(void 0===b)return a.Qh=!a.Qh,a.Qh;void 0===a.le[b]&&(a.le[b]=[null,null,!1]);a.le[b][2]=!a.le[b][2];return a.le[b][2]}
        function oc(a,b,c,d){void 0===d&&(d=0);for(var e in c){var g=a,l=+e+d,p=b,v=c[e];if(void 0!==v)for(var w=+e+d;w<=l;w++)void 0!==g.le[w]?Ba("Input port "+ga(w)+" registered by "+g.le[w][0].id+", ignoring "+p.id):g.le[w]=[p,v,!1,!1]}}function pc(a,b,c){var d=255,e=a.le[b];void 0!==e?(e[1]&&(c=e[1].call(e[0],b,c),void 0!==c&&(d=c)),a.Y&&a.Qh!=e[2]&&qc(a.Y,b,d)):a.Y&&(lb(a.Y,a,b,null,c),a.Qh&&qc(a.Y,b,d));return d}
        function rc(a,b){if(void 0===b)return a.Rh=!a.Rh,a.Rh;void 0===a.me[b]&&(a.me[b]=[null,null,!1]);a.me[b][2]=!a.me[b][2];return a.me[b][2]}function sc(a,b,c,d){void 0===d&&(d=0);for(var e in c){var g=a,l=+e+d,p=b,v=c[e];if(void 0!==v)for(var w=+e+d;w<=l;w++)void 0!==g.me[w]?Ba("Output port "+ga(w)+" registered by "+g.me[w][0].id+", ignoring "+p.id):g.me[w]=[p,v,!1,!1]}}
        function tc(a,b,c,d){var e=a.me[b];void 0!==e?(e[1]&&e[1].call(e[0],b,c,d),a.Y&&a.Rh!=e[2]&&uc(a.Y,b,c)):a.Y&&(lb(a.Y,a,b,c,d),a.Rh&&uc(a.Y,b,c))}function fc(a,b,c){Ba("Memory block error ("+a+","+h(b)+","+h(c)+")");return!1}var vc;if(rb){var wc=new ArrayBuffer(2);(new DataView(wc)).setUint16(0,256,!0);vc=256===(new Uint16Array(wc))[0]}else vc=!1;var xc=vc;
        function t(a,b,c,d,e,g){this.id=yc+=2;this.ea=null;this.offset=0;this.Ba=a;this.gg=b;this.size=c||0;this.type=d||zc;this.ee=d==Ac;this.Z=null;this.O=g;this.Ta=this.On=!1;Bc(this);if(c)if(e)this.Z=e,a=e.$n(a),this.ea=a[0],this.offset=a[1],this.Sd(e.ul());else if(rb)this.buffer=new ArrayBuffer(c),this.hf=new DataView(this.buffer,0,c),this.Wb=new Uint8Array(this.buffer,0,c),this.Gi=new Uint16Array(this.buffer,0,c>>1),this.ea=new Int32Array(this.buffer,0,c>>2),this.Sd(xc?Cc:Dc);else{this.ea=Array(c>>
        2);for(e=0;e<this.ea.length;e++)this.ea[e]=0;this.Sd(Ec)}else this.Sd()}var zc=0,Ac=2,Fc="NONE RAM ROM VIDEO H/W UNPAGED PAGED".split(" "),Gc=["black","blue","green","cyan"],yc=0;function Hc(a){rb&&!xc&&(a=a<<24|a<<8&16711680|a>>8&65280|a>>>24);return a}
        t.prototype={constructor:t,parent:null,clone:function(a,b){this.id=a.id|1;this.gg=a.gg;this.size=a.size;b&&(this.type=b,this.ee=b==Ac);rb?(this.buffer=a.buffer,this.hf=a.hf,this.Wb=a.Wb,this.Gi=a.Gi,this.ea=a.ea,this.Sd(xc?Cc:Dc)):(this.ea=a.ea,this.Sd(Ec))},save:function(){var a,b;if(this.Z)a=null;else if(rb)for(a=Array(this.size>>2),b=0;b<a.length;b++)a[b]=this.hf.getInt32(b<<2,!0);else a=this.ea;return a},restore:function(a){if(this.Z)return null==a;if(a&&this.size==a.length<<2){var b;if(rb)for(b=
        0;b<a.length;b++)this.hf.setInt32(b<<2,a[b],!0);else this.ea=a;return this.Ta=!0}return!1},Sd:function(a){a||(a=5==this.type?Ic:6==this.type?Jc:Lc);Mc(this,a,!0);Nc(this,a,!0)},Xe:function(a,b){this.Y&&(b?0===this.Cn++&&Nc(this,Oc):0===this.zn++&&Mc(this,Oc))},Go:function(){this.Y&&this.Y.qa(128)&&this.Y.message("attempt to read invalid block %"+h(this.Ba),!0);return 255},Af:function(a,b){this.Y&&this.Y.qa(128)&&this.Y.message("attempt to write "+ga(b)+" to invalid block %"+h(this.Ba),!0)},Ho:function(a,
        b){return this.tc(a,b)|this.tc(a+1,b)<<8},Eo:function(a,b){return this.tc(a,b)|this.tc(a+1,b)<<8|this.tc(a+2,b)<<16|this.tc(a+3,b)<<24},$o:function(a,b){this.Fc(a,b&255);this.Fc(a+1,b>>8)},Yo:function(a,b){this.Fc(a,b&255);this.Fc(a+1,b>>8&255);this.Fc(a+2,b>>16&255);this.Fc(a+3,b>>>24)},rs:function(a){return this.ea[a>>2]>>>((a&3)<<3)&255},Ds:function(a){var b=a>>2;a=(a&3)<<3;var c=this.ea[b]>>a;return 24>a?c&65535:c&255|(this.ea[b+1]&255)<<8},xs:function(a){var b=a>>2;a=(a&3)<<3;var c=this.ea[b];
        a&&(c=c>>>a|this.ea[b+1]<<32-a);return c},Qs:function(a,b){var c=a>>2,d=(a&3)<<3;this.ea[c]=this.ea[c]&~(255<<d)|b<<d;this.Ta=!0},bt:function(a,b){var c=a>>2,d=(a&3)<<3;24>d?this.ea[c]=this.ea[c]&~(65535<<d)|b<<d:(this.ea[c]=this.ea[c]&16777215|b<<24,c++,this.ea[c]=this.ea[c]&-256|b>>8);this.Ta=!0},Ws:function(a,b){var c=a>>2,d=(a&3)<<3;if(d){var e=-1<<d;this.ea[c]=this.ea[c]&~e|b<<d;c++;this.ea[c]=this.ea[c]&e|b>>>32-d}else this.ea[c]=b;this.Ta=!0},ps:function(a,b){this.Y&&Pc(this.Y,b);return this.Yg(a,
        b)},Bs:function(a,b){this.Y&&(Pc(this.Y,b)||Pc(this.Y,b+1));return this.Nm(a,b)},vs:function(a,b){this.Y&&(Pc(this.Y,b)||Pc(this.Y,b+1)||Pc(this.Y,b+2)||Pc(this.Y,b+3));return this.Fo(a,b)},Os:function(a,b,c){this.Y&&Qc(this.Y,c);this.ee?this.Af(a,b,c):this.ti(a,b,c)},$s:function(a,b,c){this.Y&&(Qc(this.Y,c)||Qc(this.Y,c+1));this.ee?this.Af(a,b,c):this.an(a,b,c)},Us:function(a,b,c){this.Y&&(Qc(this.Y,this.Ba+a)||Qc(this.Y,this.Ba+a+1)||Qc(this.Y,this.Ba+a+2)||Qc(this.Y,this.Ba+a+3));this.ee?this.Af(a,
        b,c):this.Zo(a,b,c)},ss:function(a,b){this.kd.ea[this.qd]|=this.qe;this.ld.ea[this.rd]|=this.qe;return this.sg.tc(a,b)},Es:function(a,b){this.kd.ea[this.qd]|=this.qe;this.ld.ea[this.rd]|=this.qe;return this.sg.ji(a,b)},ys:function(a,b){this.kd.ea[this.qd]|=this.qe;this.ld.ea[this.rd]|=this.qe;return this.sg.Ec(a,b)},Rs:function(a,b,c){this.kd.ea[this.qd]|=this.qe;this.ld.ea[this.rd]|=this.Wk;this.sg.Fc(a,b,c)},ct:function(a,b,c){this.kd.ea[this.qd]|=this.qe;this.ld.ea[this.rd]|=this.Wk;this.sg.ui(a,
        b,c)},Xs:function(a,b,c){this.kd.ea[this.qd]|=this.qe;this.ld.ea[this.rd]|=this.Wk;this.sg.Oe(a,b,c)},ts:function(a,b){return(Rc(this.O,b,!1)||this).tc(a,b)},Fs:function(a,b){return(Rc(this.O,b,!1)||this).ji(a,b)},zs:function(a,b){return(Rc(this.O,b,!1)||this).Ec(a,b)},Ss:function(a,b,c){(Rc(this.O,c,!0)||this).Fc(a,b,c)},dt:function(a,b,c){(Rc(this.O,c,!0)||this).ui(a,b,c)},Ys:function(a,b,c){(Rc(this.O,c,!0)||this).Oe(a,b,c)},os:function(a){return this.Wb[a]},qs:function(a){return this.Wb[a]},As:function(a){return this.hf.getUint16(a,
        !0)},Cs:function(a){return a&1?this.Wb[a]|this.Wb[a+1]<<8:this.Gi[a>>1]},us:function(a){return this.hf.getInt32(a,!0)},ws:function(a){return a&3?this.Wb[a]|this.Wb[a+1]<<8|this.Wb[a+2]<<16|this.Wb[a+3]<<24:this.ea[a>>2]},Ns:function(a,b){this.Wb[a]=b;this.Ta=!0},Ps:function(a,b){this.Wb[a]=b;this.Ta=!0},Zs:function(a,b){this.hf.setUint16(a,b,!0);this.Ta=!0},at:function(a,b){a&1?(this.Wb[a]=b,this.Wb[a+1]=b>>8):this.Gi[a>>1]=b;this.Ta=!0},Ts:function(a,b){this.hf.setInt32(a,b,!0);this.Ta=!0},Vs:function(a,
        b){a&3?(this.Wb[a]=b,this.Wb[a+1]=b>>8,this.Wb[a+2]=b>>16,this.Wb[a+3]=b>>24):this.ea[a>>2]=b;this.Ta=!0}};function Sc(a,b){a.Y&&(b?0===--a.Cn&&(a.Fc=a.ee?a.Af:a.ti,a.ui=a.ee?a.Af:a.an,a.Oe=a.ee?a.Af:a.Zo):0===--a.zn&&(a.tc=a.Yg,a.ji=a.Nm,a.Ec=a.Fo))}function Bc(a,b,c,d,e,g){a.sg=b;a.kd=c;a.qd=d>>2;a.ld=e;a.rd=g>>2;a.Wk=b?Hc(Tc|Uc):0;a.qe=b?Hc(Tc):0}function gc(a,b,c,d){a.Y=b;a.zn=a.Cn=0;Vc(a.Y,c,d)}
        function Nc(a,b,c){a.Fc=!a.ee&&b[3]||a.Af;a.ui=!a.ee&&b[4]||a.$o;a.Oe=!a.ee&&b[5]||a.Yo;c&&(a.ti=b[3]||a.Af,a.an=b[4]||a.$o,a.Zo=b[5]||a.Yo)}function Mc(a,b,c){a.tc=b[0]||a.Go;a.ji=b[1]||a.Ho;a.Ec=b[2]||a.Eo;c&&(a.Yg=b[0]||a.Go,a.Nm=b[1]||a.Ho,a.Fo=b[2]||a.Eo)}
        var Lc=[],Ec=[t.prototype.rs,t.prototype.Ds,t.prototype.xs,t.prototype.Qs,t.prototype.bt,t.prototype.Ws],Oc=[t.prototype.ps,t.prototype.Bs,t.prototype.vs,t.prototype.Os,t.prototype.$s,t.prototype.Us],Jc=[t.prototype.ss,t.prototype.Es,t.prototype.ys,t.prototype.Rs,t.prototype.ct,t.prototype.Xs],Ic=[t.prototype.ts,t.prototype.Fs,t.prototype.zs,t.prototype.Ss,t.prototype.dt,t.prototype.Ys];
        if(rb)var Dc=[t.prototype.os,t.prototype.As,t.prototype.us,t.prototype.Ns,t.prototype.Zs,t.prototype.Ts],Cc=[t.prototype.qs,t.prototype.Cs,t.prototype.ws,t.prototype.Ps,t.prototype.at,t.prototype.Vs];
        function Wc(a,b){Ua.call(this,"CPU",a,Wc,1);var c=a.cycles||b,d=a.multiplier||1;this.T={};this.T.ge=c;this.T.Ce=d;this.T.jj=Math.round(this.T.ge/1E4)/100;this.T.Uh=this.T.jj*this.T.Ce;this.fa.qb=!1;this.fa.ql=!1;this.fa.hl=a.autoStart;this.fa.Pn=!1;c=Ya.autostart;void 0!==c&&(this.fa.hl="true"==c?!0:"false"==c?!1:null);this.fa.Ag=!1;this.T.Wh=this.T.Og=0;this.T.Xh=a.csStart;this.T.Ng=a.csInterval;this.T.Pg=a.csStop;this.Cd=[];var e=this;this.jr=function(){e.ag()};ob(this)}eb(Wc);f=Wc.prototype;
        f.Kc=function(a,b,c,d){this.ma=b;this.Y=d;this.Fa=a;for(b=null;b=xb(a,"Video",b);)this.Cd.push(b);this.ja=xb(a,"ChipSet");ob(this)};f.reset=function(){};f.save=function(){return null};f.restore=function(){return!1};f.lc=function(a,b){if(!b){if(a&&this.restore){Xc(this);if(!this.restore(a))return!1;Yc(this)}else this.reset();this.Y?this.Y.Jq():this.R("No debugger detected")}Zc(this);return!0};f.kc=function(a){return a&&this.save?this.save():!0};
        function $c(a){(!0===a.fa.hl||null===a.fa.hl&&!a.Y&&void 0===a.va.run)&&a.ag()}f.Zn=function(){return 0};function Yc(a){void 0===a.T.Xh&&(a.T.Xh=0);void 0===a.T.Ng&&(a.T.Ng=-1);void 0===a.T.Pg&&(a.T.Pg=-1);a.fa.Ag=0<=a.T.Xh&&0<a.T.Ng;a.fa.Ag&&(a.T.Wh=0,a.T.Og=a.T.Xh-a.Xf)}function ad(a,b){if(a.fa.Ag){var c=!1;a.T.Wh=a.T.Wh+a.Zn()|0;a.T.Og-=b;0>=a.T.Og&&(a.T.Og+=a.T.Ng,c=!0);0<=a.T.Pg&&a.T.Pg<=cd(a)&&(a.T.Ng=a.T.Pg=-1,Yc(a),a.zb(),c=!0);c&&a.R(cd(a)+" cycles: checksum="+h(a.T.Wh))}}
        f.zd=function(){this.Fa&&this.Fa.Ge&&this.Fa.Ge.zd()};
        function dd(a){for(var b=0;b<a.Cd.length;b++)ed(a.Cd[b]);if(a.Fa&&a.Fa.Ge&&(a=a.Fa.Ge,a.Cp)){Cb(a,18,a.Dh,a.op,a.canvas.style.color);if(a.nu){var b=a.ma,c=a.mb,d,e;null==d&&(d=0);null==e&&(e=b.Mk-d|0);null==c&&(c={$k:0,re:0,Gk:[]});var g=d>>>b.Ca;d=d+e-1>>>b.Ca;c.$k=0;for(c.re=0;g<=d;)e=b.na[g],c.$k+=e.size,e.size&&(c.Gk.push(va(Ab,g,0,0,e.type)),c.re++),g++;a.mb=c;a.Do=a.mb.re*a.ma.nb/691200;b=0;a.mb.An=0;a.mb.sh||(a.mb.sh=[]);c=-1;d=0;var l=-1;for(e=0;e<a.mb.re;e++){var p=a.mb.Gk[e],g=wa(Ab.type,
        p),p=wa(Ab.Ao,p);if(g!=c||p!=l+1)(l=e-d)&&(b+=Xb(a,d,l,c)),c=g,d=e;l=p}b+=Xb(a,d,e-d,c);c=a.mb.mp!=b;a.mb.mp=b;if(c){c=new vb(0,0,a.Dh.width,a.Dh.height);a.mb.og=[];d=a.mb.re;for(b=0;b<a.mb.An;b++)e=a.mb.sh[b].re,a.mb.og.push(wb(c,e,d,!b)),d-=e;for(b=0;b<a.mb.og.length;b++)c=a.mb.sh[b],d=e=a.mb.og[b],g=a.op,(l=Gc[c.type])||(l=new ub),g.strokeStyle="black",g.strokeRect(d.x,d.y,d.Xc,d.nd),g.fillStyle="string"==typeof l?l:l.toString(),g.fillRect(d.x,d.y,d.Xc,d.nd),d=a,g=e,d.hj=d.Yn,d.Ig=d.bo,e=g.x+(g.Xc>>
        1),l=g.y+(g.nd>>1),p=g.nd,g.Xc<g.nd&&(p=g.Xc,d.Wn=!0,d.$d.save(),d.$d.translate(e,l),d.$d.rotate(-Math.PI/2),e=l=0),p<d.Ig&&(d.Ig=p,d.hj=d.Ig+"px Monaco, Lucida Console, Courier New"),g=l,d.Ad=e,d.kg=g,d=a,c=Fc[c.type]+" ("+(c.re*a.ma.nb/1024|0)+"Kb)",d.$d.font=d.hj,d.Ad-=d.$d.measureText(c).width>>1,d.kg+=(d.Ig>>1)-2,Eb(d,c),d.Wn&&(d.$d.restore(),d.Wn=!1)}}else Eb(a,"This space intentionally left blank");a.Wi.drawImage(a.Dh,0,0,a.Dh.width,a.Dh.height,a.Hu,a.Ku,a.fu,a.iu);a.Cp=!1}}
        f.ed=function(){this.Cd.length&&this.Cd[0].ed()};
        f.Nb=function(a,b,c){var d=this;a=!1;switch(b){case "run":this.va[b]=c;c.onclick=function(){var a;if(a=d.Fa)if(a=d.Fa,a.fa.jc)a=!0;else{var b=null,c,p=fb(a.id);for(c=0;c<p.length&&(b=p[c],b===a||b.fa.Dg);c++);if(c==p.length)for(c=0;c<p.length&&(b=p[c],b===a||b.fa.jc);c++);c==p.length&&(b=a);Ba("The "+b.type+" component ("+b.id+") is not "+(b.fa.Dg?"powered yet":"ready yet"+(b.gj?" (waiting for notification)":""))+".");a=!1}a&&(d.fa.qb?d.zb(!0):d.ag(!0))};a=!0;break;case "reset":this.va[b]=c;c.onclick=
        function(){d.Fa&&fd(d.Fa)};a=!0;break;case "speed":this.va[b]=c;a=!0;break;case "setSpeed":this.va[b]=c,c.onclick=function(){gd(d,d.T.Ce<<1,!0)},c.textContent=Ib(this),a=!0}return a};function hd(a,b){if(a.fa.qb){var c=a.A-b;a.A-=c;a.ud-=c}}function id(a,b,c){a.Xf+=b;c&&(a.ud=a.A=0)}
        function jd(a,b){var c=30;60>c&&(c=60);2>c&&(c=2);var d=1;b&&1<a.T.Ce&&a.T.nf&&(d=a.T.nf/a.T.jj);a.T.mo=Math.round(1E3/30);a.T.Zq=Math.floor(a.T.ge/c*d);a.T.Dl=Math.floor(a.T.ge/30*d);a.T.ro=Math.floor(a.T.ge/60*d);a.T.qo=Math.floor(a.T.ge/2*d);b||(a.T.Qg=a.T.Dl,a.T.Zh=a.T.ro,a.T.Yh=a.T.qo);a.T.El=0}function cd(a,b){var c=a.Xf+a.rf+a.ud-a.A;b&&1<a.T.Ce&&a.T.nf>a.T.jj&&(c=Math.round(c/a.T.Ce));return c}function Xc(a){a.T.nf=0;a.Xf=a.rf=a.ud=a.A=0;Yc(a);gd(a,1)}
        function Kb(a){return a.fa.qb&&a.T.nf?a.T.nf.toFixed(2)+"Mhz":"Stopped"}function Ib(a){return a.T.Uh.toFixed(2)+"Mhz"}function gd(a,b,c){if(void 0!==b){.8>a.T.nf/a.T.Uh&&(b=1);a.T.Ce=b;b=a.T.jj*a.T.Ce;if(a.T.Uh!=b){a.T.Uh=b;b=Ib(a);var d=a.va.setSpeed;d&&(d.textContent=b);a.R("target speed: "+b)}c&&a.ed()}id(a,a.rf);a.rf=0;a.T.Mg=ra();a.T.Uf=0;jd(a)}
        f.ag=function(a){if(mb(this,!0)){if(!this.fa.qb){gd(this);this.Fa&&this.Fa.start(this.T.Mg,cd(this));this.fa.qb=!0;this.fa.ql=!0;this.ja&&kd(this.ja);var b=this.va.run;b&&(b.textContent="Halt");this.zd(!0);a&&this.ed()}this.T.El>=this.T.ge&&jd(this,!0);this.T.$h=0;this.T.kj=ra();this.T.Uf&&(a=this.T.kj-this.T.Uf,a>this.T.mo&&(this.T.Mg+=a,this.T.Mg>this.T.kj&&(this.T.Mg=this.T.kj)));try{do{var c=this.fa.Ag?1:this.T.Zq;if(this.ja){ld(this.ja);var d=this.ja;a=c;var e=d.Pb[0];if(e.Rf){var g=(cd(d.O,
        d.jf)-e.Od)/d.ik|0,l=md(d,0)-g;6==e.mode&&(l-=g);var p=l*d.ik|0;6==e.mode&&(p>>=1);a>p&&(a=p)}var c=a,v=this.ja;a=c;if(v.ga&&v.ga[11]&64){var w=v.Xg-cd(v.O,v.jf);0<w&&a>w&&(a=w)}c=a}this.kh(c);var F=this.ud-this.A;this.rf+=F;this.T.$h+=F;id(this,0,!0);ad(this,F);this.T.Zh-=F;0>=this.T.Zh&&(this.T.Zh+=this.T.ro,dd(this));this.T.Yh-=F;0>=this.T.Yh&&(this.T.Yh+=this.T.qo,this.zd());this.T.Qg-=F;if(0>=this.T.Qg){this.T.Qg+=this.T.Dl;break}}while(this.fa.qb)}catch(K){this.zb();Zc(this);this.Fa&&this.Fa.stop(ra(),
        cd(this));mb(this,!1);qb(this,K.stack||K.message);return}c=setTimeout;d=this.jr;this.T.Uf=ra();e=this.T.mo;this.T.$h&&(e=Math.round(e*this.T.$h/this.T.Dl));e-=this.T.Uf-this.T.kj;if(g=this.T.Uf-this.T.Mg)this.T.nf=Math.round(this.rf/(10*g))/100,864E5<=g&&(this.Xf=0,this.ja&&ld(this.ja,!0),gd(this));if(0>e||this.T.nf<this.T.Uh)e=0;this.T.El+=this.T.$h;this.T.Uf+=e;c(d,e)}else Zc(this),this.Fa&&this.Fa.stop(ra(),cd(this))};f.kh=function(){return 0};
        f.zb=function(a){nb(this,!0);this.ud-=this.A;this.A=0;id(this,this.rf);this.rf=0;if(this.fa.qb){this.fa.qb=!1;this.ja&&kd(this.ja);var b=this.va.run;b&&(b.textContent="Run")}this.fa.we=a};function Zc(a){dd(a);a.zd()}var Lb=80386,n=-1,Wb=1,Vb=4,Ub=16,Tb=64,Sb=128,Rb=256,Qb=512,Pb=1024,Ob=2048,Uc=64,Tc=32,nd=Rb|Qb|Pb,od=Wb|Vb|Ub|Tb|Sb|Ob,pd=Wb|Vb|Ub|Tb|Sb;
        function qd(a,b,c,d){this.O=a;this.Y=a.Y;this.id=b;this.qi=c||"";this.ia=0;this.gb=65535;this.tf=this.gb+1;this.Pa=this.Bc=this.Lh=this.Rb=this.type=this.ya=0;this.Ed=n;this.pa=this.Hd=2;this.C=this.V=65535;this.rn=this.id==rd?Array(32):[];this.jl=null;this.fj=!1;sd(this,!0,d)}var rd=1;f=qd.prototype;f.Rq=function(a){this.ia=a&65535;return this.ya=this.ia<<4};
        f.Qq=function(a,b){var c,d,e=this.O;a&=65535;a&4?(c=e.yd.ya,d=c+e.yd.gb|0):(c=e.Fd,d=e.Cf);if(!b||c){c=c+(a&65528)|0;if(d-c|0)return b||(e.A-=15),td(this,c,a,b);b||ud.call(e,13,a)}return n};f.Pq=function(a){var b=this.O;a=b.Gd+(a<<2);var c=b.ra(a);b.aa&=~(Rb|Qb);return this.load(b.ra(a+2))+c|0};f.Oq=function(a){var b=this.O;a<<=3;var c=b.Gd+a|0;if(7<=(b.Ye-c|0))return td(this,c,a)+b.Qm;ud.call(b,13,a|3,!0);return n};f.jp=function(a){return this.ya+a|0};f.lp=function(a){return this.ya+a|0};
        f.En=function(a,b,c){return(a>>>0)+b<=this.tf?this.ya+a|0:this.Ti(0,0,c)};f.ip=function(a,b,c){return(a>>>0)+b>this.tf?this.ya+a|0:this.Ti(0,0,c)};f.Ti=function(a,b,c){c||ud.call(this.O,13,0);return n};f.Fn=function(a,b,c){return(a>>>0)+b<=this.tf?this.ya+a|0:this.Ui(0,0,c)};f.kp=function(a,b,c){return(a>>>0)+b>this.tf?this.ya+a|0:this.Ui(0,0,c)};f.Ui=function(a,b,c){c||ud.call(this.O,13,0);return n};
        function vd(a,b,c){var d=a.O,e=d.ra(b+2),g=d.ra(b)|(e&255)<<16,d=d.ra(b+4);a.ia=c;a.ya=g;a.gb=d;a.tf=(d>>>0)+1;a.Rb=e;a.type=e&7936;a.Lh=0;a.Ed=b;sd(a,!0)}
        function td(a,b,c,d){var e=a.O,g=e.ra(b+0),l=e.ra(b+4),p=l&7936,v=e.ra(b+2)|(l&255)<<16,w=e.ra(b+6),F=c&65528;e.ka>=Lb&&(v|=(w&65280)<<16,g|=(w&15)<<16,w&128&&(g=g<<12|4095));for(;;){var K,J,I;if(a.id==rd){a.fj=!1;K=a.jl;var T,Z;I=c&3;var S=(l&24576)>>13;if(F&&!(l&32768)){d||ud.call(e,11,c);v=n;break}if(6144<=p){I=c&3;if(I>a.Pa){if(!1!==K&&!(S==a.Pa||p&1024&&S<=a.Pa)){v=n;break}F=e.Ka();wd(e,e.Ka(),!0);u(e,F);a.fj=!0}T=!1}else{if(256==p){if(!xd(a,c,K)){v=n;break}return a.ya}if(1024==p)T=!0,Z=-1,J=
        c,I<a.Pa&&(I=a.Pa);else if(1536==p)T=!0,Z=~(16384|Rb|Qb),J=c|1;else if(1792==p)T=!0,Z=~(16384|Rb),J=c|1;else if(1280==p){if(!xd(a,v&65535,K)){v=n;break}return a.ya}}if(T){b=v&65535;if(I<=S){d=a.Pa;if(a.load(b,!0)===n){v=n;break}e.Qm=g;if(a.Pa<d){if(!0!==K){v=n;break}F=r(e);g=0;for(l&=31;l--;)a.rn[g++]=yd(e,e.ua,F),F+=2;l=e.cb.ya;K=(a.Pa<<2)+2;d=K+2;I=e.ua.ia;J=r(e);wd(e,e.ra(l+d),!0);u(e,e.ra(l+K));zd(e,I);for(zd(e,J);g;)zd(e,a.rn[--g]);a.fj=!0}e.aa&=Z;return a.ya}d||ud.call(e,13,J,!0);v=n;break}else if(!1!==
        T){d||ud.call(e,13,c,!0);v=n;break}}else if(2==a.id){if(F){if(!(l&32768)){d||ud.call(e,11,c);v=n;break}if(4096>p||2048==(p&2560)){d||ud.call(e,13,c,!!l);v=n;break}}}else if(3==a.id){if(!(l&32768)){d||ud.call(e,12,c);v=n;break}if(!F||4096>p||512!=(p&2560)){d||ud.call(e,13,c,!0);v=n;break}}else if(4==a.id){if(!F||256!=p&&768!=p){d||ud.call(e,10,c,!0);v=n;break}}else if(6==a.id&&!(p&4096)&&768<p){v=n;break}a.ia=c;a.ya=v;a.gb=g;a.tf=(g>>>0)+1;a.Rb=l;a.type=p;a.Lh=w;a.Ed=b;sd(a,!0);break}return v}
        function xd(a,b,c){var d=a.O,e=d.cb.ya,g=a.Pa,l=d.cb.ia;if(!c){if(768!=d.cb.type)return ud.call(d,10,b,!0),!1;d.Kb(d.cb.Ed+4,d.cb.Rb&-769|256)}if(d.cb.load(b)===n)return!1;var p=d.cb.ya;if(!1===c){if(768!=d.cb.type)return ud.call(d,13,b,!0),!1}else{if(768==d.cb.type)return ud.call(d,13,b,!0),!1;d.Kb(d.cb.Ed+4,d.cb.Rb|=768);d.cb.type=768}d.Kb(e+14,q(d));d.Kb(e+16,Nb(d));d.Kb(e+18,d.F);d.Kb(e+20,d.G);d.Kb(e+22,d.H);d.Kb(e+24,d.D);d.Kb(e+26,r(d));d.Kb(e+28,d.L);d.Kb(e+30,d.K);d.Kb(e+32,d.J);d.Kb(e+34,
        d.Ma.ia);d.Kb(e+36,d.ta.ia);d.Kb(e+38,d.ua.ia);d.Kb(e+40,d.bb.ia);d.yd.load(d.ra(p+42));Bd(d,d.ra(p+16)|(c?16384:0));d.F=d.ra(p+18);d.G=d.ra(p+20);d.H=d.ra(p+22);d.D=d.ra(p+24);d.L=d.ra(p+28);d.K=d.ra(p+30);d.J=d.ra(p+32);d.Ma.load(d.ra(p+34));d.bb.load(d.ra(p+40));Cd(d,d.ra(p+14),d.ra(p+36));b=38;e=26;a.Pa<g&&(e=(a.Pa<<2)+2,b=e+2);wd(d,d.ra(p+b),!0);u(d,d.ra(p+e));c&&d.Kb(p+0,l);d.hb|=8;return!0}
        f.save=function(){return[this.ia,this.ya,this.gb,this.Rb,this.id,this.qi,this.Pa,this.Bc,this.Ed,this.Hd,this.V,this.pa,this.C,this.type,this.tf]};f.restore=function(a){"number"==typeof a?this.load(a):(this.ia=a[0],this.ya=a[1],this.gb=a[2],this.Rb=a[3],this.id=a[4],this.qi=a[5],this.Pa=a[6],this.Bc=a[7],this.Ed=a[8],this.Hd=a[9]||2,this.V=a[10]||65535,this.pa=a[11]||2,this.C=a[12]||65535,this.type=a[13]||this.Rb&7936,this.tf=a[14]||(this.gb>>>0)+1)};
        function sd(a,b,c){void 0===c&&(c=!!(a.O.hb&1));a.Bg=!1;if(c){a.load=a.Qq;a.io=a.Oq;a.Ac=a.En;a.oc=a.Fn;if(!(a.ia&-4))a.Ac=a.Ti,a.oc=a.Ui;else if(a.type&4096){6144==(a.type&6656)&&(a.Ac=a.Ti);if(a.type&2048||!(a.type&512))a.oc=a.Ui;1024==(a.type&3072)&&(a.Ac==a.En&&(a.Ac=a.ip),a.oc==a.Fn&&(a.oc=a.kp),a.Bg=!0)}b&&(a.ia&-4&&a.Ed!==n&&(b=a.Ed+5,a.O.dd(b,a.O.Qa(b)|1)),a.Pa=a.ia&3,a.Bc=(a.Rb&24576)>>13,a.O.ka<Lb||!(a.Lh&64)?(a.pa=2,a.C=65535):(a.pa=4,a.C=-1),a.Hd=a.pa,a.V=a.C)}else a.load=a.Rq,a.io=a.Pq,
        a.Ac=a.jp,a.oc=a.lp,a.Pa=a.Bc=0,a.Ed=n}
        function Dd(a){this.ka=a.model||8088;var b=0;switch(this.ka){default:b=4772727;break;case 80286:b=6E6;break;case Lb:b=16E6}Wc.call(this,a,b);this.fn=61442;this.wi=nd;this.vi=4;this.Hb=255;this.B=this.ka==Lb?Ed:80286==this.ka?Fd:Gd;this.Oa=Id;this.jn=Jd;this.kn=Kd;this.ln=Ld;if(80186<=this.ka&&(this.Oa=Id.slice(),this.jn=Jd.slice(),this.kn=Kd.slice(),this.Hb=31,this.Oa[15]=Md,this.Oa[96]=Nd,this.Oa[97]=Od,this.Oa[98]=Pd,this.Oa[99]=Md,this.Oa[100]=Md,this.Oa[101]=Md,this.Oa[102]=Md,this.Oa[103]=Md,
        this.Oa[104]=Qd,this.Oa[105]=Rd,this.Oa[106]=Sd,this.Oa[107]=Td,this.Oa[108]=Ud,this.Oa[109]=Vd,this.Oa[110]=Wd,this.Oa[111]=Xd,this.Oa[192]=Yd,this.Oa[193]=Zd,this.Oa[200]=$d,this.Oa[201]=ae,this.Oa[241]=be,this.jn[7]=ce,this.kn[7]=ce,80286<=this.ka)){this.fn=2;this.wi|=28672;this.vi=0;this.Oa[15]=de;this.rh=ee.slice();for(a=0;a<this.rh.length;a++)this.rh[a]||(this.rh[a]=fe);this.Oa[84]=ge;this.Oa[99]=he;if(this.ka>=Lb){var c;this.Oa[100]=ie;this.Oa[101]=je;this.Oa[102]=ke;this.Oa[103]=le;for(c in x)this.rh[+c]=
        x[c]}}this.zi=[];this.Ai=[];this.ud=this.Bh=0;this.fa.we=this.fa.Nn=!1;this.yn=0;this.Se=this.na=[];this.Ca=this.nb=this.Ga=this.Ae=this.td=this.Db=this.Ee=0;me(this)}eb(Dd,Wc);
        var Gd={gi:4,N:5,da:6,ba:7,ca:8,I:9,P:11,Q:12,pf:4,Gl:60,Hl:83,bc:3,Gb:9,rc:16,di:1,Ol:19,Ql:28,Sl:16,Rl:21,Pl:37,Ml:2,yj:9,Nl:5,Ll:33,Aj:10,zj:8,Tg:3,Sg:15,fm:51,gm:1,hm:2,im:4,em:32,Bj:15,km:15,Ha:16,Ia:4,mm:11,lm:18,jm:24,Ob:4,nm:2,Vf:16,om:17,Gj:18,pm:19,Fj:5,Hj:6,um:2,tm:8,rm:9,sm:10,qm:10,Ij:10,Jj:10,Ul:80,Wl:144,Tl:86,Vl:154,Yl:101,$l:165,Xl:107,Zl:171,wm:70,ym:113,vm:76,xm:124,bm:80,dm:128,am:86,cm:134,Vg:3,Ug:16,Qj:10,Pj:8,zm:51,cc:8,Am:17,Bm:36,Cc:11,Cm:16,qf:10,bd:2,vj:18,wj:7,xj:15,Cj:12,
        Dj:7,Ej:11,Kj:18,Lj:7,Mj:15,Rj:15,Sj:7,Tj:13,Zj:11,$j:7,ak:8,Dm:8,Gm:12,Em:18,Fm:17,Hm:15,Vj:8,Uj:20,Wj:2,dk:3,Wg:9,ck:5,bk:11,fk:4,ek:17,Im:11},Fd={gi:0,N:0,da:0,ba:0,ca:0,I:0,P:1,Q:1,pf:3,Gl:14,Hl:16,bc:2,Gb:7,rc:7,di:0,Ol:7,Ql:13,Sl:7,Rl:11,Pl:16,Ml:3,yj:6,Nl:2,Ll:13,Aj:5,zj:5,Tg:2,Sg:7,fm:23,gm:0,hm:1,im:3,em:17,Bj:7,km:11,Ha:7,Ia:3,mm:7,lm:11,jm:15,Ob:2,nm:3,Vf:7,om:8,Gj:8,pm:8,Fj:4,Hj:4,um:2,tm:3,rm:5,sm:2,qm:3,Ij:5,Jj:3,Ul:14,Wl:22,Tl:17,Vl:25,Yl:17,$l:25,Xl:20,Zl:28,wm:13,ym:21,vm:16,xm:24,
        bm:13,dm:21,am:16,cm:24,Vg:2,Ug:7,Qj:5,Pj:5,zm:19,cc:5,Am:5,Bm:17,Cc:3,Cm:5,qf:3,bd:0,vj:8,wj:5,xj:9,Cj:5,Dj:5,Ej:4,Kj:5,Lj:5,Mj:4,Rj:7,Sj:5,Tj:8,Zj:3,$j:4,ak:3,Dm:11,Gm:11,Em:15,Fm:15,Hm:7,Vj:5,Uj:8,Wj:0,dk:2,Wg:6,ck:3,bk:6,fk:3,ek:5,Im:5},Ed={gi:0,N:0,da:0,ba:0,ca:0,I:0,P:1,Q:1,pf:3,Gl:14,Hl:16,bc:2,Gb:7,rc:7,di:0,Ol:7,Ql:13,Sl:7,Rl:11,Pl:16,Ml:3,yj:6,Nl:2,Ll:13,Aj:5,zj:5,Tg:2,Sg:7,fm:23,gm:0,hm:1,im:3,em:17,Bj:7,km:11,Ha:7,Ia:3,mm:7,lm:11,jm:15,Ob:2,nm:3,Vf:7,om:8,Gj:8,pm:8,Fj:4,Hj:4,um:2,tm:3,
        rm:5,sm:2,qm:3,Ij:5,Jj:3,Ul:14,Wl:22,Tl:17,Vl:25,Yl:17,$l:25,Xl:20,Zl:28,wm:13,ym:21,vm:16,xm:24,bm:13,dm:21,am:16,cm:24,Vg:2,Ug:7,Qj:5,Pj:5,zm:19,cc:5,Am:5,Bm:17,Cc:3,Cm:5,qf:3,bd:0,vj:8,wj:5,xj:9,Cj:5,Dj:5,Ej:4,Kj:5,Lj:5,Mj:4,Rj:7,Sj:5,Tj:8,Zj:3,$j:4,ak:3,Dm:11,Gm:11,Em:15,Fm:15,Hm:7,Vj:5,Uj:8,Wj:0,dk:2,Wg:6,ck:3,bk:6,fk:3,ek:5,Im:5,vo:11,Kl:6,Il:8,Jl:5,dr:3,br:6,cr:6,xo:9,wo:12,Oj:3,Nj:6,fr:4,er:5,Yj:3,Xj:7};f=Dd.prototype;
        f.xl=function(a,b){this.na=this.Se=a;this.Ca=b;this.nb=1<<this.Ca;this.Ga=this.nb-1;this.Ae=a.length;this.td=this.Ae-1};function ne(a){if(a.na===a.Se){a.na=Array(a.Ae);a.Xk=new t(null,0,0,5,null,a);for(var b=0;b<a.Ae;b++)a.na[b]=a.Xk}else for(b=0;b<a.xi.length;b++)a.na[a.xi[b]]=a.Xk;a.xi=[]}
        function Rc(a,b,c,d){var e=(b&-4194304)>>>20,g=a.Se[(a.uf+e&a.Db)>>>a.Ca],l=g.Ec(e);if(!(l&1))return d||oe.call(a,b,!1,c),null;if(!(l&4)&&3==a.ta.Pa)return d||oe.call(a,b,!0,c),null;var p=(b&4190208)>>>10,l=a.Se[((l&-4096)+p&a.Db)>>>a.Ca],v=l.Ec(p);if(!(v&1||d))return d||oe.call(a,b,!1,c),null;if(!(v&4)&&3==a.ta.Pa)return d||oe.call(a,b,!0,c),null;c=a.Se[((v&-4096)+(b&4095)&a.Db)>>>a.Ca];if(d)return c;d=new t(b&-4096,0,0,6);Bc(d,c,g,e,l,p);b>>>=a.Ca;a.na[b]=d;a.xi.push(b);return d}
        f.reset=function(){this.fa.qb&&this.zb();me(this);Xc(this);this.fa.Ld=!1};
        function me(a){a.F=0;a.D=0;a.G=0;a.H=0;a.je=0;a.L=0;a.K=0;a.J=0;a.Zb=!1;a.ub=a.mc=0;a.Rd=0;a.Li=0;a.hb=65520;a.Gd=0;a.Ye=1023;a.aa=a.uj=0;a.hh=a.oi=a.gh=a.ih=0;a.rj=-1;a.ta=new qd(a,rd,"CS");a.bb=new qd(a,2,"DS");a.Ma=new qd(a,2,"ES");a.ua=new qd(a,3,"SS");u(a,0);wd(a,0);a.ka>=Lb&&(a.H=772,a.hb=16,a.ki=0,a.Yf=0,a.uf=0,a.nn=Array(8),a.on=Array(8),a.xc=new qd(a,2,"FS"),a.yc=new qd(a,2,"GS"));a.To=new qd(a,0,"NULL");a.ha=a.bb;a.la=a.ua;a.S=a.Aa=0;a.X=a.La=n;a.Bb=0;Cd(a,0,65535);if(80286<=a.ka){a.Fd=
        0;a.Cf=65535;a.yd=new qd(a,5,"LDT",!0);a.cb=new qd(a,4,"TSS",!0);a.Tb=new qd(a,6,"VER",!0);Cd(a,65520,61440);var b,c=q(a);b=a.ta;var d=-65536;b.O.ka<Lb&&(d&=16777215);b=b.ya=d;a.sa=b+c|0;a.ni=b+a.ta.gb|0}Bd(a,0);pe(a)}function qe(a){2==a.Hd?(a.$b=a.ra,a.Rc=y,a.fd=re,a.Ve=se,a.Na=z,a.Lb=te,a.Qc=ue):(a.$b=a.fe,a.Rc=A,a.fd=ve,a.Ve=we,a.Na=B,a.Lb=xe,a.Qc=ye)}function ze(a,b){a.pa!=b&&(a.Aa|=4096,a.pa=b,a.C=2==b?65535:-1,Ae(a))}
        function Ae(a){2==a.pa?(a.dataType=32768,a.qc=a.ra,a.dg=a.Kb):(a.dataType=-2147483648,a.qc=a.fe,a.dg=a.Ak)}function Be(a){a.Hd=a.ta.Hd;a.V=a.ta.V;qe(a);a.pa=a.ta.pa;a.C=a.ta.C;Ae(a);a.Aa&=-12289}f.Zn=function(){var a=this.F+this.D+this.G+this.H+r(this)+this.L+this.K+this.J|0;return a=a+q(this)+Mb(this)+this.bb.ia+this.ua.ia+this.Ma.ia+Nb(this)|0};function Ce(a,b,c,d){void 0!==d&&(void 0===a.zi[b]&&(a.zi[b]=[]),a.zi[b].push([c,d]))}
        function De(a,b){var c=a.zi[b];if(void 0!==c)for(var d=0;d<c.length;d++)if(!c[d][1].call(c[d][0],a.sa))return!1;a.fa.Nn&&a.qa(16)&&Ee(a.Y,b,a.sa)&&Fe(a,a.sa,function(a,c){return function(d){Ge(a.Y,b,d,cd(a)-c)}}(a,cd(a)));return!0}function Fe(a,b,c){void 0!==c&&(null==a.Ai[b]&&a.Bh++,a.Ai[b]=c)}function He(a,b){var c=a.Ai[b];null!=c&&(c(--a.Bh),delete a.Ai[b])}
        function pe(a,b){void 0===b&&(b=!!(a.hb&1));!b!=!(a.hb&1)&&a.qa()&&a.ab("CPU switching to "+(b?"protected":"real")+"-mode",a.Yb,!0);a.ln=b?Ie:Ld;sd(a.ta);sd(a.bb);sd(a.ua);sd(a.Ma);a.ka>=Lb&&(sd(a.xc),sd(a.yc),Be(a))}
        f.save=function(){var a=new Je(this);a.set(0,[this.F,this.D,this.G,this.H,r(this),this.L,this.K,this.J]);var b=q(this),c=this.ta.save(),d=this.bb.save(),e=this.ua.save(),g=this.Ma.save(),l;null!=this.Fd?(l=[this.hb,this.Fd,this.Cf,this.Gd,this.Ye,this.yd.save(),this.cb.save(),this.uj],l.push(this.ki),l.push(this.Yf),l.push(this.uf),l.push(this.nn),l.push(this.on)):l=null;b=[b,c,d,e,g,l,Nb(this)];this.ka>=Lb&&(b.push(this.xc.save()),b.push(this.yc.save()));a.set(1,b);a.set(2,[this.ha.qi,this.la.qi,
        this.S,this.Aa,this.Bb,this.X,this.La]);a.set(3,[0,this.Xf,this.T.Ce]);a.set(4,mc(this.ma));return a.data()};
        f.restore=function(a){var b=a[0];this.F=b[0];this.D=b[1];this.G=b[2];this.H=b[3];var c=b[4];this.L=b[5];this.K=b[6];this.J=b[7];b=a[1];this.ta.restore(b[1]);this.bb.restore(b[2]);this.ua.restore(b[3]);this.Ma.restore(b[4]);var d=b[5];d&&d.length&&(this.hb=d[0],this.Fd=d[1],this.Cf=d[2],this.Gd=d[3],this.Ye=d[4],this.yd.restore(d[5]),this.cb.restore(d[6]),this.uj=d[7],this.ka>=Lb&&(this.ki=d[8],this.Yf=d[9],this.uf=d[10],this.nn=d[11],this.on=d[12]),pe(this));Bd(this,b[6]);Cd(this,b[0],this.ta.ia);
        u(this,c);wd(this,this.ua.ia);this.ka>=Lb&&(this.xc.restore(b[7]),this.yc.restore(b[8]));b=a[2];this.ha=null!=b[0]&&Ke(this,b[0])||this.bb;this.la=null!=b[1]&&Ke(this,b[1])||this.ua;this.S=b[2];this.Aa=b[3];this.Bb=b[4];this.X=b[5];this.La=b[6];b=a[3];this.Xf=b[1];gd(this,b[2]);a:{b=this.ma;a=a[4];for(c=0;c<a.length-1;c+=2){var d=a[c],e=a[c+1];if(e&&e.length<b.oo){for(var g=0,l=Array(b.oo),p=0;p<e.length-1;)for(var v=e[p++],w=e[p++];v--;)l[g++]=w;e=l}g=b.na[d];if(!g||!g.restore(e)){Ba("Unable to restore memory block "+
        d);b=!1;break a}}void 0!==a[c]&&dc(b,a[c]);b=!0}return b};function Ke(a,b){switch(b){case "CS":return a.ta;case "DS":return a.bb;case "SS":return a.ua;case "ES":return a.Ma;case "NULL":return a.To;default:return[0,b,0,0,""]}}function Mb(a){return a.ta.ia}function Le(a,b){var c=q(a);a.sa=a.ta.load(b)+c|0;a.ni=a.ta.ya+a.ta.gb|0;Be(a);a.S|=a.vi}function Me(a,b){a.bb.load(b);a.S|=a.vi}
        function wd(a,b,c){var d=r(a);a.Lc=a.ua.load(b)+d|0;a.ua.Bg?(a.tk=a.ua.ya+a.ua.V|0,a.Rm=a.ua.ya+a.ua.gb|0):(a.tk=a.ua.ya+a.ua.gb|0,a.Rm=a.ua.ya);c||(a.S|=4)}function Ne(a,b){a.Ma.load(b);a.S|=a.vi}function q(a){return a.sa-a.ta.ya|0}function C(a,b){a.sa=a.ta.ya+(b&a.C)|0}function Cd(a,b,c,d){a.ta.jl=d;a.Qm=b;b=a.ta.load(c);return b!==n?(a.sa=b+(a.Qm&a.C)|0,a.ni=b+a.ta.gb|0,Be(a),a.ta.fj):null}
        function Pe(a,b){a.sa=a.sa+b|0;var c=a.ni-a.sa|0;0>c&&0<=(a.ni^a.sa)&&(8088>=a.ka||a.ta.gb==a.ta.V?C(a,a.sa-a.ta.ya):-1>c&&ud.call(a,13,0))}function r(a){return a.je&~a.ua.V|a.Lc-a.ua.ya}function u(a,b){a.je=b;a.Lc=a.ua.ya+(b&a.ua.V)|0}function Qe(a,b,c,d,e,g){if(63!=(e&63)&&e!=a.resultType){var l=(e^a.resultType)&a.resultType;l&&(l&1&&Re(a),l&2&&Se(a),l&4&&Te(a),l&8&&Ue(a),l&16&&Ve(a),l&32&&We(a))}g?(a.hh=d,a.gh=b):(a.hh=b,a.gh=d);a.oi=c;a.ih=d;a.resultType=e}
        function Xe(a,b,c,d,e){a.resultType=c|26;a.ih=b;d?Ye(a):Ze(a);e?$e(a):af(a);return b}function bf(a,b,c,d){c&d?Ye(a):Ze(a);(b^c)&d?$e(a):af(a)}function cf(a){return Re(a)?1:0}function Re(a){a.resultType&1&&(a.aa&=~Wb,(a.hh^(a.hh^a.oi)&(a.oi^a.gh))&a.resultType&-2147450752&&(a.aa|=Wb),a.resultType&=-2);return a.aa&Wb}function Se(a){a.resultType&2&&(a.aa&=~Vb,38505>>((a.ih^a.ih>>4)&15)&1&&(a.aa|=Vb),a.resultType&=-3);return a.aa&Vb}
        function Te(a){a.resultType&4&&(a.aa&=~Ub,(a.gh^a.hh^a.oi)&16&&(a.aa|=Ub),a.resultType&=-5);return a.aa&Ub}function Ue(a){a.resultType&8&&(a.aa&=~Tb,a.ih&((a.resultType&-2147450752)-1|a.resultType&-2147450752)||(a.aa|=Tb),a.resultType&=-9);return a.aa&Tb}function Ve(a){a.resultType&16&&(a.aa&=~Sb,a.ih&a.resultType&-2147450752&&(a.aa|=Sb),a.resultType&=-17);return a.aa&Sb}
        function We(a){a.resultType&32&&(a.aa&=~Ob,(a.hh^a.gh)&(a.oi^a.gh)&a.resultType&-2147450752&&(a.aa|=Ob),a.resultType&=-33);return a.aa&Ob}function Ze(a){a.resultType&=-2;a.aa&=~Wb}function df(a){a.resultType&=-5;a.aa&=~Ub}function ef(a){a.resultType&=-9;a.aa&=~Tb}function af(a){a.resultType&=-33;a.aa&=~Ob}function Ye(a){a.resultType&=-2;a.aa|=Wb}function ff(a){a.resultType&=-5;a.aa|=Ub}function gf(a){a.resultType&=-9;a.aa|=Tb}function $e(a){a.resultType&=-33;a.aa|=Ob}
        function Nb(a){return a.aa&~od|Re(a)|Se(a)|Te(a)|Ue(a)|Ve(a)|We(a)}function hf(a,b){b=b|a.hb&1|65520;a.hb=a.hb&-65536|b&65535;a.hb&1&&pe(a,!0)}function Bd(a,b,c){a.hb&1||(b&=-61441);void 0===c&&(c=a.ta.Pa);c?b=b&-12289|a.aa&12288:a.uj=(b&12288)>>12;c>a.uj&&(b=b&~Qb|a.aa&Qb);a.resultType=128;a.aa=a.aa&~(a.wi|od)|b&(a.wi|od)|a.fn;a.aa&Rb&&(a.Bb|=2,a.S|=4)}
        f.Nb=function(a,b,c){var d=!1;switch(b){case "EAX":case "EBX":case "ECX":case "EDX":case "ESP":case "EBP":case "ESI":case "EDI":case "EIP":case "AX":case "BX":case "CX":case "DX":case "SP":case "BP":case "SI":case "DI":case "IP":case "PC":case "CS":case "DS":case "SS":case "ES":case "PS":case "C":case "P":case "A":case "Z":case "S":case "T":case "I":case "D":case "V":this.va[b]=c;this.yn++;d=!0;break;default:d=this.parent.Nb.call(this,a,b,c)}return d};
        function jf(a,b){var c=a.na[(b&a.Ee)>>>a.Ca];return 5!=c.type||(c=Rc(a,b,!1,!0),c)?c.Yg(b&a.Ga,b):null}f.Qa=function(a){return this.na[(a&this.Ee)>>>this.Ca].tc(a&this.Ga,a)};f.ra=function(a){var b=a&this.Ga,c=(a&this.Ee)>>>this.Ca;this.A-=this.B.gi;return b<this.Ga?this.na[c].ji(b,a):this.na[c].tc(b,a)|this.na[c+1&this.td].tc(0,a+1)<<8};
        f.fe=function(a){var b=a&this.Ga,c=(a&this.Ee)>>>this.Ca;if(b<this.Ga-2)return this.na[c].Ec(b,a);var d=(b&3)<<3;return this.na[c].Ec(b&-4,a)>>>d|this.na[c+1&this.td].Ec(0,a+3)<<32-d};f.dd=function(a,b){this.na[(a&this.Ee)>>>this.Ca].Fc(a&this.Ga,b&255,a)};f.Kb=function(a,b){var c=a&this.Ga,d=(a&this.Ee)>>>this.Ca;this.A-=this.B.gi;c<this.Ga?this.na[d].ui(c,b&65535,a):(this.na[d++].Fc(c,b&255,a),this.na[d&this.td].Fc(0,b>>8&255,a+1))};
        f.Ak=function(a,b){var c=a&this.Ga,d=(a&this.Ee)>>>this.Ca;this.A-=this.B.gi;if(c<this.Ga-2)this.na[d].Oe(c,b,a);else{var e,g=(c&3)<<3,c=c&-4;e=this.na[d].Ec(c,a);this.na[d].Oe(c,e&~(-1<<g)|b<<g,a);d=d+1&this.td;a+=3;e=this.na[d].Ec(0,a);this.na[d].Oe(0,e&-1<<g|b>>>32-g,a)}};function kf(a,b,c){a.si=b;a.X=b.Ac(a.ii=c,1);return a.S&1?0:a.Qa(a.X)}function D(a,b){return kf(a,a.ha,b&a.V)}function E(a,b){return kf(a,a.la,b&a.V)}function lf(a,b,c){a.si=b;a.X=b.Ac(a.ii=c,a.pa);return a.S&1?0:a.qc(a.X)}
        function G(a,b){return lf(a,a.ha,b&a.V)}function H(a,b){return lf(a,a.la,b&a.V)}function mf(a,b,c){a.si=b;a.La=a.X=b.Ac(a.ii=c,1);return a.S&1?0:a.Qa(a.X)}function L(a,b){return mf(a,a.ha,b&a.V)}function M(a,b){return mf(a,a.la,b&a.V)}function nf(a,b,c){a.si=b;a.La=a.X=b.Ac(a.ii=c,a.pa);return a.S&1?0:a.qc(a.X)}function N(a,b){return nf(a,a.ha,b&a.V)}function O(a,b){return nf(a,a.la,b&a.V)}function P(a,b){a.S&2||a.dd(a.si.oc(a.ii,1),b)}function Q(a,b){a.S&2||a.dg(a.si.oc(a.ii,a.pa),b)}
        function yd(a,b,c){return a.qc(b.Ac(c,a.pa))}f.U=function(){var a=this.Qa(this.sa);Pe(this,1);return a};function of(a){var b=a.ra(a.sa);Pe(a,2);return b}function R(a){var b=a.$b(a.sa);Pe(a,a.Hd);return b}f.oa=function(){var a=this.qc(this.sa);Pe(this,this.pa);return a};f.M=function(){var a=this.Qa(this.sa)<<24>>24;Pe(this,1);return a};function U(a,b){var c=a.Qa(a.sa);Pe(a,1);return pf[c].call(a,b)}
        f.Ka=function(){var a=this.qc(this.Lc);this.Lc=this.Lc+this.pa|0;var b=this.tk-this.Lc|0;0>b&&0<=(this.tk^this.Lc)&&(8088>=this.ka||!this.ua.Bg&&this.ua.gb==this.ua.V||this.ua.Bg&&!this.ua.gb?u(this,this.Lc-this.ua.ya&this.ua.V):-1>b&&ud.call(this,12,0));return a};function zd(a,b){a.Lc=a.Lc-a.pa|0;0>(a.Lc-a.Rm|0)&&0<=(a.Rm^a.Lc)&&(8088>=a.ka||!a.ua.Bg&&a.ua.gb==a.ua.V||a.ua.Bg&&!a.ua.gb?u(a,a.Lc-a.ua.ya&a.ua.V):ud.call(a,12,0));a.dg(a.Lc,b)}
        function qf(a,b,c){var d=4;1==b.length&&(d=1,c=c?1:0);if(80386>a.ka)2<b.length&&(b=b.substr(1,2));else if("PS"==b||2<b.length)d=8;a.va[b]&&(void 0===c&&(qb(a,"Value for "+b+" is invalid"),a.zb()),d=!a.fa.qb||a.fa.Pn?h(c,d):"--------".substr(0,d),a.va[b].textContent!=d&&(a.va[b].textContent=d))}
        f.zd=function(a){if(this.yn&&(a||!this.fa.qb||this.fa.Pn)){qf(this,"EAX",this.F);qf(this,"EBX",this.D);qf(this,"ECX",this.G);qf(this,"EDX",this.H);qf(this,"ESP",r(this));qf(this,"EBP",this.L);qf(this,"ESI",this.K);qf(this,"EDI",this.J);qf(this,"CS",Mb(this));qf(this,"DS",this.bb.ia);qf(this,"SS",this.ua.ia);qf(this,"ES",this.Ma.ia);qf(this,"EIP",q(this));var b=Nb(this);qf(this,"PS",b);qf(this,"V",b&Ob);qf(this,"D",b&Pb);qf(this,"I",b&Qb);qf(this,"T",b&Rb);qf(this,"S",b&Sb);qf(this,"Z",b&Tb);qf(this,
        "A",b&Ub);qf(this,"P",b&Vb);qf(this,"C",b&Wb)}if(b=this.va.speed)b.textContent=Kb(this);this.parent.zd.call(this,a)};
        f.kh=function(a){this.fa.we=!0;var b=this.fa.Nn=this.Y&&rf(this.Y),c=a?this.fa.ql?0:1:-1;this.fa.ql=!1;this.ud=this.A=a;this.ja&&!a&&ld(this.ja);a||this.qa(1024)||(this.S|=4);do{var d=this.S&12528;if(d)this.Aa|=d;else if(this.Sb=this.sa,this.ha=this.bb,this.la=this.ua,this.X=this.La=n,this.Aa&12288&&Be(this),this.Aa=this.S&256,this.Bb){a:{if(!(this.S&4))for(var d=80286>this.ka?0:1,e=0;2>e;e++){switch(d){case 0:if(this.Bb&1&&this.aa&Qb){var g=sf(this.ja);if(-1<=g&&(this.Bb&=-2,0<=g)){this.Bb&=-5;tf.call(this,
        g,null,11);d=!0;break a}}break;case 1:if(this.Bb&2){this.Bb&=-3;tf.call(this,1,null,11);d=!0;break a}}d=1-d}if(d=this.Bb&8){d=this.ja;e=!1;for(g=0;g<d.vb;g++)for(var l=d.vb[g],p=0;p<l.Ub.length;p++){var v=l.Ub[p];v.ze||(uf(d,v),v.ze||(e=!0))}d=!e}d&&(this.Bb&=-9);d=!1}if(d&&!a){this.R("interrupt dispatched");this.S=0;break}if(this.Bb&4){this.S=this.A=0;break}}if(b){if(vf(this.Y,this.sa,c)){this.zb();break}c=1}this.S=0;this.Oa[this.U()].call(this)}while(0<this.A);return this.fa.we?this.ud-this.A:void 0===
        this.fa.we?0:-1};Pa(function(){for(var a=kb(window.document,"pcjs","cpu"),b=0;b<a.length;b++){var c=a[b],d=ib(c),d=new Dd(d);jb(d,c)}});function wf(a,b){var c=a+b+cf(this)|0;Qe(this,a,b,c,191);this.A-=this.La===n?this.X===n?this.B.bc:this.B.Gb:this.B.rc;return c&255}function xf(a,b){var c=a+b+cf(this)|0;Qe(this,a,b,c,this.dataType|63);this.A-=this.La===n?this.X===n?this.B.bc:this.B.Gb:this.B.rc;return c&this.C}
        function yf(a,b){var c=a+b|0;Qe(this,a,b,c,191);this.A-=this.La===n?this.X===n?this.B.bc:this.B.Gb:this.B.rc;return c&255}function zf(a,b){var c=a+b|0;Qe(this,a,b,c,this.dataType|63);this.A-=this.La===n?this.X===n?this.B.bc:this.B.Gb:this.B.rc;return c&this.C}function Af(a,b){var c=a&b;Xe(this,c,128);this.A-=this.La===n?this.X===n?this.B.bc:this.B.Gb:this.B.rc;return c}function Bf(a,b){this.A-=this.La===n?this.X===n?this.B.bc:this.B.Gb:this.B.rc;return Xe(this,a&b,this.dataType)}
        function Cf(a,b){this.A-=10+(this.X===n?0:1);if((a&3)<(b&3))return a=a&-4|b&3,gf(this),a;ef(this);return a}function Df(a){if(this.X===n)return Md.call(this),a;var b=a,c=this.qc(this.X),d=this.qc(this.X+this.pa);2==this.pa&&(b=a<<16>>16,c=c<<16>>16,d=d<<16>>16);this.A-=this.B.Ll;if(b<c||b>d)C(this,this.Sb-this.ta.ya),tf.call(this,5,null,0);this.S|=2;return a}function Ef(a,b){var c=0;if(b){ef(this);for(var d=1;d&this.C;){if(b&d){a=c;break}d<<=1;c++}}else gf(this);this.A-=this.B.vo+3*c;return a}
        function Ff(a,b){var c=0;if(b){ef(this);for(var d=2==this.pa?15:31,e=1<<d;e;){if(b&e){a=d;break}e>>>=1;c++;d--}}else gf(this);this.A-=this.B.vo+3*c;return a}function Gf(a,b){a&1<<(b&31)?Ye(this):Ze(this);this.A-=this.X===n?this.B.dr:this.B.br;this.S|=2;return a}function Hf(a,b){var c=1<<(b&31);a&c?Ye(this):Ze(this);this.A-=this.X===n?this.B.Kl:this.B.Il;return a^c}function If(a,b){var c=1<<(b&31);a&c?Ye(this):Ze(this);this.A-=this.X===n?this.B.Kl:this.B.Il;return a&~c}
        function Jf(a,b){var c=1<<(b&31);a&c?Ye(this):Ze(this);this.A-=this.X===n?this.B.Kl:this.B.Il;return a|c}function Kf(a,b){var c=Mb(this),d=q(this);null!=Cd(this,a,b,!0)&&(zd(this,c),zd(this,d))}function Lf(a,b){Qe(this,a,b,a-b|0,191,!0);this.A-=this.La===n?this.X===n?this.B.bc:this.B.yj:this.B.Gb;this.S|=2;return a}function Mf(a,b){Qe(this,a,b,a-b|0,this.dataType|63,!0);this.A-=this.La===n?this.X===n?this.B.bc:this.B.yj:this.B.Gb;this.S|=2;return a}
        function Nf(a){var b=(a&this.C)-1|0;Qe(this,a,1,b,32830,!0);this.A-=2;return a&~this.C|b&this.C}function Of(a,b){var c=a[1]-b[1];c||(c=a[0]-b[0]);return c}
        function Pf(a,b,c){this.Zb=!1;if((c>>>=0)&&!(c<=b>>>0)){var d=0,e=1;c=[c>>>0,0];for(a=[a>>>0,b>>>0];0<Of(a,c);){var g=b=c;b[0]+=g[0];b[1]+=g[1];4294967295<b[0]&&(b[0]>>>=0,b[1]++);e+=e}do 0<=Of(a,c)&&(b=a,g=c,b[0]-=g[0],b[1]-=g[1],0>b[0]&&(b[0]>>>=0,b[1]--),d+=e),b=c,b[0]>>>=1,b[1]&1&&(b[0]=(b[0]|2147483648)>>>0),b[1]>>>=1,e>>>=1;while(e);this.ub=d;this.mc=a[0];this.Zb=!0}}function Qf(a){return a}
        function Rf(a,b){a=this.U();var c=(b<<16>>16)*(a<<24>>24)|0;32767<c||-32768>c?(Ye(this),$e(this)):(Ze(this),af(this));this.A-=this.X===n?21:24;return c&65535}function Sf(a,b){var c,d;a=this.oa();2==this.pa?(d=(b<<16>>16)*(a<<16>>16)|0,c=32767<d||-32768>d):(d=b*a,c=2147483647<d||-2147483648>d);c?(Ye(this),$e(this)):(Ze(this),af(this));d&=this.C;this.A-=this.X===n?21:24;return d}
        function Tf(a,b){var c=(a<<16>>16)*(b<<16>>16)|0;32767<c||-32768>c?(Ye(this),$e(this)):(Ze(this),af(this));this.A-=this.X===n?this.B.xo:this.B.wo;return c&65535}function Uf(a,b){var c=a*b;2147483647<c||-2147483648>c?(Ye(this),$e(this)):(Ze(this),af(this));this.A-=this.X===n?this.B.xo:this.B.wo;return c|0}function Vf(a){var b=(a&this.C)+1|0;Qe(this,a,1,b,32830);this.A-=2;return a&~this.C|b&this.C}
        function tf(a,b,c){this.A-=this.B.fm+c;this.ta.jl=!0;c=Nb(this);var d=Mb(this),e=q(this);a=this.ta.io(a);a!==n&&(zd(this,c),zd(this,d),zd(this,e),null!=b&&zd(this,b),this.rj=-1,this.sa=a,this.ni=this.ta.ya+this.ta.gb|0,Be(this))}function Wf(a,b){this.A-=14+(this.X===n?0:2);ef(this);this.Tb.load(b,!0)!==n&&this.Tb.Bc>=this.ta.Pa&&this.Tb.Bc>=(b&3)&&(gf(this),a=this.Tb.Rb&-256,2<this.pa&&(a|=(this.Tb.Lh&-65281)<<16));return a}
        function Xf(a,b){if(this.X===n)return fe.call(this),a;Me(this,this.ra(this.X+this.pa));this.A-=this.B.Vf;return b}function Yf(a){if(this.X===n)return fe.call(this),a;this.A-=this.B.nm;return this.X}function Zf(a,b){if(this.X===n)return fe.call(this),a;Ne(this,this.ra(this.X+this.pa));this.A-=this.B.Vf;return b}function $f(a,b){if(this.X===n)return fe.call(this),a;var c=this.ra(this.X+this.pa);this.xc.load(c);this.A-=this.B.Vf;return b}
        function ag(a,b){if(this.X===n)return fe.call(this),a;var c=this.ra(this.X+this.pa);this.yc.load(c);this.A-=this.B.Vf;return b}function bg(a,b){this.A-=14+(this.X===n?0:2);if(b&65528&&this.Tb.load(b,!0)!==n&&(7168==(this.Tb.Rb&7168)||this.Tb.Bc>=this.ta.Pa)&&this.Tb.Bc>=(b&3))return gf(this),this.Tb.gb;ef(this);return a}function cg(a,b){if(this.X===n)return fe.call(this),a;wd(this,this.ra(this.X+this.pa));this.A-=this.B.Vf;return b}
        function dg(a,b){this.A-=this.La===n?this.X===n?this.B.um:this.B.tm:this.B.rm;return b}function eg(a,b){return b}function fg(){this.La!==n&&ze(this,2);return dg.call(this,0,this.Rd)}function gg(a,b){var c=b&65535,d=b>>>16,e=a&65535,g=a>>>16,l=c*e,e=(l>>>16)+d*e,p=e>>>16,e=(e&65535)+c*g;this.Zb=!0;this.ub=e<<16|l&65535;this.mc=p+((e>>>16)+d*g)|0}function hg(a,b){this.A-=this.La===n?this.X===n?this.B.bc:this.B.Gb:this.B.rc;return Xe(this,a|b,128)}
        function ig(a,b){this.A-=this.La===n?this.X===n?this.B.bc:this.B.Gb:this.B.rc;return Xe(this,a|b,this.dataType)}function pg(a){var b=this.Ka(),c=this.Ka();(a<<=this.pa>>2)&&u(this,r(this)+a);Cd(this,b,c,!1)&&(a&&u(this,r(this)+a),this.bb.ia&65528&&this.bb.Bc<this.ta.Pa&&7168!=(this.bb.Rb&7168)&&this.bb.load(0),this.Ma.ia&65528&&this.Ma.Bc<this.ta.Pa&&7168!=(this.Ma.Rb&7168)&&this.Ma.load(0));2==a&&this.Bh&&He(this,this.sa)}
        function qg(a,b){var c=a-b-cf(this)|0;Qe(this,a,b,c,191,!0);this.A-=this.La===n?this.X===n?this.B.bc:this.B.Gb:this.B.rc;return c&255}function rg(a,b){var c=a-b-cf(this)|0;Qe(this,a,b,c,this.dataType|63,!0);this.A-=this.La===n?this.X===n?this.B.bc:this.B.Gb:this.B.rc;return c&this.C}function sg(a){this.S|=1;this.fd[this.U()].call(this,a);this.A-=this.X===n?this.B.fr:this.B.er}function tg(){return We(this)?1:0}function ug(){return Re(this)?1:0}function vg(){return Re(this)?0:1}
        function wg(){return Ue(this)?1:0}function xg(){return Ue(this)?0:1}function yg(){return Re(this)||Ue(this)?1:0}function zg(){return Re(this)||Ue(this)?0:1}function Ag(){return Ve(this)?1:0}function Bg(){return Ve(this)?0:1}function Cg(){return Se(this)?1:0}function Dg(){return Se(this)?0:1}function Eg(){return!Ve(this)!=!We(this)?1:0}function Fg(){return!Ve(this)!=!We(this)?0:1}function Gg(){return Ue(this)||!Ve(this)!=!We(this)?1:0}function Hg(){return Ue(this)||!Ve(this)!=!We(this)?0:1}
        function Ig(a,b,c){if(c){16<c&&(a=b,c-=16);var d=a<<c-1;a=(d<<1|b>>16-c)&65535;Xe(this,a,32768,d&32768)}return a}function Jg(a,b,c){if(c){var d=a<<c-1;a=d<<1|b>>32-c;Xe(this,a,-2147483648,d&-2147483648)}return a}function Kg(a,b){return Ig.call(this,a,b,this.U())}function Lg(a,b){return Jg.call(this,a,b,this.U())}function Mg(a,b){return Ig.call(this,a,b,this.G&31)}function Ng(a,b){return Jg.call(this,a,b,this.G&31)}
        function Og(a,b,c){if(c){16<c&&(a=b,c-=16);var d=a>>c-1;a=(d>>1|b<<16-c)&65535;Xe(this,a,32768,d&1)}return a}function Pg(a,b,c){if(c){var d=a>>c-1;a=d>>1|b<<32-c;Xe(this,a,-2147483648,d&1)}return a}function Qg(a,b){return Og.call(this,a,b,this.U())}function Rg(a,b){return Pg.call(this,a,b,this.U())}function Sg(a,b){return Og.call(this,a,b,this.G&31)}function Tg(a,b){return Pg.call(this,a,b,this.G&31)}
        function Ug(a,b){var c=a-b|0;Qe(this,a,b,c,191,!0);this.A-=this.La===n?this.X===n?this.B.bc:this.B.Gb:this.B.rc;return c&255}function Vg(a,b){var c=a-b|0;Qe(this,a,b,c,this.dataType|63,!0);this.A-=this.La===n?this.X===n?this.B.bc:this.B.Gb:this.B.rc;return c&this.C}function Wg(a,b){Xe(this,a&b,128);this.A-=this.La===n?this.X===n?this.B.dk:this.B.Wg:this.B.Wg;this.S|=2;return a}function Xg(a,b){Xe(this,a&b,32768);this.A-=this.La===n?this.X===n?this.B.dk:this.B.Wg:this.B.Wg;this.S|=2;return a}
        function Yg(a,b){if(this.X===n){switch(this.Li&7){case 0:this.F=this.F&-256|a;break;case 1:this.G=this.G&-256|a;break;case 2:this.H=this.H&-256|a;break;case 3:this.D=this.D&-256|a;break;case 4:this.F=this.F&255|a<<8;break;case 5:this.G=this.G&255|a<<8;break;case 6:this.H=this.H&255|a<<8;break;case 7:this.D=this.D&255|a<<8}this.A-=this.B.fk}else this.La=this.X,P(this,a),this.A-=this.B.ek;return b}
        function Zg(a,b){if(this.X===n){switch(this.Li&7){case 0:this.F=a;break;case 1:this.G=a;break;case 2:this.H=a;break;case 3:this.D=a;break;case 4:u(this,a);break;case 5:this.L=a;break;case 6:this.K=a;break;case 7:this.J=a}this.A-=this.B.fk}else this.La=this.X,Q(this,a),this.A-=this.B.ek;return b}function $g(a,b){var c=a^b;Xe(this,c,128);this.A-=this.La===n?this.X===n?this.B.bc:this.B.Gb:this.B.rc;return c}
        function ah(a,b){this.A-=this.La===n?this.X===n?this.B.bc:this.B.Gb:this.B.rc;return Xe(this,a^b,this.dataType)}function bh(a){ud.call(this,13,0);return a}function ce(a){Md.call(this);return a}function ch(a){fe.call(this);return a}function dh(){C(this,this.Sb-this.ta.ya);tf.call(this,0,null,2)}function eh(){this.A-=this.X===n?2:this.B.Hm;return 1}function fh(){var a=this.G&255;this.A-=(this.X===n?this.B.Vj:this.B.Uj)+(a<<this.B.Wj);return a}
        function gh(){var a=this.U();this.A-=(this.X===n?this.B.Vj:this.B.Uj)+(a<<this.B.Wj);return a}function hh(){return null}function ud(a,b,c,d){if(this.fa.we){var e=!1;if(80186<=this.ka)if(0>this.rj)C(this,this.Sb-this.ta.ya),e=!0;else if(8!=this.rj)b=0,a=8,e=!0;else{ih.call(this,-1,0,c);me(this);return}ih.call(this,a,b,c)&&(e=!1);e&&tf.call(this,this.rj=a,b,d||0);this.S|=3}else this.ab("Fault "+k(a)+" blocked by Debugger",1073741824),C(this,this.Sb-this.ta.ya)}
        function oe(a,b,c){this.Yf=a;a=0;b&&(a|=1);c&&(a|=2);3==this.ta.Pa&&(a|=4);ud.call(this,14,a)}function ih(a,b,c){var d=32,e=jf(this,this.sa);204!=e||this.Ye||(c=!1,d|=1);983040<=this.sa&&1048575>=this.sa&&(c=!1);this.qa(d|-2147483648)&&(c=!0);if(this.qa(d)||c)a=(c?"\n":"")+"Fault "+k(a)+(null!=b?" ("+ga(b)+")":"")+" on opcode "+k(e)+" at "+jh(q(this),Mb(this))+" (%"+h(this.sa,6)+")",b=this.fa.qb,this.ab(a,d)?c&&(c=b,this.Y.zb()):(this.Da(a),this.zb());return c}
        function de(){this.rh[this.U()].call(this)}function ge(){zd(this,r(this)&this.C);this.A-=this.B.Cc}function Nd(){var a=r(this)&this.C;zd(this,this.F&this.C);zd(this,this.G&this.C);zd(this,this.H&this.C);zd(this,this.D&this.C);zd(this,a);zd(this,this.L&this.C);zd(this,this.K&this.C);zd(this,this.J&this.C);this.A-=this.B.Bm}
        function Od(){this.J=this.J&~this.C|this.Ka();this.K=this.K&~this.C|this.Ka();this.L=this.L&~this.C|this.Ka();u(this,r(this)+this.pa);this.D=this.D&~this.C|this.Ka();this.H=this.H&~this.C|this.Ka();this.G=this.G&~this.C|this.Ka();this.F=this.F&~this.C|this.Ka();this.A-=this.B.zm}function Pd(){this.Na[this.U()].call(this,Df)}function he(){this.Lb[this.U()].call(this,Cf)}function ie(){this.S|=20;this.ha=this.la=this.xc;this.A-=this.B.bd;this.zb()}
        function je(){this.S|=20;this.ha=this.la=this.yc;this.A-=this.B.bd;this.zb()}function ke(){this.S|=4096;this.pa^=6;this.C^=-65536;Ae(this);this.A-=this.B.bd}function le(){this.S|=8192;this.Hd^=6;this.V^=-65536;qe(this);this.A-=this.B.bd}function Qd(){zd(this,this.oa());this.A-=this.B.Cc}function Rd(){this.Na[this.U()].call(this,Sf)}function Sd(){zd(this,this.U());this.A-=this.B.Cc}function Td(){this.Na[this.U()].call(this,Rf)}
        function Ud(){var a=1,b=0,c=5;this.Aa&192&&(a=this.G&this.V,b=1,this.Aa&256&&(c=4));if(a--){var d=pc(this.ma,this.H,this.sa-b-1);this.dd(this.Ma.oc(this.J&this.V,1),d);this.J=this.J&~this.V|this.J+(this.aa&Pb?-1:1)&this.V;this.A-=c;this.G=this.G&~this.V|this.G-b&this.V;a&&(this.sa=this.Sb,this.S|=256)}}
        function Vd(){var a=1,b=0,c=5;this.Aa&192&&(a=this.G&this.V,b=1,this.Aa&256&&(c=4));if(a--){for(var d=this.sa-b-1,e=0,g=0,l=0;l<this.pa;l++)e|=pc(this.ma,this.H,d)<<g,g+=8;d=e;this.dg(this.Ma.oc(this.J&this.V,this.pa),d);this.J=this.J&~this.V|this.J+(this.aa&Pb?-this.pa:this.pa)&this.V;this.A-=c;this.G=this.G&~this.V|this.G-b&this.V;a&&(this.sa=this.Sb,this.S|=256)}}
        function Wd(){var a=1,b=0,c=5;this.Aa&192&&(a=this.G&this.V,b=1,this.Aa&256&&(c=4));if(a--){var d=this.Qa(this.bb.Ac(this.K&this.V,1));this.K=this.K&~this.V|this.K+(this.aa&Pb?-1:1)&this.V;this.A-=c;tc(this.ma,this.H,d,this.sa-b-1);this.G=this.G&~this.V|this.G-b&this.V;a&&(this.sa=this.Sb,this.S|=256)}}
        function Xd(){var a=1,b=0,c=5;this.Aa&192&&(a=this.G&this.V,b=1,this.Aa&256&&(c=4));if(a--){var d=yd(this,this.bb,this.K&this.V);this.K=this.K&~this.V|this.K+(this.aa&Pb?-this.pa:this.pa)&this.V;this.A-=c;for(var c=this.sa-b-1,e=0,g=0;g<this.pa;g++)tc(this.ma,this.H,d>>e&255,c),e+=8;this.G=this.G&~this.V|this.G-b&this.V;a&&(this.sa=this.Sb,this.S|=256)}}function kh(){var a=this.M();We(this)?(C(this,q(this)+a),this.A-=this.B.Ha):this.A-=this.B.Ia}
        function lh(){var a=this.M();We(this)?this.A-=this.B.Ia:(C(this,q(this)+a),this.A-=this.B.Ha)}function mh(){var a=this.M();Re(this)?(C(this,q(this)+a),this.A-=this.B.Ha):this.A-=this.B.Ia}function nh(){var a=this.M();Re(this)?this.A-=this.B.Ia:(C(this,q(this)+a),this.A-=this.B.Ha)}function oh(){var a=this.M();Ue(this)?(C(this,q(this)+a),this.A-=this.B.Ha):this.A-=this.B.Ia}function ph(){var a=this.M();Ue(this)?this.A-=this.B.Ia:(C(this,q(this)+a),this.A-=this.B.Ha)}
        function qh(){var a=this.M();Re(this)||Ue(this)?(C(this,q(this)+a),this.A-=this.B.Ha):this.A-=this.B.Ia}function rh(){var a=this.M();Re(this)||Ue(this)?this.A-=this.B.Ia:(C(this,q(this)+a),this.A-=this.B.Ha)}function sh(){var a=this.M();Ve(this)?(C(this,q(this)+a),this.A-=this.B.Ha):this.A-=this.B.Ia}function th(){var a=this.M();Ve(this)?this.A-=this.B.Ia:(C(this,q(this)+a),this.A-=this.B.Ha)}function uh(){var a=this.M();Se(this)?(C(this,q(this)+a),this.A-=this.B.Ha):this.A-=this.B.Ia}
        function vh(){var a=this.M();Se(this)?this.A-=this.B.Ia:(C(this,q(this)+a),this.A-=this.B.Ha)}function wh(){var a=this.M();!Ve(this)!=!We(this)?(C(this,q(this)+a),this.A-=this.B.Ha):this.A-=this.B.Ia}function xh(){var a=this.M();!Ve(this)==!We(this)?(C(this,q(this)+a),this.A-=this.B.Ha):this.A-=this.B.Ia}function yh(){var a=this.M();Ue(this)||!Ve(this)!=!We(this)?(C(this,q(this)+a),this.A-=this.B.Ha):this.A-=this.B.Ia}
        function zh(){var a=this.M();Ue(this)||!Ve(this)!=!We(this)?this.A-=this.B.Ia:(C(this,q(this)+a),this.A-=this.B.Ha)}function Ah(){this.Ve[this.U()].call(this,Bh,this.U);this.A-=this.La===n?1:this.B.di}function Yd(){this.Ve[this.U()].call(this,Ch,gh)}function Zd(){this.Qc[this.U()].call(this,2==this.pa?Dh:Eh,gh)}function Fh(){var a=of(this)<<(this.pa>>2),b=this.Ka();C(this,b);a&&u(this,r(this)+a);this.A-=this.B.Gm}function Gh(){var a=this.Ka();C(this,a);this.A-=this.B.Dm}
        function $d(){var a=of(this),b=this.U()&31;this.A-=11;zd(this,this.L);var c=r(this)&this.C;if(0<b){for(this.A-=(b<<2)+(1<b?1:0);--b;)this.L=this.L&~this.C|this.L-this.pa&this.C,zd(this,yd(this,this.ua,this.L&this.C));zd(this,c)}this.L=this.L&~this.C|c;u(this,r(this)&~this.ua.V|r(this)-a&this.ua.V)}function ae(){u(this,r(this)&~this.ua.V|this.L&this.ua.V);this.L=this.L&~this.C|this.Ka()&this.C;this.A-=5}function Hh(){pg.call(this,of(this));this.A-=this.B.Fm}
        function Ih(){pg.call(this,0);this.A-=this.B.Em}function Jh(){this.Na[this.U()].call(this,Qf);this.A-=8}function Kh(){this.S|=36;this.A-=this.B.bd}function be(){fe.call(this)}function Md(){ud.call(this,6);this.zb()}function fe(){C(this,this.Sb-this.ta.ya);qb(this,"Undefined opcode "+k(Yb(this.ma,this.sa))+" at "+("0x"+h(this.sa)));this.zb()}
        var Id=[function(){var a=this.U();this.fd[a].call(this,yf)},function(){this.Lb[this.U()].call(this,zf)},function(){this.Rc[this.U()].call(this,yf)},function(){this.Na[this.U()].call(this,zf)},function(){this.F=this.F&-256|yf.call(this,this.F&255,this.U());this.A--},function(){this.F=this.F&~this.C|zf.call(this,this.F&this.C,this.oa());this.A--},function(){zd(this,this.Ma.ia);this.A-=this.B.qf},function(){Ne(this,this.Ka());this.A-=this.B.cc},function(){this.fd[this.U()].call(this,hg)},function(){this.Lb[this.U()].call(this,
        ig)},function(){this.Rc[this.U()].call(this,hg)},function(){this.Na[this.U()].call(this,ig)},function(){this.F=this.F&-256|hg.call(this,this.F&255,this.U());this.A--},function(){this.F=this.F&~this.C|ig.call(this,this.F&this.C,this.oa());this.A--},function(){zd(this,this.ta.ia);this.A-=this.B.qf},function(){Le(this,this.Ka());this.A-=this.B.cc},function(){this.fd[this.U()].call(this,wf)},function(){this.Lb[this.U()].call(this,xf)},function(){this.Rc[this.U()].call(this,wf)},function(){this.Na[this.U()].call(this,
        xf)},function(){this.F=this.F&-256|wf.call(this,this.F&255,this.U());this.A--},function(){this.F=this.F&~this.C|xf.call(this,this.F&this.C,this.oa());this.A--},function(){zd(this,this.ua.ia);this.A-=this.B.qf},function(){wd(this,this.Ka());this.A-=this.B.cc},function(){this.fd[this.U()].call(this,qg)},function(){this.Lb[this.U()].call(this,rg)},function(){this.Rc[this.U()].call(this,qg)},function(){this.Na[this.U()].call(this,rg)},function(){this.F=this.F&-256|qg.call(this,this.F&255,this.U());this.A--},
        function(){this.F=this.F&~this.C|rg.call(this,this.F&this.C,this.oa());this.A--},function(){zd(this,this.bb.ia);this.A-=this.B.qf},function(){Me(this,this.Ka());this.A-=this.B.cc},function(){this.fd[this.U()].call(this,Af)},function(){this.Lb[this.U()].call(this,Bf)},function(){this.Rc[this.U()].call(this,Af)},function(){this.Na[this.U()].call(this,Bf)},function(){this.F=this.F&-256|Af.call(this,this.F&255,this.U());this.A--},function(){this.F=this.F&~this.C|Bf.call(this,this.F&this.C,this.oa());
        this.A--},function(){this.S|=20;this.ha=this.la=this.Ma;this.A-=this.B.bd},function(){var a=this.F&255,b=Te(this),c=Re(this);if(9<(a&15)||b)a+=6,b=Ub;if(159<a||c)a+=96,c=Wb;a&=255;this.F=this.F&-256|a;Xe(this,a,128);c?Ye(this):Ze(this);b?ff(this):df(this);this.A-=this.B.pf},function(){this.fd[this.U()].call(this,Ug)},function(){this.Lb[this.U()].call(this,Vg)},function(){this.Rc[this.U()].call(this,Ug)},function(){this.Na[this.U()].call(this,Vg)},function(){this.F=this.F&-256|Ug.call(this,this.F&
        255,this.U());this.A--},function(){this.F=this.F&~this.C|Vg.call(this,this.F&this.C,this.oa());this.A--},function(){this.S|=20;this.ha=this.la=this.ta;this.A-=this.B.bd},function(){var a=this.F&255,b=Te(this),c=Re(this);if(9<(a&15)||b)a-=6,b=Ub;if(159<a||c)a-=96,c=Wb;a&=255;this.F=this.F&-256|a;Xe(this,a,128);c?Ye(this):Ze(this);b?ff(this):df(this);this.A-=this.B.pf},function(){this.fd[this.U()].call(this,$g)},function(){this.Lb[this.U()].call(this,ah)},function(){this.Rc[this.U()].call(this,$g)},
        function(){this.Na[this.U()].call(this,ah)},function(){this.F=this.F&-256|$g.call(this,this.F&255,this.U());this.A--},function(){this.F=this.F&~this.C|ah.call(this,this.F&this.C,this.oa());this.A--},function(){this.S|=20;this.ha=this.la=this.ua;this.A-=this.B.bd},function(){var a,b,c=this.F&255,d=this.F>>8&255;9<(c&15)||Te(this)?(c=c+6&15,d=d+1&255,a=b=1):a=b=0;this.F=this.F&-65536|d<<8|c;a?Ye(this):Ze(this);b?ff(this):df(this);this.A-=this.B.pf},function(){this.fd[this.U()].call(this,Lf)},function(){this.Lb[this.U()].call(this,
        Mf)},function(){this.Rc[this.U()].call(this,Lf)},function(){this.Na[this.U()].call(this,Mf)},function(){Lf.call(this,this.F&255,this.U());this.A--},function(){Mf.call(this,this.F&this.C,this.oa());this.A--},function(){this.S|=20;this.ha=this.la=this.bb;this.A-=this.B.bd},function(){var a,b,c=this.F&255,d=this.F>>8&255;9<(c&15)||Te(this)?(c=c-6&15,d=d-1&255,a=b=1):a=b=0;this.F=this.F&-65536|d<<8|c;a?Ye(this):Ze(this);b?ff(this):df(this);this.A-=this.B.pf},function(){this.F=Vf.call(this,this.F)},function(){this.G=
        Vf.call(this,this.G)},function(){this.H=Vf.call(this,this.H)},function(){this.D=Vf.call(this,this.D)},function(){u(this,Vf.call(this,r(this)))},function(){this.L=Vf.call(this,this.L)},function(){this.K=Vf.call(this,this.K)},function(){this.J=Vf.call(this,this.J)},function(){this.F=Nf.call(this,this.F)},function(){this.G=Nf.call(this,this.G)},function(){this.H=Nf.call(this,this.H)},function(){this.D=Nf.call(this,this.D)},function(){u(this,Nf.call(this,r(this)))},function(){this.L=Nf.call(this,this.L)},
        function(){this.K=Nf.call(this,this.K)},function(){this.J=Nf.call(this,this.J)},function(){zd(this,this.F&this.C);this.A-=this.B.Cc},function(){zd(this,this.G&this.C);this.A-=this.B.Cc},function(){zd(this,this.H&this.C);this.A-=this.B.Cc},function(){zd(this,this.D&this.C);this.A-=this.B.Cc},function(){zd(this,r(this)-2&65535);this.A-=this.B.Cc},function(){zd(this,this.L&this.C);this.A-=this.B.Cc},function(){zd(this,this.K&this.C);this.A-=this.B.Cc},function(){zd(this,this.J&this.C);this.A-=this.B.Cc},
        function(){this.F=this.F&~this.C|this.Ka();this.A-=this.B.cc},function(){this.G=this.G&~this.C|this.Ka();this.A-=this.B.cc},function(){this.H=this.H&~this.C|this.Ka();this.A-=this.B.cc},function(){this.D=this.D&~this.C|this.Ka();this.A-=this.B.cc},function(){u(this,r(this)&~this.C|this.Ka());this.A-=this.B.cc},function(){this.L=this.L&~this.C|this.Ka();this.A-=this.B.cc},function(){this.K=this.K&~this.C|this.Ka();this.A-=this.B.cc},function(){this.J=this.J&~this.C|this.Ka();this.A-=this.B.cc},kh,
        lh,mh,nh,oh,ph,qh,rh,sh,th,uh,vh,wh,xh,yh,zh,kh,lh,mh,nh,oh,ph,qh,rh,sh,th,uh,vh,wh,xh,yh,zh,Ah,function(){this.Qc[this.U()].call(this,Lh,this.oa);this.A-=this.La===n?1:this.B.di},Ah,function(){this.Qc[this.U()].call(this,Lh,this.M);this.A-=this.La===n?1:this.B.di},function(){this.fd[this.U()].call(this,Wg)},function(){this.Lb[this.U()].call(this,Xg)},function(){this.Rc[this.Li=this.U()].call(this,Yg)},function(){this.Na[this.Li=this.U()].call(this,Zg)},function(){this.S|=1;this.fd[this.U()].call(this,
        dg)},function(){this.S|=1;this.Lb[this.U()].call(this,dg)},function(){this.Rc[this.U()].call(this,dg)},function(){this.Na[this.U()].call(this,dg)},function(){var a=this.U();switch((a&56)>>3){case 0:this.Rd=this.Ma.ia;break;case 1:this.Rd=this.ta.ia;break;case 2:this.Rd=this.ua.ia;break;case 3:this.Rd=this.bb.ia;break;case 4:if(this.ka>=Lb){this.Rd=this.xc.ia;break}Md.call(this);break;case 5:if(this.ka>=Lb){this.Rd=this.yc.ia;break}default:Md.call(this)}this.S|=1;this.Lb[a].call(this,fg)},function(){this.S|=
        1;this.ha=this.la=this.To;this.Na[this.U()].call(this,Yf)},function(){var a,b=this.U(),c=(b&56)>>3;switch(c){case 0:a=this.F;break;case 2:a=this.H;break;case 3:a=this.D;break;default:if(80286==this.ka||this.ka==Lb&&4!=c&&5!=c){Md.call(this);return}switch(c){case 1:a=this.G;break;case 4:a=r(this);break;case 5:a=this.L;break;case 6:a=this.K;break;case 7:a=this.J}}this.Na[b].call(this,dg);switch(c){case 0:Ne(this,this.F);this.F=a;break;case 1:Le(this,this.G);this.G=a;break;case 2:wd(this,this.H);this.H=
        a;break;case 3:Me(this,this.D);this.D=a;break;case 4:this.ka>=Lb?this.xc.load(r(this)):Ne(this,r(this));u(this,a);break;case 5:this.ka>=Lb?this.yc.load(this.L):Le(this,this.L);this.L=a;break;case 6:wd(this,this.K);this.K=a;break;case 7:Me(this,this.J),this.J=a}},function(){this.S|=1;this.Qc[this.U()].call(this,Mh,this.Ka)},function(){this.A-=3},function(){var a=this.F;this.F=this.F&~this.C|this.G&this.C;this.G=this.G&~this.C|a&this.C;this.A-=3},function(){var a=this.F;this.F=this.F&~this.C|this.H&
        this.C;this.H=this.H&~this.C|a&this.C;this.A-=3},function(){var a=this.F;this.F=this.F&~this.C|this.D&this.C;this.D=this.D&~this.C|a&this.C;this.A-=3},function(){var a=this.F,b=r(this);this.F=this.F&~this.C|b&this.C;u(this,b&~this.C|a&this.C);this.A-=3},function(){var a=this.F;this.F=this.F&~this.C|this.L&this.C;this.L=this.L&~this.C|a&this.C;this.A-=3},function(){var a=this.F;this.F=this.F&~this.C|this.K&this.C;this.K=this.K&~this.C|a&this.C;this.A-=3},function(){var a=this.F;this.F=this.F&~this.C|
        this.J&this.C;this.J=this.J&~this.C|a&this.C;this.A-=3},function(){this.F=2==this.pa?this.F&-65536|this.F<<24>>24&65535:this.F<<16>>16;this.A-=2},function(){this.H=2==this.pa?this.H&-65536|(this.F&32768?65535:0):this.F&-2147483648?-1:0;this.A-=this.B.Nl},function(){Kf.call(this,this.oa(),of(this));this.A-=this.B.Ql},function(){this.ab("WAIT not implemented");this.A--},function(){zd(this,Nb(this));this.A-=this.B.Cc},function(){Bd(this,this.Ka());this.A-=this.B.cc},function(){var a=this.F>>8&255;a&
        Wb?Ye(this):Ze(this);a&Vb?(this.resultType&=-3,this.aa|=Vb):(this.resultType&=-3,this.aa&=~Vb);a&Ub?ff(this):df(this);a&Tb?gf(this):ef(this);a&Sb?(this.resultType&=-17,this.aa|=Sb):(this.resultType&=-17,this.aa&=~Sb);this.A-=this.B.Ob},function(){this.F=this.F&-65281|(Nb(this)&pd)<<8;this.A-=this.B.Ob},function(){var a=this.F&-256,b;b=R(this);b=this.Qa(this.ha.Ac(b,1));this.F=a|b;this.A-=this.B.Ij},function(){this.F=this.F&~this.C|yd(this,this.ha,R(this));this.A-=this.B.Ij},function(){var a=R(this),
        b=this.F;this.dd(this.ha.oc(a,1),b);this.A-=this.B.Jj},function(){var a=R(this),b=this.F;this.dg(this.ha.oc(a,this.pa),b);this.A-=this.B.Jj},function(){var a=1,b=0,c=this.B.Kj;this.Aa&192&&(a=this.G&this.V,b=1,c=this.B.Mj,this.Aa&256||(this.A-=this.B.Lj));if(a--){var d=this.aa&Pb?-1:1,e=this.Qa(this.ha.Ac(this.K,1));this.dd(this.Ma.oc(this.J&this.V,1),e);this.K=this.K&~this.V|this.K+d&this.V;this.J=this.J&~this.V|this.J+d&this.V;this.A-=c;this.G=this.G&~this.V|this.G-b&this.V;a&&(this.sa=this.Sb,
        this.S|=256)}},function(){var a=1,b=0,c=this.B.Kj;this.Aa&192&&(a=this.G&this.V,b=1,c=this.B.Mj,this.Aa&256||(this.A-=this.B.Lj));if(a--){var d=this.aa&Pb?-this.pa:this.pa,e=yd(this,this.ha,this.K);this.dg(this.Ma.oc(this.J&this.V,this.pa),e);this.K=this.K&~this.V|this.K+d&this.V;this.J=this.J&~this.V|this.J+d&this.V;this.A-=c;this.G=this.G&~this.V|this.G-b&this.V;a&&(this.sa=this.Sb,this.S|=256)}},function(){var a=1,b=0,c=this.B.vj;this.Aa&192&&(a=this.G&this.V,b=1,c=this.B.xj,this.Aa&256||(this.A-=
        this.B.wj));if(a--){var d=this.aa&Pb?-1:1,e=kf(this,this.ha,this.K&this.V),g=mf(this,this.Ma,this.J&this.V);Lf.call(this,e,g);this.K=this.K&~this.V|this.K+d&this.V;this.J=this.J&~this.V|this.J+d&this.V;this.A-=c-this.B.Gb;this.G=this.G&~this.V|this.G-b&this.V;a&&Ue(this)==(this.Aa&64)&&(this.sa=this.Sb,this.S|=256)}},function(){var a=1,b=0,c=this.B.vj;this.Aa&192&&(a=this.G&this.V,b=1,c=this.B.xj,this.Aa&256||(this.A-=this.B.wj));if(a--){var d=this.aa&Pb?-this.pa:this.pa,e=lf(this,this.ha,this.K&
        this.V),g=nf(this,this.Ma,this.J&this.V);Mf.call(this,e,g);this.K=this.K&~this.V|this.K+d&this.V;this.J=this.J&~this.V|this.J+d&this.V;this.A-=c-this.B.Gb;this.G=this.G&~this.V|this.G-b&this.V;a&&Ue(this)==(this.Aa&64)&&(this.sa=this.Sb,this.S|=256)}},function(){Xe(this,this.F&this.U(),128);this.A-=this.B.pf},function(){Xe(this,this.F&this.oa(),this.dataType);this.A-=this.B.pf},function(){var a=1,b=0,c=this.B.Zj;this.Aa&192&&(a=this.G&this.V,b=1,c=this.B.ak,this.Aa&256||(this.A-=this.B.$j));if(a--){var d=
        this.F;this.dd(this.Ma.oc(this.J&this.V,1),d);this.J=this.J&~this.V|this.J+(this.aa&Pb?-1:1)&this.V;this.A-=c;this.G=this.G&~this.V|this.G-b&this.V;a&&(this.sa=this.Sb,this.S|=256)}},function(){var a=1,b=0,c=this.B.Zj;this.Aa&192&&(a=this.G&this.V,b=1,c=this.B.ak,this.Aa&256||(this.A-=this.B.$j));if(a--){var d=this.F;this.dg(this.Ma.oc(this.J&this.V,this.pa),d);this.J=this.J&~this.V|this.J+(this.aa&Pb?-this.pa:this.pa)&this.V;this.A-=c;this.G=this.G&~this.V|this.G-b&this.V;a&&(this.sa=this.Sb,this.S|=
        256)}},function(){var a=1,b=0,c=this.B.Cj;this.Aa&192&&(a=this.G&this.V,b=1,c=this.B.Ej,this.Aa&256||(this.A-=this.B.Dj));a--&&(this.F=this.F&-256|this.Qa(this.ha.Ac(this.K&this.V,1)),this.K=this.K&~this.V|this.K+(this.aa&Pb?-1:1)&this.V,this.A-=c,this.G=this.G&~this.V|this.G-b&this.V,a&&(this.sa=this.Sb,this.S|=256))},function(){var a=1,b=0,c=this.B.Cj;this.Aa&192&&(a=this.G&this.V,b=1,c=this.B.Ej,this.Aa&256||(this.A-=this.B.Dj));a--&&(this.F=this.F&~this.C|yd(this,this.ha,this.K&this.V),this.K=
        this.K&~this.V|this.K+(this.aa&Pb?-this.pa:this.pa)&this.V,this.A-=c,this.G=this.G&~this.V|this.G-b&this.V,a&&(this.sa=this.Sb,this.S|=256))},function(){var a=1,b=0,c=this.B.Rj;this.Aa&192&&(a=this.G&this.V,b=1,c=this.B.Tj,this.Aa&256||(this.A-=this.B.Sj));a--&&(Lf.call(this,this.F&255,mf(this,this.Ma,this.J&this.V)),this.J=this.J&~this.V|this.J+(this.aa&Pb?-1:1)&this.V,this.A-=c-this.B.Gb,this.G=this.G&~this.V|this.G-b&this.V,a&&Ue(this)==(this.Aa&64)&&(this.sa=this.Sb,this.S|=256))},function(){var a=
        1,b=0,c=this.B.Rj;this.Aa&192&&(a=this.G&this.V,b=1,c=this.B.Tj,this.Aa&256||(this.A-=this.B.Sj));a--&&(Mf.call(this,this.F&this.C,nf(this,this.Ma,this.J&this.V)),this.J=this.J&~this.V|this.J+(this.aa&Pb?-this.pa:this.pa)&this.V,this.A-=c-this.B.Gb,this.G=this.G&~this.V|this.G-b&this.V,a&&Ue(this)==(this.Aa&64)&&(this.sa=this.Sb,this.S|=256))},function(){this.F=this.F&-256|this.U();this.A-=this.B.Ob},function(){this.G=this.G&-256|this.U();this.A-=this.B.Ob},function(){this.H=this.H&-256|this.U();
        this.A-=this.B.Ob},function(){this.D=this.D&-256|this.U();this.A-=this.B.Ob},function(){this.F=this.F&255|this.U()<<8;this.A-=this.B.Ob},function(){this.G=this.G&255|this.U()<<8;this.A-=this.B.Ob},function(){this.H=this.H&255|this.U()<<8;this.A-=this.B.Ob},function(){this.D=this.D&255|this.U()<<8;this.A-=this.B.Ob},function(){this.F=this.F&~this.C|this.oa();this.A-=this.B.Ob},function(){this.G=this.G&~this.C|this.oa();this.A-=this.B.Ob},function(){this.H=this.H&~this.C|this.oa();this.A-=this.B.Ob},
        function(){this.D=this.D&~this.C|this.oa();this.A-=this.B.Ob},function(){u(this,r(this)&~this.C|this.oa());this.A-=this.B.Ob},function(){this.L=this.L&~this.C|this.oa();this.A-=this.B.Ob},function(){this.K=this.K&~this.C|this.oa();this.A-=this.B.Ob},function(){this.J=this.J&~this.C|this.oa();this.A-=this.B.Ob},Fh,Gh,Fh,Gh,function(){this.Na[this.U()].call(this,Zf)},function(){this.Na[this.U()].call(this,Xf)},function(){this.S|=1;this.Ve[this.U()].call(this,Nh,this.U)},function(){this.S|=1;this.Qc[this.U()].call(this,
        Nh,this.oa)},Hh,Ih,Hh,Ih,function(){tf.call(this,3,null,this.B.gm)},function(){var a=this.U();De(this,a)?tf.call(this,a,null,0):this.A--},function(){We(this)?tf.call(this,4,null,this.B.hm):this.A-=this.B.im},function(){this.A-=this.B.em;if(this.hb&1&&this.aa&16384){var a=this.ra(this.cb.ya+0);xd(this.ta,a,!1)}else{var a=this.ta.Pa,b=this.Ka(),c=this.Ka(),d=this.Ka();null!=Cd(this,b,c,!1)&&(Bd(this,d,a),this.Bh&&He(this,this.sa))}},function(){this.Ve[this.U()].call(this,Ch,eh)},function(){this.Qc[this.U()].call(this,
        2==this.pa?Dh:Eh,eh)},function(){this.Ve[this.U()].call(this,Ch,fh)},function(){this.Qc[this.U()].call(this,2==this.pa?Dh:Eh,fh)},function(){var a=this.U();if(a){var b=this.F&255;this.F=this.F&-65536|b/a<<8|b%a;Xe(this,this.F,128);this.A-=this.B.Hl}},function(){var a=this.U();this.F=this.F&-65536|(this.F>>8&255)*a+this.F&255;Xe(this,this.F,128);this.A-=this.B.Gl},function(){this.F=this.F&-256|(Re(this)?255:0);this.A-=2},function(){this.F=this.F&-256|kf(this,this.ha,this.D+(this.F&255)&65535);this.A-=
        this.B.Im},Jh,Jh,Jh,Jh,Jh,Jh,Jh,Jh,function(){var a=this.M();(this.G=this.G-1&this.V)&&!Ue(this)?(C(this,q(this)+a),this.A-=this.B.pm):this.A-=this.B.Fj},function(){var a=this.M();(this.G=this.G-1&this.V)&&Ue(this)?(C(this,q(this)+a),this.A-=this.B.Gj):this.A-=this.B.Hj},function(){var a=this.M();(this.G=this.G-1&this.V)?(C(this,q(this)+a),this.A-=this.B.om):this.A-=this.B.Fj},function(){var a=this.M();this.G&this.V?this.A-=this.B.Hj:(C(this,q(this)+a),this.A-=this.B.Gj)},function(){var a=this.U();
        this.F=this.F&-256|pc(this.ma,a,this.sa-2);this.A-=this.B.Aj},function(){var a=this.U();this.F=pc(this.ma,a,this.sa-2);this.F|=pc(this.ma,a+1&65535,this.sa-2)<<8;this.A-=this.B.Aj},function(){var a=this.U();tc(this.ma,a,this.F&255,this.sa-2);this.A-=this.B.Qj},function(){var a=this.U();tc(this.ma,a,this.F&255,this.sa-2);tc(this.ma,a+1&65535,this.F>>8,this.sa-2);this.A-=this.B.Qj},function(){var a=this.oa(),b=q(this),a=b+a;zd(this,b);C(this,a);this.A-=this.B.Ol},function(){var a=this.oa();C(this,q(this)+
        a);this.A-=this.B.Bj},function(){Cd(this,this.oa(),of(this));this.A-=this.B.km},function(){var a=this.M();C(this,q(this)+a);this.A-=this.B.Bj},function(){this.F=this.F&-256|pc(this.ma,this.H,this.sa-1);this.A-=this.B.zj},function(){this.F=pc(this.ma,this.H,this.sa-1);this.F|=pc(this.ma,this.H+1&65535,this.sa-1)<<8;this.A-=this.B.zj},function(){tc(this.ma,this.H,this.F&255,this.sa-1);this.A-=this.B.Pj},function(){tc(this.ma,this.H,this.F&255,this.sa-1);tc(this.ma,this.H+1&65535,this.F>>8,this.sa-1);
        this.A-=this.B.Pj},Kh,Kh,function(){this.S|=132;this.A-=this.B.bd},function(){this.S|=68;this.A-=this.B.bd},function(){this.Bb|=4;this.A-=2;this.Y&&this.qa(-2147483648)?(this.sa=this.sa+-1|0,this.zb()):this.aa&Qb||(this.Y&&(this.sa=this.sa+-1|0),this.zb())},function(){Re(this)?Ze(this):Ye(this);this.A-=2},function(){this.Zb=!1;this.Ve[this.U()].call(this,Oh,hh);this.Zb&&(this.F=this.F&~this.C|this.ub&this.C)},function(){this.Zb=!1;this.Qc[this.U()].call(this,Ph,hh);this.Zb&&(this.F=this.F&~this.C|
        this.ub&this.C,this.H=this.H&~this.C|this.mc&this.C)},function(){Ze(this);this.A-=2},function(){Ye(this);this.A-=2},function(){this.aa&=~Qb;this.A-=this.B.Ml},function(){this.aa|=Qb;this.S|=4;this.A-=2},function(){this.aa&=~Pb;this.A-=2},function(){this.aa|=Pb;this.A-=2},function(){this.Ve[this.U()].call(this,Jd,hh)},function(){this.Qc[this.U()].call(this,Kd,hh)}],Bh=[yf,hg,wf,qg,Af,Ug,$g,Lf],Lh=[zf,ig,xf,rg,Bf,Vg,ah,Mf],Mh=[function(a,b){this.A-=this.La===n?this.B.cc:this.B.Am;return b},bh,bh,bh,
        bh,bh,bh,bh],Nh=[function(a,b){this.A-=this.La===n?this.B.sm:this.B.qm;return b},ch,ch,ch,ch,ch,ch,ch],Ch=[function(a,b){var c=a,d=b&this.Hb;if(d){var e;(d&=7)?(e=a<<d-1,c=(a<<d|a>>8-d)&255):e=a<<7;bf(this,c,e,128)}return c},function(a,b){var c=a,d=b&this.Hb;if(d){var e;(d&=7)?(e=a<<8-d,c=(a>>>d|e)&255):e=a;bf(this,c,e,128)}return c},function(a,b){var c=a,d=b&this.Hb;if(d){var e=cf(this);(d%=9)?(c=(a<<d|e<<d-1|a>>9-d)&255,e=a<<d-1):e<<=7;bf(this,c,e,128)}return c},function(a,b){var c=a,d=b&this.Hb;
        if(d){var e=cf(this);(d%=9)?(c=(a>>d|e<<8-d|a<<9-d)&255,e=a<<8-d):e<<=7;bf(this,c,e,128)}return c},function(a,b){var c=a,d=b&this.Hb;if(d){var e=0;8<d?c=0:(e=a<<d-1,c=e<<1&255);Xe(this,c,128,e&128,(c^e)&128)}return c},function(a,b){var c=b&this.Hb;c&&(c=8<c?0:a>>>c-1,a=c>>>1&255,Xe(this,a,128,c&1,a&128));return a},ch,function(a,b){var c=b&this.Hb;c&&(9<c&&(c=9),c=a<<24>>24>>c-1,a=c>>1&255,Xe(this,a,128,c&1));return a}],Dh=[function(a,b){var c=a,d=b&this.Hb;if(d){var e;(d&=15)?(e=a<<d-1,c=(a<<d|a>>
        16-d)&65535):e=a<<15;bf(this,c,e,32768)}return c},function(a,b){var c=a,d=b&this.Hb;if(d){var e;(d&=15)?(e=a<<16-d,c=(a>>>d|e)&65535):e=a;bf(this,c,e,32768)}return c},function(a,b){var c=a,d=b&this.Hb;if(d){var e=cf(this);(d%=17)?(c=(a<<d|e<<d-1|a>>17-d)&65535,e=a<<d-1):e<<=15;bf(this,c,e,32768)}return c},function(a,b){var c=a,d=b&this.Hb;if(d){var e=cf(this);(d%=17)?(c=(a>>d|e<<16-d|a<<17-d)&65535,e=a<<16-d):e<<=15;bf(this,c,e,32768)}return c},function(a,b){var c=a,d=b&this.Hb;if(d){var e=0;16<d?
        c=0:(e=a<<d-1,c=e<<1&65535);Xe(this,c,32768,e&32768,(c^e)&32768)}return c},function(a,b){var c=b&this.Hb;c&&(c=16<c?0:a>>>c-1,a=c>>>1&65535,Xe(this,a,32768,c&1,a&32768));return a},ch,function(a,b){var c=b&this.Hb;c&&(17<c&&(c=17),c=a<<16>>16>>c-1,a=c>>1&65535,Xe(this,a,32768,c&1));return a}],Eh=[function(a,b){var c=a,d=b&this.Hb;d&&(c=a<<d|a>>>32-d,bf(this,c,a<<d-1,-2147483648));return c},function(a,b){var c=a,d=b&this.Hb;if(d){var e=a<<32-d,c=a>>>d|e;bf(this,c,e,-2147483648)}return c},function(a,
        b){var c=a,d=b&this.Hb;d&&(c=cf(this),c=a<<d|c<<d-1|a>>>32-d>>>1,bf(this,c,a<<d-1,-2147483648));return c},function(a,b){var c=a,d=b&this.Hb;d&&(c=cf(this),c=a>>>d|c<<32-d|a<<32-d<<1,bf(this,c,a<<32-d,-2147483648));return c},function(a,b){var c=a,d=b&this.Hb;d&&(d=a<<d-1,c=d<<1,Xe(this,c,-2147483648,d&-2147483648,(c^d)&-2147483648));return c},function(a,b){var c=b&this.Hb;c&&(c=a>>>c-1,a=c>>>1,Xe(this,a,-2147483648,c&1,a&-2147483648));return a},ch,function(a,b){var c=b&this.Hb;c&&(c=a>>c-1,a=c>>1,
        Xe(this,a,-2147483648,c&1));return a}],Oh=[function(a,b){b=this.U();Xe(this,a&b,128);this.A-=this.X===n?this.B.ck:this.B.bk;this.S|=2;return a},ch,function(a){this.A-=this.X===n?this.B.Vg:this.B.Ug;return a^255},function(a){var b=-a|0;Qe(this,0,a,b,191,!0);this.A-=this.X===n?this.B.Vg:this.B.Ug;return b&255},function(a){this.Zb=!0;this.ub=(this.F&255)*a&65535;this.ub&65280?(Ye(this),$e(this)):(Ze(this),af(this));this.A-=this.X===n?this.B.wm:this.B.vm;this.S|=2;return a},function(a){var b=(this.F<<
        24>>24)*(a<<24>>24)|0;this.Zb=!0;this.ub=b&65535;127<b||-128>b?(Ye(this),$e(this)):(Ze(this),af(this));this.A-=this.X===n?this.B.bm:this.B.am;this.S|=2;return a},function(a,b){if(!a)return dh.call(this),a;var c=(b=this.F&65535)/a;if(255<c)return dh.call(this),a;this.Zb=!0;this.ub=c&255|(b%a&255)<<8;this.A-=this.X===n?this.B.Ul:this.B.Tl;this.S|=2;return a},function(a,b){if(!a)return dh.call(this),a;var c=a<<24>>24,d=(b=this.F<<16>>16)/c|0;if(d!=d<<24>>24||8086==this.ka&&-128==d)return dh.call(this),
        a;this.Zb=!0;this.ub=d&255|(b%c&255)<<8;this.A-=this.X===n?this.B.Yl:this.B.Xl;this.S|=2;return a}],Ph=[function(a,b){b=this.oa();Xe(this,a&b,32768);this.A-=this.X===n?this.B.ck:this.B.bk;this.S|=2;return a},ch,function(a){this.A-=this.X===n?this.B.Vg:this.B.Ug;return a^65535},function(a){var b=-a|0;Qe(this,0,a,b,32831,!0);this.A-=this.X===n?this.B.Vg:this.B.Ug;return b&65535},function(a,b){if(2==this.pa){b=this.F&65535;var c=b*a|0;this.Zb=!0;this.ub=c&65535;this.mc=c>>16&65535}else gg.call(this,
        a,this.F);this.mc?(Ye(this),$e(this)):(Ze(this),af(this));this.A-=this.X===n?this.B.ym:this.B.xm;this.S|=2;return a},function(a,b){var c;if(2==this.pa)b=this.F&65535,c=(b<<16>>16)*(a<<16>>16)|0,this.Zb=!0,this.ub=c&65535,this.mc=c>>16&65535,c=32767<c||-32768>c;else{c=a;var d=this.F,e=!1;0>d&&(d=-d|0,e=!e);0>c&&(c=-c|0,e=!e);gg.call(this,c,d);e&&(this.ub=~this.ub+1|0,this.mc=~this.mc+(this.ub?0:1)|0);c=this.mc!=this.ub>>31}c?(Ye(this),$e(this)):(Ze(this),af(this));this.A-=this.X===n?this.B.dm:this.B.cm;
        this.S|=2;return a},function(a,b){if(2==this.pa){if(!a)return dh.call(this),a;b=65536*(this.H&65535)+(this.F&65535);var c=b/a|0;if(65536<=c)return dh.call(this),a;this.Zb=!0;this.ub=c&65535;this.mc=b%a&65535}else{Pf.call(this,this.F,this.H,a);if(!this.Zb)return dh.call(this),a;this.ub|=0;this.mc|=0}this.A-=this.X===n?this.B.Wl:this.B.Vl;this.S|=2;return a},function(a,b){if(2==this.pa){if(!a)return dh.call(this),a;var c=a<<16>>16,d=(b=this.H<<16|this.F&65535)/c|0;if(d!=d<<16>>16||8086==this.ka&&-32768==
        d)return dh.call(this),a;this.Zb=!0;this.ub=d&65535;this.mc=b%c&65535}else{var c=this.F,d=this.H,e=a,g=!1,l=!1;0>e&&(e=-e|0,g=!g);0>d&&(c=-c|0,d=~d+(c?0:1)|0,l=!0,g=!g);Pf.call(this,c,d,e);2147483647<this.ub&&(this.Zb=!1);g&&(this.ub=-this.ub);l&&(this.mc=-this.mc);if(!this.Zb)return dh.call(this),a;this.ub|=0;this.mc|=0}this.A-=this.X===n?this.B.$l:this.B.Zl;this.S|=2;return a}],Jd=[function(a){var b=a+1|0;Qe(this,a,1,b,190);this.A-=this.X===n?this.B.Tg:this.B.Sg;return b&255},function(a){var b=
        a-1|0;Qe(this,a,1,b,190,!0);this.A-=this.X===n?this.B.Tg:this.B.Sg;return b&255},ch,ch,ch,ch,ch,ch],Kd=[function(a){var b=a+1|0;Qe(this,a,1,b,32830);this.A-=this.X===n?this.B.Tg:this.B.Sg;return b&65535},function(a){var b=a-1|0;Qe(this,a,1,b,32830,!0);this.A-=this.X===n?this.B.Tg:this.B.Sg;return b&65535},function(a){zd(this,q(this));C(this,a);this.A-=this.X===n?this.B.Sl:this.B.Rl;this.S|=2;return a},function(a){if(this.X===n)return ch.call(this,a);Kf.call(this,a,this.ra(this.X+this.pa));this.A-=
        this.B.Pl;this.S|=2;return a},function(a){C(this,a);this.A-=this.X===n?this.B.mm:this.B.lm;this.S|=2;return a},function(a){if(this.X===n)return ch.call(this,a);Cd(this,a,this.ra(this.X+this.pa));this.Bh&&He(this,this.sa);this.A-=this.B.jm;this.S|=2;return a},function(a){var b=a;this.S&512&&(a=a-2&65535,80286>this.ka&&(b=a));zd(this,b);this.A-=this.X===n?this.B.Cc:this.B.Cm;this.S|=2;return a},bh],ee=Array(256);ee[0]=function(){var a=this.U();16>(a&56)&&(this.S|=1);this.Qc[a].call(this,this.ln,hh)};
        ee[1]=function(){var a=this.U();a&16||(this.S|=1);this.Qc[a].call(this,Qh,hh)};ee[2]=function(){this.Na[this.U()].call(this,Wf)};ee[3]=function(){this.Na[this.U()].call(this,bg)};
        ee[5]=function(){this.ta.Pa?ud.call(this,13,0,!0):(hf(this,this.ra(2054)),this.J=this.ra(2086),this.K=this.ra(2088),this.L=this.ra(2090),this.D=this.ra(2094),this.H=this.ra(2096),this.G=this.ra(2098),this.F=this.ra(2100),vd(this.Ma,2102,this.ra(2084)),vd(this.ta,2108,this.ra(2082)),vd(this.ua,2114,this.ra(2080)),vd(this.bb,2120,this.ra(2078)),Bd(this,this.ra(2072)),C(this,this.ra(2074)),u(this,this.ra(2092)),this.Fd=this.ra(2126)|this.Qa(2128)<<16,this.Cf=this.Fd+this.ra(2130),vd(this.yd,2132,this.ra(2076)),
        this.Gd=this.ra(2138)|this.Qa(2140)<<16,this.Ye=this.Gd+this.ra(2142),vd(this.cb,2144,this.ra(2070)),this.A-=195)};ee[6]=function(){this.ta.Pa?ud.call(this,13,0):(this.hb&=-9,this.A-=2)};ee[11]=Md;var x=[];x[32]=function(){var a=this.U()|192;if(this.ta.Pa)ud.call(this,13,0);else{switch((a&56)>>3){case 0:this.Rd=this.hb;break;case 1:this.Rd=this.ki;break;case 2:this.Rd=this.Yf;break;case 3:this.Rd=this.uf;break;default:fe.call(this);return}ze(this,4);this.Na[a].call(this,fg)}};
        x[34]=function(){var a,b=this.U()|192;if(this.ta.Pa)ud.call(this,13,0);else{var c=(b&56)>>3;switch(c){case 0:a=this.F;break;case 1:a=this.G;break;case 2:a=this.H;break;case 3:a=this.D;break;default:Md.call(this);return}ze(this,4);this.Na[b].call(this,dg);switch(c){case 0:c=this.F;this.F=a;this.hb=c;pe(this);this.hb&-2147483648?ne(this):this.na!=this.Se&&(this.na=this.Se,this.xi=this.Xk=null);break;case 1:this.ki=this.G;this.G=a;break;case 2:this.Yf=this.H;this.H=a;break;case 3:c=this.D,this.D=a,this.uf=
        c,this.hb&-2147483648&&ne(this)}}};x[128]=function(){var a=this.oa();We(this)?(C(this,q(this)+a),this.A-=this.B.Ha):this.A-=this.B.Ia};x[129]=function(){var a=this.oa();We(this)?this.A-=this.B.Ia:(C(this,q(this)+a),this.A-=this.B.Ha)};x[130]=function(){var a=this.oa();Re(this)?(C(this,q(this)+a),this.A-=this.B.Ha):this.A-=this.B.Ia};x[131]=function(){var a=this.oa();Re(this)?this.A-=this.B.Ia:(C(this,q(this)+a),this.A-=this.B.Ha)};
        x[132]=function(){var a=this.oa();Ue(this)?(C(this,q(this)+a),this.A-=this.B.Ha):this.A-=this.B.Ia};x[133]=function(){var a=this.oa();Ue(this)?this.A-=this.B.Ia:(C(this,q(this)+a),this.A-=this.B.Ha)};x[134]=function(){var a=this.oa();Re(this)||Ue(this)?(C(this,q(this)+a),this.A-=this.B.Ha):this.A-=this.B.Ia};x[135]=function(){var a=this.oa();Re(this)||Ue(this)?this.A-=this.B.Ia:(C(this,q(this)+a),this.A-=this.B.Ha)};
        x[136]=function(){var a=this.oa();Ve(this)?(C(this,q(this)+a),this.A-=this.B.Ha):this.A-=this.B.Ia};x[137]=function(){var a=this.oa();Ve(this)?this.A-=this.B.Ia:(C(this,q(this)+a),this.A-=this.B.Ha)};x[138]=function(){var a=this.oa();Se(this)?(C(this,q(this)+a),this.A-=this.B.Ha):this.A-=this.B.Ia};x[139]=function(){var a=this.oa();Se(this)?this.A-=this.B.Ia:(C(this,q(this)+a),this.A-=this.B.Ha)};
        x[140]=function(){var a=this.oa();!Ve(this)!=!We(this)?(C(this,q(this)+a),this.A-=this.B.Ha):this.A-=this.B.Ia};x[141]=function(){var a=this.oa();!Ve(this)==!We(this)?(C(this,q(this)+a),this.A-=this.B.Ha):this.A-=this.B.Ia};x[142]=function(){var a=this.oa();Ue(this)||!Ve(this)!=!We(this)?(C(this,q(this)+a),this.A-=this.B.Ha):this.A-=this.B.Ia};x[143]=function(){var a=this.oa();Ue(this)||!Ve(this)!=!We(this)?this.A-=this.B.Ia:(C(this,q(this)+a),this.A-=this.B.Ha)};x[144]=function(){sg.call(this,tg)};
        x[145]=function(){sg.call(this,tg)};x[146]=function(){sg.call(this,ug)};x[147]=function(){sg.call(this,vg)};x[148]=function(){sg.call(this,wg)};x[149]=function(){sg.call(this,xg)};x[150]=function(){sg.call(this,yg)};x[151]=function(){sg.call(this,zg)};x[152]=function(){sg.call(this,Ag)};x[153]=function(){sg.call(this,Bg)};x[154]=function(){sg.call(this,Cg)};x[155]=function(){sg.call(this,Dg)};x[156]=function(){sg.call(this,Eg)};x[157]=function(){sg.call(this,Fg)};x[158]=function(){sg.call(this,Gg)};
        x[159]=function(){sg.call(this,Hg)};x[160]=function(){zd(this,this.xc.ia);this.A-=this.B.qf};x[161]=function(){var a=this.Ka();this.xc.load(a);this.A-=this.B.cc};x[163]=function(){this.Lb[this.U()].call(this,Gf);this.X!==n&&(this.A-=this.B.cr)};x[164]=function(){this.Lb[this.U()].call(this,2==this.pa?Kg:Lg);this.A-=this.X===n?this.B.Yj:this.B.Xj};x[165]=function(){this.Lb[this.U()].call(this,2==this.pa?Mg:Ng);this.A-=this.X===n?this.B.Yj:this.B.Xj};x[168]=function(){zd(this,this.yc.ia);this.A-=this.B.qf};
        x[169]=function(){var a=this.Ka();this.yc.load(a);this.A-=this.B.cc};x[171]=function(){this.Lb[this.U()].call(this,Jf);this.X!==n&&(this.A-=this.B.Jl)};x[172]=function(){this.Lb[this.U()].call(this,2==this.pa?Qg:Rg);this.A-=this.X===n?this.B.Yj:this.B.Xj};x[173]=function(){this.Lb[this.U()].call(this,2==this.pa?Sg:Tg);this.A-=this.X===n?this.B.Yj:this.B.Xj};x[175]=function(){this.Na[this.U()].call(this,2==this.pa?Tf:Uf)};x[178]=function(){this.Na[this.U()].call(this,cg)};
        x[179]=function(){this.Lb[this.U()].call(this,If);this.X!==n&&(this.A-=this.B.Jl)};x[180]=function(){this.Na[this.U()].call(this,$f)};x[181]=function(){this.Na[this.U()].call(this,ag)};
        x[182]=function(){var a,b=this.U(),c=(b&56)>>3;switch(c){case 4:a=this.F;break;case 5:a=this.G;break;case 6:a=this.H;break;case 7:a=this.D}this.Rc[b].call(this,eg);switch(c){case 0:this.F=this.F&~this.C|this.F&255;break;case 1:this.G=this.G&~this.C|this.G&255;break;case 2:this.H=this.H&~this.C|this.H&255;break;case 3:this.D=this.D&~this.C|this.D&255;break;case 4:this.je=this.je&~this.C|this.F>>8&255;this.F=a;break;case 5:this.L=this.L&~this.C|this.G>>8&255;this.G=a;break;case 6:this.K=this.K&~this.C|
        this.H>>8&255;this.H=a;break;case 7:this.J=this.J&~this.C|this.D>>8&255,this.D=a}this.A-=this.X===n?this.B.Oj:this.B.Nj};x[183]=function(){var a=this.U();ze(this,2);this.Na[a].call(this,eg);switch((a&56)>>3){case 0:this.F&=65535;break;case 1:this.G&=65535;break;case 2:this.H&=65535;break;case 3:this.D&=65535;break;case 4:this.je&=65535;break;case 5:this.L&=65535;break;case 6:this.K&=65535;break;case 7:this.J&=65535}this.A-=this.X===n?this.B.Oj:this.B.Nj};
        x[186]=function(){this.Qc[this.U()].call(this,Rh,this.U)};x[187]=function(){this.Lb[this.U()].call(this,Hf);this.X!==n&&(this.A-=this.B.Jl)};x[188]=function(){this.Na[this.U()].call(this,Ef)};x[189]=function(){this.Na[this.U()].call(this,Ff)};
        x[190]=function(){var a,b=this.U(),c=(b&56)>>3;switch(c){case 4:a=this.F;break;case 5:a=this.G;break;case 6:a=this.H;break;case 7:a=this.D}this.Rc[b].call(this,eg);switch(c){case 0:this.F=this.F&~this.C|(this.F&255)<<24>>24&this.C;break;case 1:this.G=this.G&~this.C|(this.G&255)<<24>>24&this.C;break;case 2:this.H=this.H&~this.C|(this.H&255)<<24>>24&this.C;break;case 3:this.D=this.D&~this.C|(this.D&255)<<24>>24&this.C;break;case 4:this.je=this.je&~this.C|this.F<<16>>24&this.C;this.F=a;break;case 5:this.L=
        this.L&~this.C|this.G<<16>>24&this.C;this.G=a;break;case 6:this.K=this.K&~this.C|this.H<<16>>24&this.C;this.H=a;break;case 7:this.J=this.J&~this.C|this.D<<16>>24&this.C,this.D=a}this.A-=this.X===n?this.B.Oj:this.B.Nj};
        x[191]=function(){var a=this.U();ze(this,2);this.Na[a].call(this,eg);switch((a&56)>>3){case 0:this.F=this.F<<16>>16;break;case 1:this.G=this.G<<16>>16;break;case 2:this.H=this.H<<16>>16;break;case 3:this.D=this.D<<16>>16;break;case 4:this.je=this.je<<16>>16;break;case 5:this.L=this.L<<16>>16;break;case 6:this.K=this.K<<16>>16;break;case 7:this.J=this.J<<16>>16}this.A-=this.X===n?this.B.Oj:this.B.Nj};
        var Ie=[function(){this.A-=2+(this.X===n?0:1);return this.yd.ia},function(){this.A-=2+(this.X===n?0:1);return this.cb.ia},function(a){this.S|=2;this.yd.load(a);this.A-=17+(this.X===n?0:2);return a},function(a){this.S|=2;this.cb.load(a)!==n&&(this.Kb(this.cb.Ed+4,this.cb.Rb|=512),this.cb.type=768);this.A-=17+(this.X===n?0:2);return a},function(a){this.S|=2;this.A-=14+(this.X===n?0:2);if(this.Tb.load(a,!0)!==n&&2048!=(this.Tb.Rb&2560)&&(this.Tb.Bc>=this.ta.Pa&&this.Tb.Bc>=(a&3)||7168==(this.Tb.Rb&7168)))return gf(this),
        a;ef(this);return a},function(a){this.S|=2;this.A-=14+(this.X===n?0:2);if(this.Tb.load(a,!0)!==n&&512==(this.Tb.Rb&2560)&&this.Tb.Bc>=this.ta.Pa&&this.Tb.Bc>=(a&3))return gf(this),a;ef(this);return a},ch,ch],Ld=[ce,ce,ce,ce,ce,ce,ch,ch],Qh=[function(a){if(this.X===n)Md.call(this);else{a=this.Cf-this.Fd;var b=this.Fd;80286==this.ka?b|=-16777216:this.ka>=Lb&&(2==this.pa?b&=16777215:a|=b<<16);this.Ak(this.X+2,b);this.A-=11}return a},function(a){if(this.X===n)Md.call(this);else{a=this.Ye-this.Gd;var b=
        this.Gd;80286==this.ka?b|=-16777216:this.ka>=Lb&&(2==this.pa?b&=16777215:a|=b<<16);this.Ak(this.X+2,b);this.A-=12}return a},function(a){this.X===n?Md.call(this):(this.Fd=this.fe(this.X+2)&(this.C|this.C<<8),a&=65535,this.Cf=this.Fd+a,this.S|=2,this.A-=11);return a},function(a){this.X===n?Md.call(this):(this.Gd=this.fe(this.X+2)&(this.C|this.C<<8),a&=65535,this.Ye=this.Gd+a,this.S|=2,this.A-=12);return a},function(){this.A-=2+(this.X===n?0:1);return this.hb},ch,function(a){hf(this,a);this.A-=this.X===
        n?3:6;this.S|=2;return a},ch],Rh=[ch,ch,ch,ch,Gf,Jf,If,Hf],y=[function(a){a=a.call(this,this.F&255,D(this,this.D+this.K));this.F=this.F&-256|a;this.A-=this.B.ba},function(a){a=a.call(this,this.F&255,D(this,this.D+this.J));this.F=this.F&-256|a;this.A-=this.B.ca},function(a){a=a.call(this,this.F&255,E(this,this.L+this.K));this.F=this.F&-256|a;this.A-=this.B.ca},function(a){a=a.call(this,this.F&255,E(this,this.L+this.J));this.F=this.F&-256|a;this.A-=this.B.ba},function(a){a=a.call(this,this.F&255,D(this,
        this.K));this.F=this.F&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.F&255,D(this,this.J));this.F=this.F&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.F&255,D(this,R(this)));this.F=this.F&-256|a;this.A-=this.B.da},function(a){a=a.call(this,this.F&255,D(this,this.D));this.F=this.F&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.G&255,D(this,this.D+this.K));this.G=this.G&-256|a;this.A-=this.B.ba},function(a){a=a.call(this,this.G&255,D(this,this.D+this.J));this.G=this.G&-256|
        a;this.A-=this.B.ca},function(a){a=a.call(this,this.G&255,E(this,this.L+this.K));this.G=this.G&-256|a;this.A-=this.B.ca},function(a){a=a.call(this,this.G&255,E(this,this.L+this.J));this.G=this.G&-256|a;this.A-=this.B.ba},function(a){a=a.call(this,this.G&255,D(this,this.K));this.G=this.G&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.G&255,D(this,this.J));this.G=this.G&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.G&255,D(this,R(this)));this.G=this.G&-256|a;this.A-=this.B.da},function(a){a=
        a.call(this,this.G&255,D(this,this.D));this.G=this.G&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.H&255,D(this,this.D+this.K));this.H=this.H&-256|a;this.A-=this.B.ba},function(a){a=a.call(this,this.H&255,D(this,this.D+this.J));this.H=this.H&-256|a;this.A-=this.B.ca},function(a){a=a.call(this,this.H&255,E(this,this.L+this.K));this.H=this.H&-256|a;this.A-=this.B.ca},function(a){a=a.call(this,this.H&255,E(this,this.L+this.J));this.H=this.H&-256|a;this.A-=this.B.ba},function(a){a=a.call(this,
        this.H&255,D(this,this.K));this.H=this.H&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.H&255,D(this,this.J));this.H=this.H&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.H&255,D(this,R(this)));this.H=this.H&-256|a;this.A-=this.B.da},function(a){a=a.call(this,this.H&255,D(this,this.D));this.H=this.H&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.D&255,D(this,this.D+this.K));this.D=this.D&-256|a;this.A-=this.B.ba},function(a){a=a.call(this,this.D&255,D(this,this.D+this.J));
        this.D=this.D&-256|a;this.A-=this.B.ca},function(a){a=a.call(this,this.D&255,E(this,this.L+this.K));this.D=this.D&-256|a;this.A-=this.B.ca},function(a){a=a.call(this,this.D&255,E(this,this.L+this.J));this.D=this.D&-256|a;this.A-=this.B.ba},function(a){a=a.call(this,this.D&255,D(this,this.K));this.D=this.D&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.D&255,D(this,this.J));this.D=this.D&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.D&255,D(this,R(this)));this.D=this.D&-256|a;this.A-=
        this.B.da},function(a){a=a.call(this,this.D&255,D(this,this.D));this.D=this.D&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.F>>8&255,D(this,this.D+this.K));this.F=this.F&-65281|a<<8;this.A-=this.B.ba},function(a){a=a.call(this,this.F>>8&255,D(this,this.D+this.J));this.F=this.F&-65281|a<<8;this.A-=this.B.ca},function(a){a=a.call(this,this.F>>8&255,E(this,this.L+this.K));this.F=this.F&-65281|a<<8;this.A-=this.B.ca},function(a){a=a.call(this,this.F>>8&255,E(this,this.L+this.J));this.F=this.F&
        -65281|a<<8;this.A-=this.B.ba},function(a){a=a.call(this,this.F>>8&255,D(this,this.K));this.F=this.F&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.F>>8&255,D(this,this.J));this.F=this.F&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.F>>8&255,D(this,R(this)));this.F=this.F&-65281|a<<8;this.A-=this.B.da},function(a){a=a.call(this,this.F>>8&255,D(this,this.D));this.F=this.F&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.G>>8&255,D(this,this.D+this.K));this.G=
        this.G&-65281|a<<8;this.A-=this.B.ba},function(a){a=a.call(this,this.G>>8&255,D(this,this.D+this.J));this.G=this.G&-65281|a<<8;this.A-=this.B.ca},function(a){a=a.call(this,this.G>>8&255,E(this,this.L+this.K));this.G=this.G&-65281|a<<8;this.A-=this.B.ca},function(a){a=a.call(this,this.G>>8&255,E(this,this.L+this.J));this.G=this.G&-65281|a<<8;this.A-=this.B.ba},function(a){a=a.call(this,this.G>>8&255,D(this,this.K));this.G=this.G&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.G>>8&255,
        D(this,this.J));this.G=this.G&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.G>>8&255,D(this,R(this)));this.G=this.G&-65281|a<<8;this.A-=this.B.da},function(a){a=a.call(this,this.G>>8&255,D(this,this.D));this.G=this.G&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.H>>8&255,D(this,this.D+this.K));this.H=this.H&-65281|a<<8;this.A-=this.B.ba},function(a){a=a.call(this,this.H>>8&255,D(this,this.D+this.J));this.H=this.H&-65281|a<<8;this.A-=this.B.ca},function(a){a=a.call(this,
        this.H>>8&255,E(this,this.L+this.K));this.H=this.H&-65281|a<<8;this.A-=this.B.ca},function(a){a=a.call(this,this.H>>8&255,E(this,this.L+this.J));this.H=this.H&-65281|a<<8;this.A-=this.B.ba},function(a){a=a.call(this,this.H>>8&255,D(this,this.K));this.H=this.H&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.H>>8&255,D(this,this.J));this.H=this.H&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.H>>8&255,D(this,R(this)));this.H=this.H&-65281|a<<8;this.A-=this.B.da},function(a){a=
        a.call(this,this.H>>8&255,D(this,this.D));this.H=this.H&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.D>>8&255,D(this,this.D+this.K));this.D=this.D&-65281|a<<8;this.A-=this.B.ba},function(a){a=a.call(this,this.D>>8&255,D(this,this.D+this.J));this.D=this.D&-65281|a<<8;this.A-=this.B.ca},function(a){a=a.call(this,this.D>>8&255,E(this,this.L+this.K));this.D=this.D&-65281|a<<8;this.A-=this.B.ca},function(a){a=a.call(this,this.D>>8&255,E(this,this.L+this.J));this.D=this.D&-65281|a<<8;this.A-=
        this.B.ba},function(a){a=a.call(this,this.D>>8&255,D(this,this.K));this.D=this.D&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.D>>8&255,D(this,this.J));this.D=this.D&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.D>>8&255,D(this,R(this)));this.D=this.D&-65281|a<<8;this.A-=this.B.da},function(a){a=a.call(this,this.D>>8&255,D(this,this.D));this.D=this.D&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.F&255,D(this,this.D+this.K+this.M()));this.F=this.F&-256|
        a;this.A-=this.B.P},function(a){a=a.call(this,this.F&255,D(this,this.D+this.J+this.M()));this.F=this.F&-256|a;this.A-=this.B.Q},function(a){a=a.call(this,this.F&255,E(this,this.L+this.K+this.M()));this.F=this.F&-256|a;this.A-=this.B.Q},function(a){a=a.call(this,this.F&255,E(this,this.L+this.J+this.M()));this.F=this.F&-256|a;this.A-=this.B.P},function(a){a=a.call(this,this.F&255,D(this,this.K+this.M()));this.F=this.F&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&255,D(this,this.J+this.M()));
        this.F=this.F&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&255,E(this,this.L+this.M()));this.F=this.F&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&255,D(this,this.D+this.M()));this.F=this.F&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&255,D(this,this.D+this.K+this.M()));this.G=this.G&-256|a;this.A-=this.B.P},function(a){a=a.call(this,this.G&255,D(this,this.D+this.J+this.M()));this.G=this.G&-256|a;this.A-=this.B.Q},function(a){a=a.call(this,this.G&255,E(this,
        this.L+this.K+this.M()));this.G=this.G&-256|a;this.A-=this.B.Q},function(a){a=a.call(this,this.G&255,E(this,this.L+this.J+this.M()));this.G=this.G&-256|a;this.A-=this.B.P},function(a){a=a.call(this,this.G&255,D(this,this.K+this.M()));this.G=this.G&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&255,D(this,this.J+this.M()));this.G=this.G&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&255,E(this,this.L+this.M()));this.G=this.G&-256|a;this.A-=this.B.I},function(a){a=a.call(this,
        this.G&255,D(this,this.D+this.M()));this.G=this.G&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&255,D(this,this.D+this.K+this.M()));this.H=this.H&-256|a;this.A-=this.B.P},function(a){a=a.call(this,this.H&255,D(this,this.D+this.J+this.M()));this.H=this.H&-256|a;this.A-=this.B.Q},function(a){a=a.call(this,this.H&255,E(this,this.L+this.K+this.M()));this.H=this.H&-256|a;this.A-=this.B.Q},function(a){a=a.call(this,this.H&255,E(this,this.L+this.J+this.M()));this.H=this.H&-256|a;this.A-=this.B.P},
        function(a){a=a.call(this,this.H&255,D(this,this.K+this.M()));this.H=this.H&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&255,D(this,this.J+this.M()));this.H=this.H&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&255,E(this,this.L+this.M()));this.H=this.H&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&255,D(this,this.D+this.M()));this.H=this.H&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&255,D(this,this.D+this.K+this.M()));this.D=this.D&-256|a;this.A-=
        this.B.P},function(a){a=a.call(this,this.D&255,D(this,this.D+this.J+this.M()));this.D=this.D&-256|a;this.A-=this.B.Q},function(a){a=a.call(this,this.D&255,E(this,this.L+this.K+this.M()));this.D=this.D&-256|a;this.A-=this.B.Q},function(a){a=a.call(this,this.D&255,E(this,this.L+this.J+this.M()));this.D=this.D&-256|a;this.A-=this.B.P},function(a){a=a.call(this,this.D&255,D(this,this.K+this.M()));this.D=this.D&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&255,D(this,this.J+this.M()));this.D=
        this.D&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&255,E(this,this.L+this.M()));this.D=this.D&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&255,D(this,this.D+this.M()));this.D=this.D&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.F>>8&255,D(this,this.D+this.K+this.M()));this.F=this.F&-65281|a<<8;this.A-=this.B.P},function(a){a=a.call(this,this.F>>8&255,D(this,this.D+this.J+this.M()));this.F=this.F&-65281|a<<8;this.A-=this.B.Q},function(a){a=a.call(this,this.F>>8&
        255,E(this,this.L+this.K+this.M()));this.F=this.F&-65281|a<<8;this.A-=this.B.Q},function(a){a=a.call(this,this.F>>8&255,E(this,this.L+this.J+this.M()));this.F=this.F&-65281|a<<8;this.A-=this.B.P},function(a){a=a.call(this,this.F>>8&255,D(this,this.K+this.M()));this.F=this.F&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.F>>8&255,D(this,this.J+this.M()));this.F=this.F&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.F>>8&255,E(this,this.L+this.M()));this.F=this.F&-65281|a<<
        8;this.A-=this.B.I},function(a){a=a.call(this,this.F>>8&255,D(this,this.D+this.M()));this.F=this.F&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.G>>8&255,D(this,this.D+this.K+this.M()));this.G=this.G&-65281|a<<8;this.A-=this.B.P},function(a){a=a.call(this,this.G>>8&255,D(this,this.D+this.J+this.M()));this.G=this.G&-65281|a<<8;this.A-=this.B.Q},function(a){a=a.call(this,this.G>>8&255,E(this,this.L+this.K+this.M()));this.G=this.G&-65281|a<<8;this.A-=this.B.Q},function(a){a=a.call(this,
        this.G>>8&255,E(this,this.L+this.J+this.M()));this.G=this.G&-65281|a<<8;this.A-=this.B.P},function(a){a=a.call(this,this.G>>8&255,D(this,this.K+this.M()));this.G=this.G&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.G>>8&255,D(this,this.J+this.M()));this.G=this.G&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.G>>8&255,E(this,this.L+this.M()));this.G=this.G&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.G>>8&255,D(this,this.D+this.M()));this.G=this.G&-65281|
        a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.H>>8&255,D(this,this.D+this.K+this.M()));this.H=this.H&-65281|a<<8;this.A-=this.B.P},function(a){a=a.call(this,this.H>>8&255,D(this,this.D+this.J+this.M()));this.H=this.H&-65281|a<<8;this.A-=this.B.Q},function(a){a=a.call(this,this.H>>8&255,E(this,this.L+this.K+this.M()));this.H=this.H&-65281|a<<8;this.A-=this.B.Q},function(a){a=a.call(this,this.H>>8&255,E(this,this.L+this.J+this.M()));this.H=this.H&-65281|a<<8;this.A-=this.B.P},function(a){a=
        a.call(this,this.H>>8&255,D(this,this.K+this.M()));this.H=this.H&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.H>>8&255,D(this,this.J+this.M()));this.H=this.H&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.H>>8&255,E(this,this.L+this.M()));this.H=this.H&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.H>>8&255,D(this,this.D+this.M()));this.H=this.H&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.D>>8&255,D(this,this.D+this.K+this.M()));this.D=
        this.D&-65281|a<<8;this.A-=this.B.P},function(a){a=a.call(this,this.D>>8&255,D(this,this.D+this.J+this.M()));this.D=this.D&-65281|a<<8;this.A-=this.B.Q},function(a){a=a.call(this,this.D>>8&255,E(this,this.L+this.K+this.M()));this.D=this.D&-65281|a<<8;this.A-=this.B.Q},function(a){a=a.call(this,this.D>>8&255,E(this,this.L+this.J+this.M()));this.D=this.D&-65281|a<<8;this.A-=this.B.P},function(a){a=a.call(this,this.D>>8&255,D(this,this.K+this.M()));this.D=this.D&-65281|a<<8;this.A-=this.B.I},function(a){a=
        a.call(this,this.D>>8&255,D(this,this.J+this.M()));this.D=this.D&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.D>>8&255,E(this,this.L+this.M()));this.D=this.D&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.D>>8&255,D(this,this.D+this.M()));this.D=this.D&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.F&255,D(this,this.D+this.K+R(this)));this.F=this.F&-256|a;this.A-=this.B.P},function(a){a=a.call(this,this.F&255,D(this,this.D+this.J+R(this)));this.F=this.F&
        -256|a;this.A-=this.B.Q},function(a){a=a.call(this,this.F&255,E(this,this.L+this.K+R(this)));this.F=this.F&-256|a;this.A-=this.B.Q},function(a){a=a.call(this,this.F&255,E(this,this.L+this.J+R(this)));this.F=this.F&-256|a;this.A-=this.B.P},function(a){a=a.call(this,this.F&255,D(this,this.K+R(this)));this.F=this.F&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&255,D(this,this.J+R(this)));this.F=this.F&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&255,E(this,this.L+R(this)));this.F=
        this.F&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&255,D(this,this.D+R(this)));this.F=this.F&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&255,D(this,this.D+this.K+R(this)));this.G=this.G&-256|a;this.A-=this.B.P},function(a){a=a.call(this,this.G&255,D(this,this.D+this.J+R(this)));this.G=this.G&-256|a;this.A-=this.B.Q},function(a){a=a.call(this,this.G&255,E(this,this.L+this.K+R(this)));this.G=this.G&-256|a;this.A-=this.B.Q},function(a){a=a.call(this,this.G&255,E(this,this.L+
        this.J+R(this)));this.G=this.G&-256|a;this.A-=this.B.P},function(a){a=a.call(this,this.G&255,D(this,this.K+R(this)));this.G=this.G&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&255,D(this,this.J+R(this)));this.G=this.G&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&255,E(this,this.L+R(this)));this.G=this.G&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&255,D(this,this.D+R(this)));this.G=this.G&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&255,D(this,this.D+
        this.K+R(this)));this.H=this.H&-256|a;this.A-=this.B.P},function(a){a=a.call(this,this.H&255,D(this,this.D+this.J+R(this)));this.H=this.H&-256|a;this.A-=this.B.Q},function(a){a=a.call(this,this.H&255,E(this,this.L+this.K+R(this)));this.H=this.H&-256|a;this.A-=this.B.Q},function(a){a=a.call(this,this.H&255,E(this,this.L+this.J+R(this)));this.H=this.H&-256|a;this.A-=this.B.P},function(a){a=a.call(this,this.H&255,D(this,this.K+R(this)));this.H=this.H&-256|a;this.A-=this.B.I},function(a){a=a.call(this,
        this.H&255,D(this,this.J+R(this)));this.H=this.H&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&255,E(this,this.L+R(this)));this.H=this.H&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&255,D(this,this.D+R(this)));this.H=this.H&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&255,D(this,this.D+this.K+R(this)));this.D=this.D&-256|a;this.A-=this.B.P},function(a){a=a.call(this,this.D&255,D(this,this.D+this.J+R(this)));this.D=this.D&-256|a;this.A-=this.B.Q},function(a){a=
        a.call(this,this.D&255,E(this,this.L+this.K+R(this)));this.D=this.D&-256|a;this.A-=this.B.Q},function(a){a=a.call(this,this.D&255,E(this,this.L+this.J+R(this)));this.D=this.D&-256|a;this.A-=this.B.P},function(a){a=a.call(this,this.D&255,D(this,this.K+R(this)));this.D=this.D&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&255,D(this,this.J+R(this)));this.D=this.D&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&255,E(this,this.L+R(this)));this.D=this.D&-256|a;this.A-=this.B.I},function(a){a=
        a.call(this,this.D&255,D(this,this.D+R(this)));this.D=this.D&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.F>>8&255,D(this,this.D+this.K+R(this)));this.F=this.F&-65281|a<<8;this.A-=this.B.P},function(a){a=a.call(this,this.F>>8&255,D(this,this.D+this.J+R(this)));this.F=this.F&-65281|a<<8;this.A-=this.B.Q},function(a){a=a.call(this,this.F>>8&255,E(this,this.L+this.K+R(this)));this.F=this.F&-65281|a<<8;this.A-=this.B.Q},function(a){a=a.call(this,this.F>>8&255,E(this,this.L+this.J+R(this)));
        this.F=this.F&-65281|a<<8;this.A-=this.B.P},function(a){a=a.call(this,this.F>>8&255,D(this,this.K+R(this)));this.F=this.F&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.F>>8&255,D(this,this.J+R(this)));this.F=this.F&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.F>>8&255,E(this,this.L+R(this)));this.F=this.F&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.F>>8&255,D(this,this.D+R(this)));this.F=this.F&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,
        this.G>>8&255,D(this,this.D+this.K+R(this)));this.G=this.G&-65281|a<<8;this.A-=this.B.P},function(a){a=a.call(this,this.G>>8&255,D(this,this.D+this.J+R(this)));this.G=this.G&-65281|a<<8;this.A-=this.B.Q},function(a){a=a.call(this,this.G>>8&255,E(this,this.L+this.K+R(this)));this.G=this.G&-65281|a<<8;this.A-=this.B.Q},function(a){a=a.call(this,this.G>>8&255,E(this,this.L+this.J+R(this)));this.G=this.G&-65281|a<<8;this.A-=this.B.P},function(a){a=a.call(this,this.G>>8&255,D(this,this.K+R(this)));this.G=
        this.G&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.G>>8&255,D(this,this.J+R(this)));this.G=this.G&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.G>>8&255,E(this,this.L+R(this)));this.G=this.G&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.G>>8&255,D(this,this.D+R(this)));this.G=this.G&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.H>>8&255,D(this,this.D+this.K+R(this)));this.H=this.H&-65281|a<<8;this.A-=this.B.P},function(a){a=a.call(this,
        this.H>>8&255,D(this,this.D+this.J+R(this)));this.H=this.H&-65281|a<<8;this.A-=this.B.Q},function(a){a=a.call(this,this.H>>8&255,E(this,this.L+this.K+R(this)));this.H=this.H&-65281|a<<8;this.A-=this.B.Q},function(a){a=a.call(this,this.H>>8&255,E(this,this.L+this.J+R(this)));this.H=this.H&-65281|a<<8;this.A-=this.B.P},function(a){a=a.call(this,this.H>>8&255,D(this,this.K+R(this)));this.H=this.H&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.H>>8&255,D(this,this.J+R(this)));this.H=this.H&
        -65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.H>>8&255,E(this,this.L+R(this)));this.H=this.H&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.H>>8&255,D(this,this.D+R(this)));this.H=this.H&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.D>>8&255,D(this,this.D+this.K+R(this)));this.D=this.D&-65281|a<<8;this.A-=this.B.P},function(a){a=a.call(this,this.D>>8&255,D(this,this.D+this.J+R(this)));this.D=this.D&-65281|a<<8;this.A-=this.B.Q},function(a){a=a.call(this,
        this.D>>8&255,E(this,this.L+this.K+R(this)));this.D=this.D&-65281|a<<8;this.A-=this.B.Q},function(a){a=a.call(this,this.D>>8&255,E(this,this.L+this.J+R(this)));this.D=this.D&-65281|a<<8;this.A-=this.B.P},function(a){a=a.call(this,this.D>>8&255,D(this,this.K+R(this)));this.D=this.D&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.D>>8&255,D(this,this.J+R(this)));this.D=this.D&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.D>>8&255,E(this,this.L+R(this)));this.D=this.D&-65281|
        a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.D>>8&255,D(this,this.D+R(this)));this.D=this.D&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.F&255,this.F&255);this.F=this.F&-256|a},function(a){a=a.call(this,this.F&255,this.G&255);this.F=this.F&-256|a},function(a){a=a.call(this,this.F&255,this.H&255);this.F=this.F&-256|a},function(a){a=a.call(this,this.F&255,this.D&255);this.F=this.F&-256|a},function(a){a=a.call(this,this.F&255,this.F>>8&255);this.F=this.F&-256|a},function(a){a=
        a.call(this,this.F&255,this.G>>8&255);this.F=this.F&-256|a},function(a){a=a.call(this,this.F&255,this.H>>8&255);this.F=this.F&-256|a},function(a){a=a.call(this,this.F&255,this.D>>8&255);this.F=this.F&-256|a},function(a){a=a.call(this,this.G&255,this.F&255);this.G=this.G&-256|a},function(a){a=a.call(this,this.G&255,this.G&255);this.G=this.G&-256|a},function(a){a=a.call(this,this.G&255,this.H&255);this.G=this.G&-256|a},function(a){a=a.call(this,this.G&255,this.D&255);this.G=this.G&-256|a},function(a){a=
        a.call(this,this.G&255,this.F>>8&255);this.G=this.G&-256|a},function(a){a=a.call(this,this.G&255,this.G>>8&255);this.G=this.G&-256|a},function(a){a=a.call(this,this.G&255,this.H>>8&255);this.G=this.G&-256|a},function(a){a=a.call(this,this.G&255,this.D>>8&255);this.G=this.G&-256|a},function(a){a=a.call(this,this.H&255,this.F&255);this.H=this.H&-256|a},function(a){a=a.call(this,this.H&255,this.G&255);this.H=this.H&-256|a},function(a){a=a.call(this,this.H&255,this.H&255);this.H=this.H&-256|a},function(a){a=
        a.call(this,this.H&255,this.D&255);this.H=this.H&-256|a},function(a){a=a.call(this,this.H&255,this.F>>8&255);this.H=this.H&-256|a},function(a){a=a.call(this,this.H&255,this.G>>8&255);this.H=this.H&-256|a},function(a){a=a.call(this,this.H&255,this.H>>8&255);this.H=this.H&-256|a},function(a){a=a.call(this,this.H&255,this.D>>8&255);this.H=this.H&-256|a},function(a){a=a.call(this,this.D&255,this.F&255);this.D=this.D&-256|a},function(a){a=a.call(this,this.D&255,this.G&255);this.D=this.D&-256|a},function(a){a=
        a.call(this,this.D&255,this.H&255);this.D=this.D&-256|a},function(a){a=a.call(this,this.D&255,this.D&255);this.D=this.D&-256|a},function(a){a=a.call(this,this.D&255,this.F>>8&255);this.D=this.D&-256|a},function(a){a=a.call(this,this.D&255,this.G>>8&255);this.D=this.D&-256|a},function(a){a=a.call(this,this.D&255,this.H>>8&255);this.D=this.D&-256|a},function(a){a=a.call(this,this.D&255,this.D>>8&255);this.D=this.D&-256|a},function(a){a=a.call(this,this.F>>8&255,this.F&255);this.F=this.F&-65281|a<<8},
        function(a){a=a.call(this,this.F>>8&255,this.G&255);this.F=this.F&-65281|a<<8},function(a){a=a.call(this,this.F>>8&255,this.H&255);this.F=this.F&-65281|a<<8},function(a){a=a.call(this,this.F>>8&255,this.D&255);this.F=this.F&-65281|a<<8},function(a){a=a.call(this,this.F>>8&255,this.F>>8&255);this.F=this.F&-65281|a<<8},function(a){a=a.call(this,this.F>>8&255,this.G>>8&255);this.F=this.F&-65281|a<<8},function(a){a=a.call(this,this.F>>8&255,this.H>>8&255);this.F=this.F&-65281|a<<8},function(a){a=a.call(this,
        this.F>>8&255,this.D>>8&255);this.F=this.F&-65281|a<<8},function(a){a=a.call(this,this.G>>8&255,this.F&255);this.G=this.G&-65281|a<<8},function(a){a=a.call(this,this.G>>8&255,this.G&255);this.G=this.G&-65281|a<<8},function(a){a=a.call(this,this.G>>8&255,this.H&255);this.G=this.G&-65281|a<<8},function(a){a=a.call(this,this.G>>8&255,this.D&255);this.G=this.G&-65281|a<<8},function(a){a=a.call(this,this.G>>8&255,this.F>>8&255);this.G=this.G&-65281|a<<8},function(a){a=a.call(this,this.G>>8&255,this.G>>
        8&255);this.G=this.G&-65281|a<<8},function(a){a=a.call(this,this.G>>8&255,this.H>>8&255);this.G=this.G&-65281|a<<8},function(a){a=a.call(this,this.G>>8&255,this.D>>8&255);this.G=this.G&-65281|a<<8},function(a){a=a.call(this,this.H>>8&255,this.F&255);this.H=this.H&-65281|a<<8},function(a){a=a.call(this,this.H>>8&255,this.G&255);this.H=this.H&-65281|a<<8},function(a){a=a.call(this,this.H>>8&255,this.H&255);this.H=this.H&-65281|a<<8},function(a){a=a.call(this,this.H>>8&255,this.D&255);this.H=this.H&
        -65281|a<<8},function(a){a=a.call(this,this.H>>8&255,this.F>>8&255);this.H=this.H&-65281|a<<8},function(a){a=a.call(this,this.H>>8&255,this.G>>8&255);this.H=this.H&-65281|a<<8},function(a){a=a.call(this,this.H>>8&255,this.H>>8&255);this.H=this.H&-65281|a<<8},function(a){a=a.call(this,this.H>>8&255,this.D>>8&255);this.H=this.H&-65281|a<<8},function(a){a=a.call(this,this.D>>8&255,this.F&255);this.D=this.D&-65281|a<<8},function(a){a=a.call(this,this.D>>8&255,this.G&255);this.D=this.D&-65281|a<<8},function(a){a=
        a.call(this,this.D>>8&255,this.H&255);this.D=this.D&-65281|a<<8},function(a){a=a.call(this,this.D>>8&255,this.D&255);this.D=this.D&-65281|a<<8},function(a){a=a.call(this,this.D>>8&255,this.F>>8&255);this.D=this.D&-65281|a<<8},function(a){a=a.call(this,this.D>>8&255,this.G>>8&255);this.D=this.D&-65281|a<<8},function(a){a=a.call(this,this.D>>8&255,this.H>>8&255);this.D=this.D&-65281|a<<8},function(a){a=a.call(this,this.D>>8&255,this.D>>8&255);this.D=this.D&-65281|a<<8}],re=[function(a){a=a.call(this,
        L(this,this.D+this.K),this.F&255);P(this,a);this.A-=this.B.ba},function(a){a=a.call(this,L(this,this.D+this.J),this.F&255);P(this,a);this.A-=this.B.ca},function(a){a=a.call(this,M(this,this.L+this.K),this.F&255);P(this,a);this.A-=this.B.ca},function(a){a=a.call(this,M(this,this.L+this.J),this.F&255);P(this,a);this.A-=this.B.ba},function(a){a=a.call(this,L(this,this.K),this.F&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,this.J),this.F&255);P(this,a);this.A-=this.B.N},function(a){a=
        a.call(this,L(this,R(this)),this.F&255);P(this,a);this.A-=this.B.da},function(a){a=a.call(this,L(this,this.D),this.F&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,this.D+this.K),this.G&255);P(this,a);this.A-=this.B.ba},function(a){a=a.call(this,L(this,this.D+this.J),this.G&255);P(this,a);this.A-=this.B.ca},function(a){a=a.call(this,M(this,this.L+this.K),this.G&255);P(this,a);this.A-=this.B.ca},function(a){a=a.call(this,M(this,this.L+this.J),this.G&255);P(this,a);this.A-=this.B.ba},
        function(a){a=a.call(this,L(this,this.K),this.G&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,this.J),this.G&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,R(this)),this.G&255);P(this,a);this.A-=this.B.da},function(a){a=a.call(this,L(this,this.D),this.G&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,this.D+this.K),this.H&255);P(this,a);this.A-=this.B.ba},function(a){a=a.call(this,L(this,this.D+this.J),this.H&255);P(this,a);this.A-=this.B.ca},
        function(a){a=a.call(this,M(this,this.L+this.K),this.H&255);P(this,a);this.A-=this.B.ca},function(a){a=a.call(this,M(this,this.L+this.J),this.H&255);P(this,a);this.A-=this.B.ba},function(a){a=a.call(this,L(this,this.K),this.H&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,this.J),this.H&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,R(this)),this.H&255);P(this,a);this.A-=this.B.da},function(a){a=a.call(this,L(this,this.D),this.H&255);P(this,a);this.A-=this.B.N},
        function(a){a=a.call(this,L(this,this.D+this.K),this.D&255);P(this,a);this.A-=this.B.ba},function(a){a=a.call(this,L(this,this.D+this.J),this.D&255);P(this,a);this.A-=this.B.ca},function(a){a=a.call(this,M(this,this.L+this.K),this.D&255);P(this,a);this.A-=this.B.ca},function(a){a=a.call(this,M(this,this.L+this.J),this.D&255);P(this,a);this.A-=this.B.ba},function(a){a=a.call(this,L(this,this.K),this.D&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,this.J),this.D&255);P(this,a);this.A-=
        this.B.N},function(a){a=a.call(this,L(this,R(this)),this.D&255);P(this,a);this.A-=this.B.da},function(a){a=a.call(this,L(this,this.D),this.D&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,this.D+this.K),this.F>>8&255);P(this,a);this.A-=this.B.ba},function(a){a=a.call(this,L(this,this.D+this.J),this.F>>8&255);P(this,a);this.A-=this.B.ca},function(a){a=a.call(this,M(this,this.L+this.K),this.F>>8&255);P(this,a);this.A-=this.B.ca},function(a){a=a.call(this,M(this,this.L+this.J),this.F>>
        8&255);P(this,a);this.A-=this.B.ba},function(a){a=a.call(this,L(this,this.K),this.F>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,this.J),this.F>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,R(this)),this.F>>8&255);P(this,a);this.A-=this.B.da},function(a){a=a.call(this,L(this,this.D),this.F>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,this.D+this.K),this.G>>8&255);P(this,a);this.A-=this.B.ba},function(a){a=a.call(this,L(this,this.D+
        this.J),this.G>>8&255);P(this,a);this.A-=this.B.ca},function(a){a=a.call(this,M(this,this.L+this.K),this.G>>8&255);P(this,a);this.A-=this.B.ca},function(a){a=a.call(this,M(this,this.L+this.J),this.G>>8&255);P(this,a);this.A-=this.B.ba},function(a){a=a.call(this,L(this,this.K),this.G>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,this.J),this.G>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,R(this)),this.G>>8&255);P(this,a);this.A-=this.B.da},function(a){a=
        a.call(this,L(this,this.D),this.G>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,this.D+this.K),this.H>>8&255);P(this,a);this.A-=this.B.ba},function(a){a=a.call(this,L(this,this.D+this.J),this.H>>8&255);P(this,a);this.A-=this.B.ca},function(a){a=a.call(this,M(this,this.L+this.K),this.H>>8&255);P(this,a);this.A-=this.B.ca},function(a){a=a.call(this,M(this,this.L+this.J),this.H>>8&255);P(this,a);this.A-=this.B.ba},function(a){a=a.call(this,L(this,this.K),this.H>>8&255);P(this,
        a);this.A-=this.B.N},function(a){a=a.call(this,L(this,this.J),this.H>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,R(this)),this.H>>8&255);P(this,a);this.A-=this.B.da},function(a){a=a.call(this,L(this,this.D),this.H>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,this.D+this.K),this.D>>8&255);P(this,a);this.A-=this.B.ba},function(a){a=a.call(this,L(this,this.D+this.J),this.D>>8&255);P(this,a);this.A-=this.B.ca},function(a){a=a.call(this,M(this,this.L+this.K),
        this.D>>8&255);P(this,a);this.A-=this.B.ca},function(a){a=a.call(this,M(this,this.L+this.J),this.D>>8&255);P(this,a);this.A-=this.B.ba},function(a){a=a.call(this,L(this,this.K),this.D>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,this.J),this.D>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,R(this)),this.D>>8&255);P(this,a);this.A-=this.B.da},function(a){a=a.call(this,L(this,this.D),this.D>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,
        this.D+this.K+this.M()),this.F&255);P(this,a);this.A-=this.B.P},function(a){a=a.call(this,L(this,this.D+this.J+this.M()),this.F&255);P(this,a);this.A-=this.B.Q},function(a){a=a.call(this,M(this,this.L+this.K+this.M()),this.F&255);P(this,a);this.A-=this.B.Q},function(a){a=a.call(this,M(this,this.L+this.J+this.M()),this.F&255);P(this,a);this.A-=this.B.P},function(a){a=a.call(this,L(this,this.K+this.M()),this.F&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.J+this.M()),this.F&
        255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.L+this.M()),this.F&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.D+this.M()),this.F&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.D+this.K+this.M()),this.G&255);P(this,a);this.A-=this.B.P},function(a){a=a.call(this,L(this,this.D+this.J+this.M()),this.G&255);P(this,a);this.A-=this.B.Q},function(a){a=a.call(this,M(this,this.L+this.K+this.M()),this.G&255);P(this,a);this.A-=this.B.Q},
        function(a){a=a.call(this,M(this,this.L+this.J+this.M()),this.G&255);P(this,a);this.A-=this.B.P},function(a){a=a.call(this,L(this,this.K+this.M()),this.G&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.J+this.M()),this.G&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.L+this.M()),this.G&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.D+this.M()),this.G&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.D+this.K+
        this.M()),this.H&255);P(this,a);this.A-=this.B.P},function(a){a=a.call(this,L(this,this.D+this.J+this.M()),this.H&255);P(this,a);this.A-=this.B.Q},function(a){a=a.call(this,M(this,this.L+this.K+this.M()),this.H&255);P(this,a);this.A-=this.B.Q},function(a){a=a.call(this,M(this,this.L+this.J+this.M()),this.H&255);P(this,a);this.A-=this.B.P},function(a){a=a.call(this,L(this,this.K+this.M()),this.H&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.J+this.M()),this.H&255);P(this,a);
        this.A-=this.B.I},function(a){a=a.call(this,M(this,this.L+this.M()),this.H&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.D+this.M()),this.H&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.D+this.K+this.M()),this.D&255);P(this,a);this.A-=this.B.P},function(a){a=a.call(this,L(this,this.D+this.J+this.M()),this.D&255);P(this,a);this.A-=this.B.Q},function(a){a=a.call(this,M(this,this.L+this.K+this.M()),this.D&255);P(this,a);this.A-=this.B.Q},function(a){a=
        a.call(this,M(this,this.L+this.J+this.M()),this.D&255);P(this,a);this.A-=this.B.P},function(a){a=a.call(this,L(this,this.K+this.M()),this.D&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.J+this.M()),this.D&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.L+this.M()),this.D&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.D+this.M()),this.D&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.D+this.K+this.M()),this.F>>
        8&255);P(this,a);this.A-=this.B.P},function(a){a=a.call(this,L(this,this.D+this.J+this.M()),this.F>>8&255);P(this,a);this.A-=this.B.Q},function(a){a=a.call(this,M(this,this.L+this.K+this.M()),this.F>>8&255);P(this,a);this.A-=this.B.Q},function(a){a=a.call(this,M(this,this.L+this.J+this.M()),this.F>>8&255);P(this,a);this.A-=this.B.P},function(a){a=a.call(this,L(this,this.K+this.M()),this.F>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.J+this.M()),this.F>>8&255);P(this,a);
        this.A-=this.B.I},function(a){a=a.call(this,M(this,this.L+this.M()),this.F>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.D+this.M()),this.F>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.D+this.K+this.M()),this.G>>8&255);P(this,a);this.A-=this.B.P},function(a){a=a.call(this,L(this,this.D+this.J+this.M()),this.G>>8&255);P(this,a);this.A-=this.B.Q},function(a){a=a.call(this,M(this,this.L+this.K+this.M()),this.G>>8&255);P(this,a);this.A-=this.B.Q},
        function(a){a=a.call(this,M(this,this.L+this.J+this.M()),this.G>>8&255);P(this,a);this.A-=this.B.P},function(a){a=a.call(this,L(this,this.K+this.M()),this.G>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.J+this.M()),this.G>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.L+this.M()),this.G>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.D+this.M()),this.G>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,
        this.D+this.K+this.M()),this.H>>8&255);P(this,a);this.A-=this.B.P},function(a){a=a.call(this,L(this,this.D+this.J+this.M()),this.H>>8&255);P(this,a);this.A-=this.B.Q},function(a){a=a.call(this,M(this,this.L+this.K+this.M()),this.H>>8&255);P(this,a);this.A-=this.B.Q},function(a){a=a.call(this,M(this,this.L+this.J+this.M()),this.H>>8&255);P(this,a);this.A-=this.B.P},function(a){a=a.call(this,L(this,this.K+this.M()),this.H>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.J+this.M()),
        this.H>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.L+this.M()),this.H>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.D+this.M()),this.H>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.D+this.K+this.M()),this.D>>8&255);P(this,a);this.A-=this.B.P},function(a){a=a.call(this,L(this,this.D+this.J+this.M()),this.D>>8&255);P(this,a);this.A-=this.B.Q},function(a){a=a.call(this,M(this,this.L+this.K+this.M()),this.D>>8&255);
        P(this,a);this.A-=this.B.Q},function(a){a=a.call(this,M(this,this.L+this.J+this.M()),this.D>>8&255);P(this,a);this.A-=this.B.P},function(a){a=a.call(this,L(this,this.K+this.M()),this.D>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.J+this.M()),this.D>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.L+this.M()),this.D>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.D+this.M()),this.D>>8&255);P(this,a);this.A-=this.B.I},function(a){a=
        a.call(this,L(this,this.D+this.K+R(this)),this.F&255);P(this,a);this.A-=this.B.P},function(a){a=a.call(this,L(this,this.D+this.J+R(this)),this.F&255);P(this,a);this.A-=this.B.Q},function(a){a=a.call(this,M(this,this.L+this.K+R(this)),this.F&255);P(this,a);this.A-=this.B.Q},function(a){a=a.call(this,M(this,this.L+this.J+R(this)),this.F&255);P(this,a);this.A-=this.B.P},function(a){a=a.call(this,L(this,this.K+R(this)),this.F&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.J+R(this)),
        this.F&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.L+R(this)),this.F&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.D+R(this)),this.F&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.D+this.K+R(this)),this.G&255);P(this,a);this.A-=this.B.P},function(a){a=a.call(this,L(this,this.D+this.J+R(this)),this.G&255);P(this,a);this.A-=this.B.Q},function(a){a=a.call(this,M(this,this.L+this.K+R(this)),this.G&255);P(this,a);this.A-=this.B.Q},
        function(a){a=a.call(this,M(this,this.L+this.J+R(this)),this.G&255);P(this,a);this.A-=this.B.P},function(a){a=a.call(this,L(this,this.K+R(this)),this.G&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.J+R(this)),this.G&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.L+R(this)),this.G&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.D+R(this)),this.G&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.D+this.K+R(this)),
        this.H&255);P(this,a);this.A-=this.B.P},function(a){a=a.call(this,L(this,this.D+this.J+R(this)),this.H&255);P(this,a);this.A-=this.B.Q},function(a){a=a.call(this,M(this,this.L+this.K+R(this)),this.H&255);P(this,a);this.A-=this.B.Q},function(a){a=a.call(this,M(this,this.L+this.J+R(this)),this.H&255);P(this,a);this.A-=this.B.P},function(a){a=a.call(this,L(this,this.K+R(this)),this.H&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.J+R(this)),this.H&255);P(this,a);this.A-=this.B.I},
        function(a){a=a.call(this,M(this,this.L+R(this)),this.H&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.D+R(this)),this.H&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.D+this.K+R(this)),this.D&255);P(this,a);this.A-=this.B.P},function(a){a=a.call(this,L(this,this.D+this.J+R(this)),this.D&255);P(this,a);this.A-=this.B.Q},function(a){a=a.call(this,M(this,this.L+this.K+R(this)),this.D&255);P(this,a);this.A-=this.B.Q},function(a){a=a.call(this,M(this,this.L+
        this.J+R(this)),this.D&255);P(this,a);this.A-=this.B.P},function(a){a=a.call(this,L(this,this.K+R(this)),this.D&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.J+R(this)),this.D&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.L+R(this)),this.D&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.D+R(this)),this.D&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.D+this.K+R(this)),this.F>>8&255);P(this,a);this.A-=
        this.B.P},function(a){a=a.call(this,L(this,this.D+this.J+R(this)),this.F>>8&255);P(this,a);this.A-=this.B.Q},function(a){a=a.call(this,M(this,this.L+this.K+R(this)),this.F>>8&255);P(this,a);this.A-=this.B.Q},function(a){a=a.call(this,M(this,this.L+this.J+R(this)),this.F>>8&255);P(this,a);this.A-=this.B.P},function(a){a=a.call(this,L(this,this.K+R(this)),this.F>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.J+R(this)),this.F>>8&255);P(this,a);this.A-=this.B.I},function(a){a=
        a.call(this,M(this,this.L+R(this)),this.F>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.D+R(this)),this.F>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.D+this.K+R(this)),this.G>>8&255);P(this,a);this.A-=this.B.P},function(a){a=a.call(this,L(this,this.D+this.J+R(this)),this.G>>8&255);P(this,a);this.A-=this.B.Q},function(a){a=a.call(this,M(this,this.L+this.K+R(this)),this.G>>8&255);P(this,a);this.A-=this.B.Q},function(a){a=a.call(this,M(this,this.L+
        this.J+R(this)),this.G>>8&255);P(this,a);this.A-=this.B.P},function(a){a=a.call(this,L(this,this.K+R(this)),this.G>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.J+R(this)),this.G>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.L+R(this)),this.G>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.D+R(this)),this.G>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.D+this.K+R(this)),this.H>>8&255);P(this,
        a);this.A-=this.B.P},function(a){a=a.call(this,L(this,this.D+this.J+R(this)),this.H>>8&255);P(this,a);this.A-=this.B.Q},function(a){a=a.call(this,M(this,this.L+this.K+R(this)),this.H>>8&255);P(this,a);this.A-=this.B.Q},function(a){a=a.call(this,M(this,this.L+this.J+R(this)),this.H>>8&255);P(this,a);this.A-=this.B.P},function(a){a=a.call(this,L(this,this.K+R(this)),this.H>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.J+R(this)),this.H>>8&255);P(this,a);this.A-=this.B.I},
        function(a){a=a.call(this,M(this,this.L+R(this)),this.H>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.D+R(this)),this.H>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.D+this.K+R(this)),this.D>>8&255);P(this,a);this.A-=this.B.P},function(a){a=a.call(this,L(this,this.D+this.J+R(this)),this.D>>8&255);P(this,a);this.A-=this.B.Q},function(a){a=a.call(this,M(this,this.L+this.K+R(this)),this.D>>8&255);P(this,a);this.A-=this.B.Q},function(a){a=a.call(this,
        M(this,this.L+this.J+R(this)),this.D>>8&255);P(this,a);this.A-=this.B.P},function(a){a=a.call(this,L(this,this.K+R(this)),this.D>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.J+R(this)),this.D>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.L+R(this)),this.D>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.D+R(this)),this.D>>8&255);P(this,a);this.A-=this.B.I},y[192],y[200],y[208],y[216],y[224],y[232],y[240],y[248],y[193],
        y[201],y[209],y[217],y[225],y[233],y[241],y[249],y[194],y[202],y[210],y[218],y[226],y[234],y[242],y[250],y[195],y[203],y[211],y[219],y[227],y[235],y[243],y[251],y[196],y[204],y[212],y[220],y[228],y[236],y[244],y[252],y[197],y[205],y[213],y[221],y[229],y[237],y[245],y[253],y[198],y[206],y[214],y[222],y[230],y[238],y[246],y[254],y[199],y[207],y[215],y[223],y[231],y[239],y[247],y[255]],se=[function(a,b){var c=a[0].call(this,L(this,this.D+this.K),b.call(this));P(this,c);this.A-=this.B.ba},function(a,
        b){var c=a[0].call(this,L(this,this.D+this.J),b.call(this));P(this,c);this.A-=this.B.ca},function(a,b){var c=a[0].call(this,M(this,this.L+this.K),b.call(this));P(this,c);this.A-=this.B.ca},function(a,b){var c=a[0].call(this,M(this,this.L+this.J),b.call(this));P(this,c);this.A-=this.B.ba},function(a,b){var c=a[0].call(this,L(this,this.K),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[0].call(this,L(this,this.J),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[0].call(this,
        L(this,R(this)),b.call(this));P(this,c);this.A-=this.B.da},function(a,b){var c=a[0].call(this,L(this,this.D),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[1].call(this,L(this,this.D+this.K),b.call(this));P(this,c);this.A-=this.B.ba},function(a,b){var c=a[1].call(this,L(this,this.D+this.J),b.call(this));P(this,c);this.A-=this.B.ca},function(a,b){var c=a[1].call(this,M(this,this.L+this.K),b.call(this));P(this,c);this.A-=this.B.ca},function(a,b){var c=a[1].call(this,M(this,this.L+this.J),
        b.call(this));P(this,c);this.A-=this.B.ba},function(a,b){var c=a[1].call(this,L(this,this.K),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[1].call(this,L(this,this.J),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[1].call(this,L(this,R(this)),b.call(this));P(this,c);this.A-=this.B.da},function(a,b){var c=a[1].call(this,L(this,this.D),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[2].call(this,L(this,this.D+this.K),b.call(this));P(this,c);this.A-=
        this.B.ba},function(a,b){var c=a[2].call(this,L(this,this.D+this.J),b.call(this));P(this,c);this.A-=this.B.ca},function(a,b){var c=a[2].call(this,M(this,this.L+this.K),b.call(this));P(this,c);this.A-=this.B.ca},function(a,b){var c=a[2].call(this,M(this,this.L+this.J),b.call(this));P(this,c);this.A-=this.B.ba},function(a,b){var c=a[2].call(this,L(this,this.K),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[2].call(this,L(this,this.J),b.call(this));P(this,c);this.A-=this.B.N},function(a,
        b){var c=a[2].call(this,L(this,R(this)),b.call(this));P(this,c);this.A-=this.B.da},function(a,b){var c=a[2].call(this,L(this,this.D),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[3].call(this,L(this,this.D+this.K),b.call(this));P(this,c);this.A-=this.B.ba},function(a,b){var c=a[3].call(this,L(this,this.D+this.J),b.call(this));P(this,c);this.A-=this.B.ca},function(a,b){var c=a[3].call(this,M(this,this.L+this.K),b.call(this));P(this,c);this.A-=this.B.ca},function(a,b){var c=a[3].call(this,
        M(this,this.L+this.J),b.call(this));P(this,c);this.A-=this.B.ba},function(a,b){var c=a[3].call(this,L(this,this.K),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[3].call(this,L(this,this.J),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[3].call(this,L(this,R(this)),b.call(this));P(this,c);this.A-=this.B.da},function(a,b){var c=a[3].call(this,L(this,this.D),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[4].call(this,L(this,this.D+this.K),b.call(this));
        P(this,c);this.A-=this.B.ba},function(a,b){var c=a[4].call(this,L(this,this.D+this.J),b.call(this));P(this,c);this.A-=this.B.ca},function(a,b){var c=a[4].call(this,M(this,this.L+this.K),b.call(this));P(this,c);this.A-=this.B.ca},function(a,b){var c=a[4].call(this,M(this,this.L+this.J),b.call(this));P(this,c);this.A-=this.B.ba},function(a,b){var c=a[4].call(this,L(this,this.K),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[4].call(this,L(this,this.J),b.call(this));P(this,c);this.A-=
        this.B.N},function(a,b){var c=a[4].call(this,L(this,R(this)),b.call(this));P(this,c);this.A-=this.B.da},function(a,b){var c=a[4].call(this,L(this,this.D),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[5].call(this,L(this,this.D+this.K),b.call(this));P(this,c);this.A-=this.B.ba},function(a,b){var c=a[5].call(this,L(this,this.D+this.J),b.call(this));P(this,c);this.A-=this.B.ca},function(a,b){var c=a[5].call(this,M(this,this.L+this.K),b.call(this));P(this,c);this.A-=this.B.ca},function(a,
        b){var c=a[5].call(this,M(this,this.L+this.J),b.call(this));P(this,c);this.A-=this.B.ba},function(a,b){var c=a[5].call(this,L(this,this.K),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[5].call(this,L(this,this.J),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[5].call(this,L(this,R(this)),b.call(this));P(this,c);this.A-=this.B.da},function(a,b){var c=a[5].call(this,L(this,this.D),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[6].call(this,L(this,
        this.D+this.K),b.call(this));P(this,c);this.A-=this.B.ba},function(a,b){var c=a[6].call(this,L(this,this.D+this.J),b.call(this));P(this,c);this.A-=this.B.ca},function(a,b){var c=a[6].call(this,M(this,this.L+this.K),b.call(this));P(this,c);this.A-=this.B.ca},function(a,b){var c=a[6].call(this,M(this,this.L+this.J),b.call(this));P(this,c);this.A-=this.B.ba},function(a,b){var c=a[6].call(this,L(this,this.K),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[6].call(this,L(this,this.J),b.call(this));
        P(this,c);this.A-=this.B.N},function(a,b){var c=a[6].call(this,L(this,R(this)),b.call(this));P(this,c);this.A-=this.B.da},function(a,b){var c=a[6].call(this,L(this,this.D),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[7].call(this,L(this,this.D+this.K),b.call(this));P(this,c);this.A-=this.B.ba},function(a,b){var c=a[7].call(this,L(this,this.D+this.J),b.call(this));P(this,c);this.A-=this.B.ca},function(a,b){var c=a[7].call(this,M(this,this.L+this.K),b.call(this));P(this,c);this.A-=
        this.B.ca},function(a,b){var c=a[7].call(this,M(this,this.L+this.J),b.call(this));P(this,c);this.A-=this.B.ba},function(a,b){var c=a[7].call(this,L(this,this.K),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[7].call(this,L(this,this.J),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[7].call(this,L(this,R(this)),b.call(this));P(this,c);this.A-=this.B.da},function(a,b){var c=a[7].call(this,L(this,this.D),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=
        a[0].call(this,L(this,this.D+this.K+this.M()),b.call(this));P(this,c);this.A-=this.B.P},function(a,b){var c=a[0].call(this,L(this,this.D+this.J+this.M()),b.call(this));P(this,c);this.A-=this.B.Q},function(a,b){var c=a[0].call(this,M(this,this.L+this.K+this.M()),b.call(this));P(this,c);this.A-=this.B.Q},function(a,b){var c=a[0].call(this,M(this,this.L+this.J+this.M()),b.call(this));P(this,c);this.A-=this.B.P},function(a,b){var c=a[0].call(this,L(this,this.K+this.M()),b.call(this));P(this,c);this.A-=
        this.B.I},function(a,b){var c=a[0].call(this,L(this,this.J+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,M(this,this.L+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,L(this,this.D+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,L(this,this.D+this.K+this.M()),b.call(this));P(this,c);this.A-=this.B.P},function(a,b){var c=a[1].call(this,L(this,this.D+this.J+this.M()),b.call(this));
        P(this,c);this.A-=this.B.Q},function(a,b){var c=a[1].call(this,M(this,this.L+this.K+this.M()),b.call(this));P(this,c);this.A-=this.B.Q},function(a,b){var c=a[1].call(this,M(this,this.L+this.J+this.M()),b.call(this));P(this,c);this.A-=this.B.P},function(a,b){var c=a[1].call(this,L(this,this.K+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,L(this,this.J+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,M(this,this.L+this.M()),
        b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,L(this,this.D+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,L(this,this.D+this.K+this.M()),b.call(this));P(this,c);this.A-=this.B.P},function(a,b){var c=a[2].call(this,L(this,this.D+this.J+this.M()),b.call(this));P(this,c);this.A-=this.B.Q},function(a,b){var c=a[2].call(this,M(this,this.L+this.K+this.M()),b.call(this));P(this,c);this.A-=this.B.Q},function(a,b){var c=a[2].call(this,
        M(this,this.L+this.J+this.M()),b.call(this));P(this,c);this.A-=this.B.P},function(a,b){var c=a[2].call(this,L(this,this.K+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,L(this,this.J+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,M(this,this.L+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,L(this,this.D+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,
        L(this,this.D+this.K+this.M()),b.call(this));P(this,c);this.A-=this.B.P},function(a,b){var c=a[3].call(this,L(this,this.D+this.J+this.M()),b.call(this));P(this,c);this.A-=this.B.Q},function(a,b){var c=a[3].call(this,M(this,this.L+this.K+this.M()),b.call(this));P(this,c);this.A-=this.B.Q},function(a,b){var c=a[3].call(this,M(this,this.L+this.J+this.M()),b.call(this));P(this,c);this.A-=this.B.P},function(a,b){var c=a[3].call(this,L(this,this.K+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,
        b){var c=a[3].call(this,L(this,this.J+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,M(this,this.L+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,L(this,this.D+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,L(this,this.D+this.K+this.M()),b.call(this));P(this,c);this.A-=this.B.P},function(a,b){var c=a[4].call(this,L(this,this.D+this.J+this.M()),b.call(this));P(this,c);this.A-=this.B.Q},
        function(a,b){var c=a[4].call(this,M(this,this.L+this.K+this.M()),b.call(this));P(this,c);this.A-=this.B.Q},function(a,b){var c=a[4].call(this,M(this,this.L+this.J+this.M()),b.call(this));P(this,c);this.A-=this.B.P},function(a,b){var c=a[4].call(this,L(this,this.K+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,L(this,this.J+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,M(this,this.L+this.M()),b.call(this));P(this,c);
        this.A-=this.B.I},function(a,b){var c=a[4].call(this,L(this,this.D+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,L(this,this.D+this.K+this.M()),b.call(this));P(this,c);this.A-=this.B.P},function(a,b){var c=a[5].call(this,L(this,this.D+this.J+this.M()),b.call(this));P(this,c);this.A-=this.B.Q},function(a,b){var c=a[5].call(this,M(this,this.L+this.K+this.M()),b.call(this));P(this,c);this.A-=this.B.Q},function(a,b){var c=a[5].call(this,M(this,this.L+this.J+this.M()),
        b.call(this));P(this,c);this.A-=this.B.P},function(a,b){var c=a[5].call(this,L(this,this.K+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,L(this,this.J+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,M(this,this.L+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,L(this,this.D+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,L(this,this.D+this.K+
        this.M()),b.call(this));P(this,c);this.A-=this.B.P},function(a,b){var c=a[6].call(this,L(this,this.D+this.J+this.M()),b.call(this));P(this,c);this.A-=this.B.Q},function(a,b){var c=a[6].call(this,M(this,this.L+this.K+this.M()),b.call(this));P(this,c);this.A-=this.B.Q},function(a,b){var c=a[6].call(this,M(this,this.L+this.J+this.M()),b.call(this));P(this,c);this.A-=this.B.P},function(a,b){var c=a[6].call(this,L(this,this.K+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,
        L(this,this.J+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,M(this,this.L+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,L(this,this.D+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,L(this,this.D+this.K+this.M()),b.call(this));P(this,c);this.A-=this.B.P},function(a,b){var c=a[7].call(this,L(this,this.D+this.J+this.M()),b.call(this));P(this,c);this.A-=this.B.Q},function(a,b){var c=
        a[7].call(this,M(this,this.L+this.K+this.M()),b.call(this));P(this,c);this.A-=this.B.Q},function(a,b){var c=a[7].call(this,M(this,this.L+this.J+this.M()),b.call(this));P(this,c);this.A-=this.B.P},function(a,b){var c=a[7].call(this,L(this,this.K+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,L(this,this.J+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,M(this,this.L+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,
        b){var c=a[7].call(this,L(this,this.D+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,L(this,this.D+this.K+R(this)),b.call(this));P(this,c);this.A-=this.B.P},function(a,b){var c=a[0].call(this,L(this,this.D+this.J+R(this)),b.call(this));P(this,c);this.A-=this.B.Q},function(a,b){var c=a[0].call(this,M(this,this.L+this.K+R(this)),b.call(this));P(this,c);this.A-=this.B.Q},function(a,b){var c=a[0].call(this,M(this,this.L+this.J+R(this)),b.call(this));P(this,c);this.A-=
        this.B.P},function(a,b){var c=a[0].call(this,L(this,this.K+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,L(this,this.J+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,M(this,this.L+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,L(this,this.D+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,L(this,this.D+this.K+R(this)),b.call(this));P(this,c);this.A-=
        this.B.P},function(a,b){var c=a[1].call(this,L(this,this.D+this.J+R(this)),b.call(this));P(this,c);this.A-=this.B.Q},function(a,b){var c=a[1].call(this,M(this,this.L+this.K+R(this)),b.call(this));P(this,c);this.A-=this.B.Q},function(a,b){var c=a[1].call(this,M(this,this.L+this.J+R(this)),b.call(this));P(this,c);this.A-=this.B.P},function(a,b){var c=a[1].call(this,L(this,this.K+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,L(this,this.J+R(this)),b.call(this));
        P(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,M(this,this.L+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,L(this,this.D+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,L(this,this.D+this.K+R(this)),b.call(this));P(this,c);this.A-=this.B.P},function(a,b){var c=a[2].call(this,L(this,this.D+this.J+R(this)),b.call(this));P(this,c);this.A-=this.B.Q},function(a,b){var c=a[2].call(this,M(this,this.L+this.K+R(this)),
        b.call(this));P(this,c);this.A-=this.B.Q},function(a,b){var c=a[2].call(this,M(this,this.L+this.J+R(this)),b.call(this));P(this,c);this.A-=this.B.P},function(a,b){var c=a[2].call(this,L(this,this.K+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,L(this,this.J+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,M(this,this.L+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,L(this,this.D+R(this)),
        b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,L(this,this.D+this.K+R(this)),b.call(this));P(this,c);this.A-=this.B.P},function(a,b){var c=a[3].call(this,L(this,this.D+this.J+R(this)),b.call(this));P(this,c);this.A-=this.B.Q},function(a,b){var c=a[3].call(this,M(this,this.L+this.K+R(this)),b.call(this));P(this,c);this.A-=this.B.Q},function(a,b){var c=a[3].call(this,M(this,this.L+this.J+R(this)),b.call(this));P(this,c);this.A-=this.B.P},function(a,b){var c=a[3].call(this,
        L(this,this.K+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,L(this,this.J+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,M(this,this.L+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,L(this,this.D+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,L(this,this.D+this.K+R(this)),b.call(this));P(this,c);this.A-=this.B.P},function(a,b){var c=a[4].call(this,
        L(this,this.D+this.J+R(this)),b.call(this));P(this,c);this.A-=this.B.Q},function(a,b){var c=a[4].call(this,M(this,this.L+this.K+R(this)),b.call(this));P(this,c);this.A-=this.B.Q},function(a,b){var c=a[4].call(this,M(this,this.L+this.J+R(this)),b.call(this));P(this,c);this.A-=this.B.P},function(a,b){var c=a[4].call(this,L(this,this.K+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,L(this,this.J+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=
        a[4].call(this,M(this,this.L+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,L(this,this.D+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,L(this,this.D+this.K+R(this)),b.call(this));P(this,c);this.A-=this.B.P},function(a,b){var c=a[5].call(this,L(this,this.D+this.J+R(this)),b.call(this));P(this,c);this.A-=this.B.Q},function(a,b){var c=a[5].call(this,M(this,this.L+this.K+R(this)),b.call(this));P(this,c);this.A-=this.B.Q},
        function(a,b){var c=a[5].call(this,M(this,this.L+this.J+R(this)),b.call(this));P(this,c);this.A-=this.B.P},function(a,b){var c=a[5].call(this,L(this,this.K+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,L(this,this.J+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,M(this,this.L+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,L(this,this.D+R(this)),b.call(this));P(this,c);this.A-=this.B.I},
        function(a,b){var c=a[6].call(this,L(this,this.D+this.K+R(this)),b.call(this));P(this,c);this.A-=this.B.P},function(a,b){var c=a[6].call(this,L(this,this.D+this.J+R(this)),b.call(this));P(this,c);this.A-=this.B.Q},function(a,b){var c=a[6].call(this,M(this,this.L+this.K+R(this)),b.call(this));P(this,c);this.A-=this.B.Q},function(a,b){var c=a[6].call(this,M(this,this.L+this.J+R(this)),b.call(this));P(this,c);this.A-=this.B.P},function(a,b){var c=a[6].call(this,L(this,this.K+R(this)),b.call(this));P(this,
        c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,L(this,this.J+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,M(this,this.L+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,L(this,this.D+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,L(this,this.D+this.K+R(this)),b.call(this));P(this,c);this.A-=this.B.P},function(a,b){var c=a[7].call(this,L(this,this.D+this.J+R(this)),b.call(this));
        P(this,c);this.A-=this.B.Q},function(a,b){var c=a[7].call(this,M(this,this.L+this.K+R(this)),b.call(this));P(this,c);this.A-=this.B.Q},function(a,b){var c=a[7].call(this,M(this,this.L+this.J+R(this)),b.call(this));P(this,c);this.A-=this.B.P},function(a,b){var c=a[7].call(this,L(this,this.K+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,L(this,this.J+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,M(this,this.L+R(this)),b.call(this));
        P(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,L(this,this.D+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,this.F&255,b.call(this));this.F=this.F&-256|c},function(a,b){var c=a[0].call(this,this.G&255,b.call(this));this.G=this.G&-256|c},function(a,b){var c=a[0].call(this,this.H&255,b.call(this));this.H=this.H&-256|c},function(a,b){var c=a[0].call(this,this.D&255,b.call(this));this.D=this.D&-256|c},function(a,b){var c=a[0].call(this,this.F>>8&
        255,b.call(this));this.F=this.F&-65281|c<<8},function(a,b){var c=a[0].call(this,this.G>>8&255,b.call(this));this.G=this.G&-65281|c<<8},function(a,b){var c=a[0].call(this,this.H>>8&255,b.call(this));this.H=this.H&-65281|c<<8},function(a,b){var c=a[0].call(this,this.D>>8&255,b.call(this));this.D=this.D&-65281|c<<8},function(a,b){var c=a[1].call(this,this.F&255,b.call(this));this.F=this.F&-256|c},function(a,b){var c=a[1].call(this,this.G&255,b.call(this));this.G=this.G&-256|c},function(a,b){var c=a[1].call(this,
        this.H&255,b.call(this));this.H=this.H&-256|c},function(a,b){var c=a[1].call(this,this.D&255,b.call(this));this.D=this.D&-256|c},function(a,b){var c=a[1].call(this,this.F>>8&255,b.call(this));this.F=this.F&-65281|c<<8},function(a,b){var c=a[1].call(this,this.G>>8&255,b.call(this));this.G=this.G&-65281|c<<8},function(a,b){var c=a[1].call(this,this.H>>8&255,b.call(this));this.H=this.H&-65281|c<<8},function(a,b){var c=a[1].call(this,this.D>>8&255,b.call(this));this.D=this.D&-65281|c<<8},function(a,b){var c=
        a[2].call(this,this.F&255,b.call(this));this.F=this.F&-256|c},function(a,b){var c=a[2].call(this,this.G&255,b.call(this));this.G=this.G&-256|c},function(a,b){var c=a[2].call(this,this.H&255,b.call(this));this.H=this.H&-256|c},function(a,b){var c=a[2].call(this,this.D&255,b.call(this));this.D=this.D&-256|c},function(a,b){var c=a[2].call(this,this.F>>8&255,b.call(this));this.F=this.F&-65281|c<<8},function(a,b){var c=a[2].call(this,this.G>>8&255,b.call(this));this.G=this.G&-65281|c<<8},function(a,b){var c=
        a[2].call(this,this.H>>8&255,b.call(this));this.H=this.H&-65281|c<<8},function(a,b){var c=a[2].call(this,this.D>>8&255,b.call(this));this.D=this.D&-65281|c<<8},function(a,b){var c=a[3].call(this,this.F&255,b.call(this));this.F=this.F&-256|c},function(a,b){var c=a[3].call(this,this.G&255,b.call(this));this.G=this.G&-256|c},function(a,b){var c=a[3].call(this,this.H&255,b.call(this));this.H=this.H&-256|c},function(a,b){var c=a[3].call(this,this.D&255,b.call(this));this.D=this.D&-256|c},function(a,b){var c=
        a[3].call(this,this.F>>8&255,b.call(this));this.F=this.F&-65281|c<<8},function(a,b){var c=a[3].call(this,this.G>>8&255,b.call(this));this.G=this.G&-65281|c<<8},function(a,b){var c=a[3].call(this,this.H>>8&255,b.call(this));this.H=this.H&-65281|c<<8},function(a,b){var c=a[3].call(this,this.D>>8&255,b.call(this));this.D=this.D&-65281|c<<8},function(a,b){var c=a[4].call(this,this.F&255,b.call(this));this.F=this.F&-256|c},function(a,b){var c=a[4].call(this,this.G&255,b.call(this));this.G=this.G&-256|
        c},function(a,b){var c=a[4].call(this,this.H&255,b.call(this));this.H=this.H&-256|c},function(a,b){var c=a[4].call(this,this.D&255,b.call(this));this.D=this.D&-256|c},function(a,b){var c=a[4].call(this,this.F>>8&255,b.call(this));this.F=this.F&-65281|c<<8},function(a,b){var c=a[4].call(this,this.G>>8&255,b.call(this));this.G=this.G&-65281|c<<8},function(a,b){var c=a[4].call(this,this.H>>8&255,b.call(this));this.H=this.H&-65281|c<<8},function(a,b){var c=a[4].call(this,this.D>>8&255,b.call(this));this.D=
        this.D&-65281|c<<8},function(a,b){var c=a[5].call(this,this.F&255,b.call(this));this.F=this.F&-256|c},function(a,b){var c=a[5].call(this,this.G&255,b.call(this));this.G=this.G&-256|c},function(a,b){var c=a[5].call(this,this.H&255,b.call(this));this.H=this.H&-256|c},function(a,b){var c=a[5].call(this,this.D&255,b.call(this));this.D=this.D&-256|c},function(a,b){var c=a[5].call(this,this.F>>8&255,b.call(this));this.F=this.F&-65281|c<<8},function(a,b){var c=a[5].call(this,this.G>>8&255,b.call(this));
        this.G=this.G&-65281|c<<8},function(a,b){var c=a[5].call(this,this.H>>8&255,b.call(this));this.H=this.H&-65281|c<<8},function(a,b){var c=a[5].call(this,this.D>>8&255,b.call(this));this.D=this.D&-65281|c<<8},function(a,b){var c=a[6].call(this,this.F&255,b.call(this));this.F=this.F&-256|c},function(a,b){var c=a[6].call(this,this.G&255,b.call(this));this.G=this.G&-256|c},function(a,b){var c=a[6].call(this,this.H&255,b.call(this));this.H=this.H&-256|c},function(a,b){var c=a[6].call(this,this.D&255,b.call(this));
        this.D=this.D&-256|c},function(a,b){var c=a[6].call(this,this.F>>8&255,b.call(this));this.F=this.F&-65281|c<<8},function(a,b){var c=a[6].call(this,this.G>>8&255,b.call(this));this.G=this.G&-65281|c<<8},function(a,b){var c=a[6].call(this,this.H>>8&255,b.call(this));this.H=this.H&-65281|c<<8},function(a,b){var c=a[6].call(this,this.D>>8&255,b.call(this));this.D=this.D&-65281|c<<8},function(a,b){var c=a[7].call(this,this.F&255,b.call(this));this.F=this.F&-256|c},function(a,b){var c=a[7].call(this,this.G&
        255,b.call(this));this.G=this.G&-256|c},function(a,b){var c=a[7].call(this,this.H&255,b.call(this));this.H=this.H&-256|c},function(a,b){var c=a[7].call(this,this.D&255,b.call(this));this.D=this.D&-256|c},function(a,b){var c=a[7].call(this,this.F>>8&255,b.call(this));this.F=this.F&-65281|c<<8},function(a,b){var c=a[7].call(this,this.G>>8&255,b.call(this));this.G=this.G&-65281|c<<8},function(a,b){var c=a[7].call(this,this.H>>8&255,b.call(this));this.H=this.H&-65281|c<<8},function(a,b){var c=a[7].call(this,
        this.D>>8&255,b.call(this));this.D=this.D&-65281|c<<8}],z=[function(a){a=a.call(this,this.F&this.C,G(this,this.D+this.K));this.F=this.F&~this.C|a;this.A-=this.B.ba},function(a){a=a.call(this,this.F&this.C,G(this,this.D+this.J));this.F=this.F&~this.C|a;this.A-=this.B.ca},function(a){a=a.call(this,this.F&this.C,H(this,this.L+this.K));this.F=this.F&~this.C|a;this.A-=this.B.ca},function(a){a=a.call(this,this.F&this.C,H(this,this.L+this.J));this.F=this.F&~this.C|a;this.A-=this.B.ba},function(a){a=a.call(this,
        this.F&this.C,G(this,this.K));this.F=this.F&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.F&this.C,G(this,this.J));this.F=this.F&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.F&this.C,G(this,R(this)));this.F=this.F&~this.C|a;this.A-=this.B.da},function(a){a=a.call(this,this.F&this.C,G(this,this.D));this.F=this.F&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.G&this.C,G(this,this.D+this.K));this.G=this.G&~this.C|a;this.A-=this.B.ba},function(a){a=a.call(this,this.G&
        this.C,G(this,this.D+this.J));this.G=this.G&~this.C|a;this.A-=this.B.ca},function(a){a=a.call(this,this.G&this.C,H(this,this.L+this.K));this.G=this.G&~this.C|a;this.A-=this.B.ca},function(a){a=a.call(this,this.G&this.C,H(this,this.L+this.J));this.G=this.G&~this.C|a;this.A-=this.B.ba},function(a){a=a.call(this,this.G&this.C,G(this,this.K));this.G=this.G&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.G&this.C,G(this,this.J));this.G=this.G&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,
        this.G&this.C,G(this,R(this)));this.G=this.G&~this.C|a;this.A-=this.B.da},function(a){a=a.call(this,this.G&this.C,G(this,this.D));this.G=this.G&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.H&this.C,G(this,this.D+this.K));this.H=this.H&~this.C|a;this.A-=this.B.ba},function(a){a=a.call(this,this.H&this.C,G(this,this.D+this.J));this.H=this.H&~this.C|a;this.A-=this.B.ca},function(a){a=a.call(this,this.H&this.C,H(this,this.L+this.K));this.H=this.H&~this.C|a;this.A-=this.B.ca},function(a){a=
        a.call(this,this.H&this.C,H(this,this.L+this.J));this.H=this.H&~this.C|a;this.A-=this.B.ba},function(a){a=a.call(this,this.H&this.C,G(this,this.K));this.H=this.H&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.H&this.C,G(this,this.J));this.H=this.H&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.H&this.C,G(this,R(this)));this.H=this.H&~this.C|a;this.A-=this.B.da},function(a){a=a.call(this,this.H&this.C,G(this,this.D));this.H=this.H&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,
        this.D&this.C,G(this,this.D+this.K));this.D=this.D&~this.C|a;this.A-=this.B.ba},function(a){a=a.call(this,this.D&this.C,G(this,this.D+this.J));this.D=this.D&~this.C|a;this.A-=this.B.ca},function(a){a=a.call(this,this.D&this.C,H(this,this.L+this.K));this.D=this.D&~this.C|a;this.A-=this.B.ca},function(a){a=a.call(this,this.D&this.C,H(this,this.L+this.J));this.D=this.D&~this.C|a;this.A-=this.B.ba},function(a){a=a.call(this,this.D&this.C,G(this,this.K));this.D=this.D&~this.C|a;this.A-=this.B.N},function(a){a=
        a.call(this,this.D&this.C,G(this,this.J));this.D=this.D&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.D&this.C,G(this,R(this)));this.D=this.D&~this.C|a;this.A-=this.B.da},function(a){a=a.call(this,this.D&this.C,G(this,this.D));this.D=this.D&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,r(this)&this.C,G(this,this.D+this.K));u(this,r(this)&~this.C|a);this.A-=this.B.ba},function(a){a=a.call(this,r(this)&this.C,G(this,this.D+this.J));u(this,r(this)&~this.C|a);this.A-=this.B.ca},function(a){a=
        a.call(this,r(this)&this.C,H(this,this.L+this.K));u(this,r(this)&~this.C|a);this.A-=this.B.ca},function(a){a=a.call(this,r(this)&this.C,H(this,this.L+this.J));u(this,r(this)&~this.C|a);this.A-=this.B.ba},function(a){a=a.call(this,r(this)&this.C,G(this,this.K));u(this,r(this)&~this.C|a);this.A-=this.B.N},function(a){a=a.call(this,r(this)&this.C,G(this,this.J));u(this,r(this)&~this.C|a);this.A-=this.B.N},function(a){a=a.call(this,r(this)&this.C,G(this,R(this)));u(this,r(this)&~this.C|a);this.A-=this.B.da},
        function(a){a=a.call(this,r(this)&this.C,G(this,this.D));u(this,r(this)&~this.C|a);this.A-=this.B.N},function(a){a=a.call(this,this.L&this.C,G(this,this.D+this.K));this.L=this.L&~this.C|a;this.A-=this.B.ba},function(a){a=a.call(this,this.L&this.C,G(this,this.D+this.J));this.L=this.L&~this.C|a;this.A-=this.B.ca},function(a){a=a.call(this,this.L&this.C,H(this,this.L+this.K));this.L=this.L&~this.C|a;this.A-=this.B.ca},function(a){a=a.call(this,this.L&this.C,H(this,this.L+this.J));this.L=this.L&~this.C|
        a;this.A-=this.B.ba},function(a){a=a.call(this,this.L&this.C,G(this,this.K));this.L=this.L&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.L&this.C,G(this,this.J));this.L=this.L&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.L&this.C,G(this,R(this)));this.L=this.L&~this.C|a;this.A-=this.B.da},function(a){a=a.call(this,this.L&this.C,G(this,this.D));this.L=this.L&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.K&this.C,G(this,this.D+this.K));this.K=this.K&~this.C|a;
        this.A-=this.B.ba},function(a){a=a.call(this,this.K&this.C,G(this,this.D+this.J));this.K=this.K&~this.C|a;this.A-=this.B.ca},function(a){a=a.call(this,this.K&this.C,H(this,this.L+this.K));this.K=this.K&~this.C|a;this.A-=this.B.ca},function(a){a=a.call(this,this.K&this.C,H(this,this.L+this.J));this.K=this.K&~this.C|a;this.A-=this.B.ba},function(a){a=a.call(this,this.K&this.C,G(this,this.K));this.K=this.K&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.K&this.C,G(this,this.J));this.K=this.K&
        ~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.K&this.C,G(this,R(this)));this.K=this.K&~this.C|a;this.A-=this.B.da},function(a){a=a.call(this,this.K&this.C,G(this,this.D));this.K=this.K&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.J&this.C,G(this,this.D+this.K));this.J=this.J&~this.C|a;this.A-=this.B.ba},function(a){a=a.call(this,this.J&this.C,G(this,this.D+this.J));this.J=this.J&~this.C|a;this.A-=this.B.ca},function(a){a=a.call(this,this.J&this.C,H(this,this.L+this.K));
        this.J=this.J&~this.C|a;this.A-=this.B.ca},function(a){a=a.call(this,this.J&this.C,H(this,this.L+this.J));this.J=this.J&~this.C|a;this.A-=this.B.ba},function(a){a=a.call(this,this.J&this.C,G(this,this.K));this.J=this.J&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.J&this.C,G(this,this.J));this.J=this.J&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.J&this.C,G(this,R(this)));this.J=this.J&~this.C|a;this.A-=this.B.da},function(a){a=a.call(this,this.J&this.C,G(this,this.D));
        this.J=this.J&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.F&this.C,G(this,this.D+this.K+this.M()));this.F=this.F&~this.C|a;this.A-=this.B.P},function(a){a=a.call(this,this.F&this.C,G(this,this.D+this.J+this.M()));this.F=this.F&~this.C|a;this.A-=this.B.Q},function(a){a=a.call(this,this.F&this.C,H(this,this.L+this.K+this.M()));this.F=this.F&~this.C|a;this.A-=this.B.Q},function(a){a=a.call(this,this.F&this.C,H(this,this.L+this.J+this.M()));this.F=this.F&~this.C|a;this.A-=this.B.P},function(a){a=
        a.call(this,this.F&this.C,G(this,this.K+this.M()));this.F=this.F&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&this.C,G(this,this.J+this.M()));this.F=this.F&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&this.C,H(this,this.L+this.M()));this.F=this.F&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&this.C,G(this,this.D+this.M()));this.F=this.F&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&this.C,G(this,this.D+this.K+this.M()));this.G=this.G&~this.C|
        a;this.A-=this.B.P},function(a){a=a.call(this,this.G&this.C,G(this,this.D+this.J+this.M()));this.G=this.G&~this.C|a;this.A-=this.B.Q},function(a){a=a.call(this,this.G&this.C,H(this,this.L+this.K+this.M()));this.G=this.G&~this.C|a;this.A-=this.B.Q},function(a){a=a.call(this,this.G&this.C,H(this,this.L+this.J+this.M()));this.G=this.G&~this.C|a;this.A-=this.B.P},function(a){a=a.call(this,this.G&this.C,G(this,this.K+this.M()));this.G=this.G&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&
        this.C,G(this,this.J+this.M()));this.G=this.G&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&this.C,H(this,this.L+this.M()));this.G=this.G&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&this.C,G(this,this.D+this.M()));this.G=this.G&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&this.C,G(this,this.D+this.K+this.M()));this.H=this.H&~this.C|a;this.A-=this.B.P},function(a){a=a.call(this,this.H&this.C,G(this,this.D+this.J+this.M()));this.H=this.H&~this.C|a;this.A-=
        this.B.Q},function(a){a=a.call(this,this.H&this.C,H(this,this.L+this.K+this.M()));this.H=this.H&~this.C|a;this.A-=this.B.Q},function(a){a=a.call(this,this.H&this.C,H(this,this.L+this.J+this.M()));this.H=this.H&~this.C|a;this.A-=this.B.P},function(a){a=a.call(this,this.H&this.C,G(this,this.K+this.M()));this.H=this.H&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&this.C,G(this,this.J+this.M()));this.H=this.H&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&this.C,H(this,this.L+
        this.M()));this.H=this.H&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&this.C,G(this,this.D+this.M()));this.H=this.H&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&this.C,G(this,this.D+this.K+this.M()));this.D=this.D&~this.C|a;this.A-=this.B.P},function(a){a=a.call(this,this.D&this.C,G(this,this.D+this.J+this.M()));this.D=this.D&~this.C|a;this.A-=this.B.Q},function(a){a=a.call(this,this.D&this.C,H(this,this.L+this.K+this.M()));this.D=this.D&~this.C|a;this.A-=this.B.Q},
        function(a){a=a.call(this,this.D&this.C,H(this,this.L+this.J+this.M()));this.D=this.D&~this.C|a;this.A-=this.B.P},function(a){a=a.call(this,this.D&this.C,G(this,this.K+this.M()));this.D=this.D&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&this.C,G(this,this.J+this.M()));this.D=this.D&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&this.C,H(this,this.L+this.M()));this.D=this.D&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&this.C,G(this,this.D+this.M()));this.D=
        this.D&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,r(this)&this.C,G(this,this.D+this.K+this.M()));u(this,r(this)&~this.C|a);this.A-=this.B.P},function(a){a=a.call(this,r(this)&this.C,G(this,this.D+this.J+this.M()));u(this,r(this)&~this.C|a);this.A-=this.B.Q},function(a){a=a.call(this,r(this)&this.C,H(this,this.L+this.K+this.M()));u(this,r(this)&~this.C|a);this.A-=this.B.Q},function(a){a=a.call(this,r(this)&this.C,H(this,this.L+this.J+this.M()));u(this,r(this)&~this.C|a);this.A-=this.B.P},
        function(a){a=a.call(this,r(this)&this.C,G(this,this.K+this.M()));u(this,r(this)&~this.C|a);this.A-=this.B.I},function(a){a=a.call(this,r(this)&this.C,G(this,this.J+this.M()));u(this,r(this)&~this.C|a);this.A-=this.B.I},function(a){a=a.call(this,r(this)&this.C,H(this,this.L+this.M()));u(this,r(this)&~this.C|a);this.A-=this.B.I},function(a){a=a.call(this,r(this)&this.C,G(this,this.D+this.M()));u(this,r(this)&~this.C|a);this.A-=this.B.I},function(a){a=a.call(this,this.L&this.C,G(this,this.D+this.K+
        this.M()));this.L=this.L&~this.C|a;this.A-=this.B.P},function(a){a=a.call(this,this.L&this.C,G(this,this.D+this.J+this.M()));this.L=this.L&~this.C|a;this.A-=this.B.Q},function(a){a=a.call(this,this.L&this.C,H(this,this.L+this.K+this.M()));this.L=this.L&~this.C|a;this.A-=this.B.Q},function(a){a=a.call(this,this.L&this.C,H(this,this.L+this.J+this.M()));this.L=this.L&~this.C|a;this.A-=this.B.P},function(a){a=a.call(this,this.L&this.C,G(this,this.K+this.M()));this.L=this.L&~this.C|a;this.A-=this.B.I},
        function(a){a=a.call(this,this.L&this.C,G(this,this.J+this.M()));this.L=this.L&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.L&this.C,H(this,this.L+this.M()));this.L=this.L&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.L&this.C,G(this,this.D+this.M()));this.L=this.L&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.K&this.C,G(this,this.D+this.K+this.M()));this.K=this.K&~this.C|a;this.A-=this.B.P},function(a){a=a.call(this,this.K&this.C,G(this,this.D+this.J+this.M()));
        this.K=this.K&~this.C|a;this.A-=this.B.Q},function(a){a=a.call(this,this.K&this.C,H(this,this.L+this.K+this.M()));this.K=this.K&~this.C|a;this.A-=this.B.Q},function(a){a=a.call(this,this.K&this.C,H(this,this.L+this.J+this.M()));this.K=this.K&~this.C|a;this.A-=this.B.P},function(a){a=a.call(this,this.K&this.C,G(this,this.K+this.M()));this.K=this.K&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.K&this.C,G(this,this.J+this.M()));this.K=this.K&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,
        this.K&this.C,H(this,this.L+this.M()));this.K=this.K&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.K&this.C,G(this,this.D+this.M()));this.K=this.K&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.J&this.C,G(this,this.D+this.K+this.M()));this.J=this.J&~this.C|a;this.A-=this.B.P},function(a){a=a.call(this,this.J&this.C,G(this,this.D+this.J+this.M()));this.J=this.J&~this.C|a;this.A-=this.B.Q},function(a){a=a.call(this,this.J&this.C,H(this,this.L+this.K+this.M()));this.J=this.J&
        ~this.C|a;this.A-=this.B.Q},function(a){a=a.call(this,this.J&this.C,H(this,this.L+this.J+this.M()));this.J=this.J&~this.C|a;this.A-=this.B.P},function(a){a=a.call(this,this.J&this.C,G(this,this.K+this.M()));this.J=this.J&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.J&this.C,G(this,this.J+this.M()));this.J=this.J&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.J&this.C,H(this,this.L+this.M()));this.J=this.J&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.J&this.C,
        G(this,this.D+this.M()));this.J=this.J&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&this.C,G(this,this.D+this.K+R(this)));this.F=this.F&~this.C|a;this.A-=this.B.P},function(a){a=a.call(this,this.F&this.C,G(this,this.D+this.J+R(this)));this.F=this.F&~this.C|a;this.A-=this.B.Q},function(a){a=a.call(this,this.F&this.C,H(this,this.L+this.K+R(this)));this.F=this.F&~this.C|a;this.A-=this.B.Q},function(a){a=a.call(this,this.F&this.C,H(this,this.L+this.J+R(this)));this.F=this.F&~this.C|a;
        this.A-=this.B.P},function(a){a=a.call(this,this.F&this.C,G(this,this.K+R(this)));this.F=this.F&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&this.C,G(this,this.J+R(this)));this.F=this.F&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&this.C,H(this,this.L+R(this)));this.F=this.F&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&this.C,G(this,this.D+R(this)));this.F=this.F&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&this.C,G(this,this.D+this.K+
        R(this)));this.G=this.G&~this.C|a;this.A-=this.B.P},function(a){a=a.call(this,this.G&this.C,G(this,this.D+this.J+R(this)));this.G=this.G&~this.C|a;this.A-=this.B.Q},function(a){a=a.call(this,this.G&this.C,H(this,this.L+this.K+R(this)));this.G=this.G&~this.C|a;this.A-=this.B.Q},function(a){a=a.call(this,this.G&this.C,H(this,this.L+this.J+R(this)));this.G=this.G&~this.C|a;this.A-=this.B.P},function(a){a=a.call(this,this.G&this.C,G(this,this.K+R(this)));this.G=this.G&~this.C|a;this.A-=this.B.I},function(a){a=
        a.call(this,this.G&this.C,G(this,this.J+R(this)));this.G=this.G&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&this.C,H(this,this.L+R(this)));this.G=this.G&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&this.C,G(this,this.D+R(this)));this.G=this.G&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&this.C,G(this,this.D+this.K+R(this)));this.H=this.H&~this.C|a;this.A-=this.B.P},function(a){a=a.call(this,this.H&this.C,G(this,this.D+this.J+R(this)));this.H=this.H&
        ~this.C|a;this.A-=this.B.Q},function(a){a=a.call(this,this.H&this.C,H(this,this.L+this.K+R(this)));this.H=this.H&~this.C|a;this.A-=this.B.Q},function(a){a=a.call(this,this.H&this.C,H(this,this.L+this.J+R(this)));this.H=this.H&~this.C|a;this.A-=this.B.P},function(a){a=a.call(this,this.H&this.C,G(this,this.K+R(this)));this.H=this.H&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&this.C,G(this,this.J+R(this)));this.H=this.H&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&this.C,
        H(this,this.L+R(this)));this.H=this.H&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&this.C,G(this,this.D+R(this)));this.H=this.H&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&this.C,G(this,this.D+this.K+R(this)));this.D=this.D&~this.C|a;this.A-=this.B.P},function(a){a=a.call(this,this.D&this.C,G(this,this.D+this.J+R(this)));this.D=this.D&~this.C|a;this.A-=this.B.Q},function(a){a=a.call(this,this.D&this.C,H(this,this.L+this.K+R(this)));this.D=this.D&~this.C|a;this.A-=
        this.B.Q},function(a){a=a.call(this,this.D&this.C,H(this,this.L+this.J+R(this)));this.D=this.D&~this.C|a;this.A-=this.B.P},function(a){a=a.call(this,this.D&this.C,G(this,this.K+R(this)));this.D=this.D&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&this.C,G(this,this.J+R(this)));this.D=this.D&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&this.C,H(this,this.L+R(this)));this.D=this.D&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&this.C,G(this,this.D+R(this)));
        this.D=this.D&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,r(this)&this.C,G(this,this.D+this.K+R(this)));u(this,r(this)&~this.C|a);this.A-=this.B.P},function(a){a=a.call(this,r(this)&this.C,G(this,this.D+this.J+R(this)));u(this,r(this)&~this.C|a);this.A-=this.B.Q},function(a){a=a.call(this,r(this)&this.C,H(this,this.L+this.K+R(this)));u(this,r(this)&~this.C|a);this.A-=this.B.Q},function(a){a=a.call(this,r(this)&this.C,H(this,this.L+this.J+R(this)));u(this,r(this)&~this.C|a);this.A-=this.B.P},
        function(a){a=a.call(this,r(this)&this.C,G(this,this.K+R(this)));u(this,r(this)&~this.C|a);this.A-=this.B.I},function(a){a=a.call(this,r(this)&this.C,G(this,this.J+R(this)));u(this,r(this)&~this.C|a);this.A-=this.B.I},function(a){a=a.call(this,r(this)&this.C,H(this,this.L+R(this)));u(this,r(this)&~this.C|a);this.A-=this.B.I},function(a){a=a.call(this,r(this)&this.C,G(this,this.D+R(this)));u(this,r(this)&~this.C|a);this.A-=this.B.I},function(a){a=a.call(this,this.L&this.C,G(this,this.D+this.K+R(this)));
        this.L=this.L&~this.C|a;this.A-=this.B.P},function(a){a=a.call(this,this.L&this.C,G(this,this.D+this.J+R(this)));this.L=this.L&~this.C|a;this.A-=this.B.Q},function(a){a=a.call(this,this.L&this.C,H(this,this.L+this.K+R(this)));this.L=this.L&~this.C|a;this.A-=this.B.Q},function(a){a=a.call(this,this.L&this.C,H(this,this.L+this.J+R(this)));this.L=this.L&~this.C|a;this.A-=this.B.P},function(a){a=a.call(this,this.L&this.C,G(this,this.K+R(this)));this.L=this.L&~this.C|a;this.A-=this.B.I},function(a){a=
        a.call(this,this.L&this.C,G(this,this.J+R(this)));this.L=this.L&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.L&this.C,H(this,this.L+R(this)));this.L=this.L&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.L&this.C,G(this,this.D+R(this)));this.L=this.L&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.K&this.C,G(this,this.D+this.K+R(this)));this.K=this.K&~this.C|a;this.A-=this.B.P},function(a){a=a.call(this,this.K&this.C,G(this,this.D+this.J+R(this)));this.K=this.K&
        ~this.C|a;this.A-=this.B.Q},function(a){a=a.call(this,this.K&this.C,H(this,this.L+this.K+R(this)));this.K=this.K&~this.C|a;this.A-=this.B.Q},function(a){a=a.call(this,this.K&this.C,H(this,this.L+this.J+R(this)));this.K=this.K&~this.C|a;this.A-=this.B.P},function(a){a=a.call(this,this.K&this.C,G(this,this.K+R(this)));this.K=this.K&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.K&this.C,G(this,this.J+R(this)));this.K=this.K&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.K&this.C,
        H(this,this.L+R(this)));this.K=this.K&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.K&this.C,G(this,this.D+R(this)));this.K=this.K&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.J&this.C,G(this,this.D+this.K+R(this)));this.J=this.J&~this.C|a;this.A-=this.B.P},function(a){a=a.call(this,this.J&this.C,G(this,this.D+this.J+R(this)));this.J=this.J&~this.C|a;this.A-=this.B.Q},function(a){a=a.call(this,this.J&this.C,H(this,this.L+this.K+R(this)));this.J=this.J&~this.C|a;this.A-=
        this.B.Q},function(a){a=a.call(this,this.J&this.C,H(this,this.L+this.J+R(this)));this.J=this.J&~this.C|a;this.A-=this.B.P},function(a){a=a.call(this,this.J&this.C,G(this,this.K+R(this)));this.J=this.J&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.J&this.C,G(this,this.J+R(this)));this.J=this.J&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.J&this.C,H(this,this.L+R(this)));this.J=this.J&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.J&this.C,G(this,this.D+R(this)));
        this.J=this.J&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&this.C,this.F&this.C);this.F=this.F&~this.C|a},function(a){a=a.call(this,this.F&this.C,this.G&this.C);this.F=this.F&~this.C|a},function(a){a=a.call(this,this.F&this.C,this.H&this.C);this.F=this.F&~this.C|a},function(a){a=a.call(this,this.F&this.C,this.D&this.C);this.F=this.F&~this.C|a},function(a){a=a.call(this,this.F&this.C,r(this)&this.C);this.F=this.F&~this.C|a},function(a){a=a.call(this,this.F&this.C,this.L&this.C);this.F=
        this.F&~this.C|a},function(a){a=a.call(this,this.F&this.C,this.K&this.C);this.F=this.F&~this.C|a},function(a){a=a.call(this,this.F&this.C,this.J&this.C);this.F=this.F&~this.C|a},function(a){a=a.call(this,this.G&this.C,this.F&this.C);this.G=this.G&~this.C|a},function(a){a=a.call(this,this.G&this.C,this.G&this.C);this.G=this.G&~this.C|a},function(a){a=a.call(this,this.G&this.C,this.H&this.C);this.G=this.G&~this.C|a},function(a){a=a.call(this,this.G&this.C,this.D&this.C);this.G=this.G&~this.C|a},function(a){a=
        a.call(this,this.G&this.C,r(this)&this.C);this.G=this.G&~this.C|a},function(a){a=a.call(this,this.G&this.C,this.L&this.C);this.G=this.G&~this.C|a},function(a){a=a.call(this,this.G&this.C,this.K&this.C);this.G=this.G&~this.C|a},function(a){a=a.call(this,this.G&this.C,this.J&this.C);this.G=this.G&~this.C|a},function(a){a=a.call(this,this.H&this.C,this.F&this.C);this.H=this.H&~this.C|a},function(a){a=a.call(this,this.H&this.C,this.G&this.C);this.H=this.H&~this.C|a},function(a){a=a.call(this,this.H&this.C,
        this.H&this.C);this.H=this.H&~this.C|a},function(a){a=a.call(this,this.H&this.C,this.D&this.C);this.H=this.H&~this.C|a},function(a){a=a.call(this,this.H&this.C,r(this)&this.C);this.H=this.H&~this.C|a},function(a){a=a.call(this,this.H&this.C,this.L&this.C);this.H=this.H&~this.C|a},function(a){a=a.call(this,this.H&this.C,this.K&this.C);this.H=this.H&~this.C|a},function(a){a=a.call(this,this.H&this.C,this.J&this.C);this.H=this.H&~this.C|a},function(a){a=a.call(this,this.D&this.C,this.F&this.C);this.D=
        this.D&~this.C|a},function(a){a=a.call(this,this.D&this.C,this.G&this.C);this.D=this.D&~this.C|a},function(a){a=a.call(this,this.D&this.C,this.H&this.C);this.D=this.D&~this.C|a},function(a){a=a.call(this,this.D&this.C,this.D&this.C);this.D=this.D&~this.C|a},function(a){a=a.call(this,this.D&this.C,r(this)&this.C);this.D=this.D&~this.C|a},function(a){a=a.call(this,this.D&this.C,this.L&this.C);this.D=this.D&~this.C|a},function(a){a=a.call(this,this.D&this.C,this.K&this.C);this.D=this.D&~this.C|a},function(a){a=
        a.call(this,this.D&this.C,this.J&this.C);this.D=this.D&~this.C|a},function(a){a=a.call(this,r(this)&this.C,this.F&this.C);u(this,r(this)&~this.C|a)},function(a){a=a.call(this,r(this)&this.C,this.G&this.C);u(this,r(this)&~this.C|a)},function(a){a=a.call(this,r(this)&this.C,this.H&this.C);u(this,r(this)&~this.C|a)},function(a){a=a.call(this,r(this)&this.C,this.D&this.C);u(this,r(this)&~this.C|a)},function(a){a=a.call(this,r(this)&this.C,r(this)&this.C);u(this,r(this)&~this.C|a)},function(a){a=a.call(this,
        r(this)&this.C,this.L&this.C);u(this,r(this)&~this.C|a)},function(a){a=a.call(this,r(this)&this.C,this.K&this.C);u(this,r(this)&~this.C|a)},function(a){a=a.call(this,r(this)&this.C,this.J&this.C);u(this,r(this)&~this.C|a)},function(a){a=a.call(this,this.L&this.C,this.F&this.C);this.L=this.L&~this.C|a},function(a){a=a.call(this,this.L&this.C,this.G&this.C);this.L=this.L&~this.C|a},function(a){a=a.call(this,this.L&this.C,this.H&this.C);this.L=this.L&~this.C|a},function(a){a=a.call(this,this.L&this.C,
        this.D&this.C);this.L=this.L&~this.C|a},function(a){a=a.call(this,this.L&this.C,r(this)&this.C);this.L=this.L&~this.C|a},function(a){a=a.call(this,this.L&this.C,this.L&this.C);this.L=this.L&~this.C|a},function(a){a=a.call(this,this.L&this.C,this.K&this.C);this.L=this.L&~this.C|a},function(a){a=a.call(this,this.L&this.C,this.J&this.C);this.L=this.L&~this.C|a},function(a){a=a.call(this,this.K&this.C,this.F&this.C);this.K=this.K&~this.C|a},function(a){a=a.call(this,this.K&this.C,this.G&this.C);this.K=
        this.K&~this.C|a},function(a){a=a.call(this,this.K&this.C,this.H&this.C);this.K=this.K&~this.C|a},function(a){a=a.call(this,this.K&this.C,this.D&this.C);this.K=this.K&~this.C|a},function(a){a=a.call(this,this.K&this.C,r(this)&this.C);this.K=this.K&~this.C|a},function(a){a=a.call(this,this.K&this.C,this.L&this.C);this.K=this.K&~this.C|a},function(a){a=a.call(this,this.K&this.C,this.K&this.C);this.K=this.K&~this.C|a},function(a){a=a.call(this,this.K&this.C,this.J&this.C);this.K=this.K&~this.C|a},function(a){a=
        a.call(this,this.J&this.C,this.F&this.C);this.J=this.J&~this.C|a},function(a){a=a.call(this,this.J&this.C,this.G&this.C);this.J=this.J&~this.C|a},function(a){a=a.call(this,this.J&this.C,this.H&this.C);this.J=this.J&~this.C|a},function(a){a=a.call(this,this.J&this.C,this.D&this.C);this.J=this.J&~this.C|a},function(a){a=a.call(this,this.J&this.C,r(this)&this.C);this.J=this.J&~this.C|a},function(a){a=a.call(this,this.J&this.C,this.L&this.C);this.J=this.J&~this.C|a},function(a){a=a.call(this,this.J&this.C,
        this.K&this.C);this.J=this.J&~this.C|a},function(a){a=a.call(this,this.J&this.C,this.J&this.C);this.J=this.J&~this.C|a}],te=[function(a){a=a.call(this,N(this,this.D+this.K),this.F&this.C);Q(this,a);this.A-=this.B.ba},function(a){a=a.call(this,N(this,this.D+this.J),this.F&this.C);Q(this,a);this.A-=this.B.ca},function(a){a=a.call(this,O(this,this.L+this.K),this.F&this.C);Q(this,a);this.A-=this.B.ca},function(a){a=a.call(this,O(this,this.L+this.J),this.F&this.C);Q(this,a);this.A-=this.B.ba},function(a){a=
        a.call(this,N(this,this.K),this.F&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,this.J),this.F&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,R(this)),this.F&this.C);Q(this,a);this.A-=this.B.da},function(a){a=a.call(this,N(this,this.D),this.F&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,this.D+this.K),this.G&this.C);Q(this,a);this.A-=this.B.ba},function(a){a=a.call(this,N(this,this.D+this.J),this.G&this.C);Q(this,a);this.A-=this.B.ca},
        function(a){a=a.call(this,O(this,this.L+this.K),this.G&this.C);Q(this,a);this.A-=this.B.ca},function(a){a=a.call(this,O(this,this.L+this.J),this.G&this.C);Q(this,a);this.A-=this.B.ba},function(a){a=a.call(this,N(this,this.K),this.G&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,this.J),this.G&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,R(this)),this.G&this.C);Q(this,a);this.A-=this.B.da},function(a){a=a.call(this,N(this,this.D),this.G&this.C);Q(this,
        a);this.A-=this.B.N},function(a){a=a.call(this,N(this,this.D+this.K),this.H&this.C);Q(this,a);this.A-=this.B.ba},function(a){a=a.call(this,N(this,this.D+this.J),this.H&this.C);Q(this,a);this.A-=this.B.ca},function(a){a=a.call(this,O(this,this.L+this.K),this.H&this.C);Q(this,a);this.A-=this.B.ca},function(a){a=a.call(this,O(this,this.L+this.J),this.H&this.C);Q(this,a);this.A-=this.B.ba},function(a){a=a.call(this,N(this,this.K),this.H&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,
        this.J),this.H&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,R(this)),this.H&this.C);Q(this,a);this.A-=this.B.da},function(a){a=a.call(this,N(this,this.D),this.H&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,this.D+this.K),this.D&this.C);Q(this,a);this.A-=this.B.ba},function(a){a=a.call(this,N(this,this.D+this.J),this.D&this.C);Q(this,a);this.A-=this.B.ca},function(a){a=a.call(this,O(this,this.L+this.K),this.D&this.C);Q(this,a);this.A-=this.B.ca},function(a){a=
        a.call(this,O(this,this.L+this.J),this.D&this.C);Q(this,a);this.A-=this.B.ba},function(a){a=a.call(this,N(this,this.K),this.D&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,this.J),this.D&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,R(this)),this.D&this.C);Q(this,a);this.A-=this.B.da},function(a){a=a.call(this,N(this,this.D),this.D&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,this.D+this.K),r(this)&this.C);Q(this,a);this.A-=this.B.ba},
        function(a){a=a.call(this,N(this,this.D+this.J),r(this)&this.C);Q(this,a);this.A-=this.B.ca},function(a){a=a.call(this,O(this,this.L+this.K),r(this)&this.C);Q(this,a);this.A-=this.B.ca},function(a){a=a.call(this,O(this,this.L+this.J),r(this)&this.C);Q(this,a);this.A-=this.B.ba},function(a){a=a.call(this,N(this,this.K),r(this)&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,this.J),r(this)&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,R(this)),r(this)&this.C);
        Q(this,a);this.A-=this.B.da},function(a){a=a.call(this,N(this,this.D),r(this)&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,this.D+this.K),this.L&this.C);Q(this,a);this.A-=this.B.ba},function(a){a=a.call(this,N(this,this.D+this.J),this.L&this.C);Q(this,a);this.A-=this.B.ca},function(a){a=a.call(this,O(this,this.L+this.K),this.L&this.C);Q(this,a);this.A-=this.B.ca},function(a){a=a.call(this,O(this,this.L+this.J),this.L&this.C);Q(this,a);this.A-=this.B.ba},function(a){a=a.call(this,
        N(this,this.K),this.L&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,this.J),this.L&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,R(this)),this.L&this.C);Q(this,a);this.A-=this.B.da},function(a){a=a.call(this,N(this,this.D),this.L&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,this.D+this.K),this.K&this.C);Q(this,a);this.A-=this.B.ba},function(a){a=a.call(this,N(this,this.D+this.J),this.K&this.C);Q(this,a);this.A-=this.B.ca},function(a){a=
        a.call(this,O(this,this.L+this.K),this.K&this.C);Q(this,a);this.A-=this.B.ca},function(a){a=a.call(this,O(this,this.L+this.J),this.K&this.C);Q(this,a);this.A-=this.B.ba},function(a){a=a.call(this,N(this,this.K),this.K&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,this.J),this.K&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,R(this)),this.K&this.C);Q(this,a);this.A-=this.B.da},function(a){a=a.call(this,N(this,this.D),this.K&this.C);Q(this,a);this.A-=this.B.N},
        function(a){a=a.call(this,N(this,this.D+this.K),this.J&this.C);Q(this,a);this.A-=this.B.ba},function(a){a=a.call(this,N(this,this.D+this.J),this.J&this.C);Q(this,a);this.A-=this.B.ca},function(a){a=a.call(this,O(this,this.L+this.K),this.J&this.C);Q(this,a);this.A-=this.B.ca},function(a){a=a.call(this,O(this,this.L+this.J),this.J&this.C);Q(this,a);this.A-=this.B.ba},function(a){a=a.call(this,N(this,this.K),this.J&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,this.J),this.J&this.C);
        Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,R(this)),this.J&this.C);Q(this,a);this.A-=this.B.da},function(a){a=a.call(this,N(this,this.D),this.J&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,this.D+this.K+this.M()),this.F&this.C);Q(this,a);this.A-=this.B.P},function(a){a=a.call(this,N(this,this.D+this.J+this.M()),this.F&this.C);Q(this,a);this.A-=this.B.Q},function(a){a=a.call(this,O(this,this.L+this.K+this.M()),this.F&this.C);Q(this,a);this.A-=this.B.Q},function(a){a=
        a.call(this,O(this,this.L+this.J+this.M()),this.F&this.C);Q(this,a);this.A-=this.B.P},function(a){a=a.call(this,N(this,this.K+this.M()),this.F&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.J+this.M()),this.F&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,O(this,this.L+this.M()),this.F&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.D+this.M()),this.F&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.D+this.K+
        this.M()),this.G&this.C);Q(this,a);this.A-=this.B.P},function(a){a=a.call(this,N(this,this.D+this.J+this.M()),this.G&this.C);Q(this,a);this.A-=this.B.Q},function(a){a=a.call(this,O(this,this.L+this.K+this.M()),this.G&this.C);Q(this,a);this.A-=this.B.Q},function(a){a=a.call(this,O(this,this.L+this.J+this.M()),this.G&this.C);Q(this,a);this.A-=this.B.P},function(a){a=a.call(this,N(this,this.K+this.M()),this.G&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.J+this.M()),this.G&
        this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,O(this,this.L+this.M()),this.G&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.D+this.M()),this.G&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.D+this.K+this.M()),this.H&this.C);Q(this,a);this.A-=this.B.P},function(a){a=a.call(this,N(this,this.D+this.J+this.M()),this.H&this.C);Q(this,a);this.A-=this.B.Q},function(a){a=a.call(this,O(this,this.L+this.K+this.M()),this.H&this.C);Q(this,
        a);this.A-=this.B.Q},function(a){a=a.call(this,O(this,this.L+this.J+this.M()),this.H&this.C);Q(this,a);this.A-=this.B.P},function(a){a=a.call(this,N(this,this.K+this.M()),this.H&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.J+this.M()),this.H&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,O(this,this.L+this.M()),this.H&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.D+this.M()),this.H&this.C);Q(this,a);this.A-=this.B.I},function(a){a=
        a.call(this,N(this,this.D+this.K+this.M()),this.D&this.C);Q(this,a);this.A-=this.B.P},function(a){a=a.call(this,N(this,this.D+this.J+this.M()),this.D&this.C);Q(this,a);this.A-=this.B.Q},function(a){a=a.call(this,O(this,this.L+this.K+this.M()),this.D&this.C);Q(this,a);this.A-=this.B.Q},function(a){a=a.call(this,O(this,this.L+this.J+this.M()),this.D&this.C);Q(this,a);this.A-=this.B.P},function(a){a=a.call(this,N(this,this.K+this.M()),this.D&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,
        N(this,this.J+this.M()),this.D&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,O(this,this.L+this.M()),this.D&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.D+this.M()),this.D&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.D+this.K+this.M()),r(this)&this.C);Q(this,a);this.A-=this.B.P},function(a){a=a.call(this,N(this,this.D+this.J+this.M()),r(this)&this.C);Q(this,a);this.A-=this.B.Q},function(a){a=a.call(this,O(this,this.L+this.K+
        this.M()),r(this)&this.C);Q(this,a);this.A-=this.B.Q},function(a){a=a.call(this,O(this,this.L+this.J+this.M()),r(this)&this.C);Q(this,a);this.A-=this.B.P},function(a){a=a.call(this,N(this,this.K+this.M()),r(this)&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.J+this.M()),r(this)&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,O(this,this.L+this.M()),r(this)&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.D+this.M()),r(this)&this.C);
        Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.D+this.K+this.M()),this.L&this.C);Q(this,a);this.A-=this.B.P},function(a){a=a.call(this,N(this,this.D+this.J+this.M()),this.L&this.C);Q(this,a);this.A-=this.B.Q},function(a){a=a.call(this,O(this,this.L+this.K+this.M()),this.L&this.C);Q(this,a);this.A-=this.B.Q},function(a){a=a.call(this,O(this,this.L+this.J+this.M()),this.L&this.C);Q(this,a);this.A-=this.B.P},function(a){a=a.call(this,N(this,this.K+this.M()),this.L&this.C);Q(this,a);
        this.A-=this.B.I},function(a){a=a.call(this,N(this,this.J+this.M()),this.L&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,O(this,this.L+this.M()),this.L&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.D+this.M()),this.L&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.D+this.K+this.M()),this.K&this.C);Q(this,a);this.A-=this.B.P},function(a){a=a.call(this,N(this,this.D+this.J+this.M()),this.K&this.C);Q(this,a);this.A-=this.B.Q},function(a){a=
        a.call(this,O(this,this.L+this.K+this.M()),this.K&this.C);Q(this,a);this.A-=this.B.Q},function(a){a=a.call(this,O(this,this.L+this.J+this.M()),this.K&this.C);Q(this,a);this.A-=this.B.P},function(a){a=a.call(this,N(this,this.K+this.M()),this.K&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.J+this.M()),this.K&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,O(this,this.L+this.M()),this.K&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.D+
        this.M()),this.K&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.D+this.K+this.M()),this.J&this.C);Q(this,a);this.A-=this.B.P},function(a){a=a.call(this,N(this,this.D+this.J+this.M()),this.J&this.C);Q(this,a);this.A-=this.B.Q},function(a){a=a.call(this,O(this,this.L+this.K+this.M()),this.J&this.C);Q(this,a);this.A-=this.B.Q},function(a){a=a.call(this,O(this,this.L+this.J+this.M()),this.J&this.C);Q(this,a);this.A-=this.B.P},function(a){a=a.call(this,N(this,this.K+this.M()),
        this.J&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.J+this.M()),this.J&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,O(this,this.L+this.M()),this.J&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.D+this.M()),this.J&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.D+this.K+R(this)),this.F&this.C);Q(this,a);this.A-=this.B.P},function(a){a=a.call(this,N(this,this.D+this.J+R(this)),this.F&this.C);Q(this,a);
        this.A-=this.B.Q},function(a){a=a.call(this,O(this,this.L+this.K+R(this)),this.F&this.C);Q(this,a);this.A-=this.B.Q},function(a){a=a.call(this,O(this,this.L+this.J+R(this)),this.F&this.C);Q(this,a);this.A-=this.B.P},function(a){a=a.call(this,N(this,this.K+R(this)),this.F&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.J+R(this)),this.F&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,O(this,this.L+R(this)),this.F&this.C);Q(this,a);this.A-=this.B.I},function(a){a=
        a.call(this,N(this,this.D+R(this)),this.F&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.D+this.K+R(this)),this.G&this.C);Q(this,a);this.A-=this.B.P},function(a){a=a.call(this,N(this,this.D+this.J+R(this)),this.G&this.C);Q(this,a);this.A-=this.B.Q},function(a){a=a.call(this,O(this,this.L+this.K+R(this)),this.G&this.C);Q(this,a);this.A-=this.B.Q},function(a){a=a.call(this,O(this,this.L+this.J+R(this)),this.G&this.C);Q(this,a);this.A-=this.B.P},function(a){a=a.call(this,N(this,
        this.K+R(this)),this.G&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.J+R(this)),this.G&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,O(this,this.L+R(this)),this.G&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.D+R(this)),this.G&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.D+this.K+R(this)),this.H&this.C);Q(this,a);this.A-=this.B.P},function(a){a=a.call(this,N(this,this.D+this.J+R(this)),this.H&this.C);
        Q(this,a);this.A-=this.B.Q},function(a){a=a.call(this,O(this,this.L+this.K+R(this)),this.H&this.C);Q(this,a);this.A-=this.B.Q},function(a){a=a.call(this,O(this,this.L+this.J+R(this)),this.H&this.C);Q(this,a);this.A-=this.B.P},function(a){a=a.call(this,N(this,this.K+R(this)),this.H&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.J+R(this)),this.H&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,O(this,this.L+R(this)),this.H&this.C);Q(this,a);this.A-=this.B.I},
        function(a){a=a.call(this,N(this,this.D+R(this)),this.H&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.D+this.K+R(this)),this.D&this.C);Q(this,a);this.A-=this.B.P},function(a){a=a.call(this,N(this,this.D+this.J+R(this)),this.D&this.C);Q(this,a);this.A-=this.B.Q},function(a){a=a.call(this,O(this,this.L+this.K+R(this)),this.D&this.C);Q(this,a);this.A-=this.B.Q},function(a){a=a.call(this,O(this,this.L+this.J+R(this)),this.D&this.C);Q(this,a);this.A-=this.B.P},function(a){a=
        a.call(this,N(this,this.K+R(this)),this.D&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.J+R(this)),this.D&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,O(this,this.L+R(this)),this.D&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.D+R(this)),this.D&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.D+this.K+R(this)),r(this)&this.C);Q(this,a);this.A-=this.B.P},function(a){a=a.call(this,N(this,this.D+this.J+
        R(this)),r(this)&this.C);Q(this,a);this.A-=this.B.Q},function(a){a=a.call(this,O(this,this.L+this.K+R(this)),r(this)&this.C);Q(this,a);this.A-=this.B.Q},function(a){a=a.call(this,O(this,this.L+this.J+R(this)),r(this)&this.C);Q(this,a);this.A-=this.B.P},function(a){a=a.call(this,N(this,this.K+R(this)),r(this)&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.J+R(this)),r(this)&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,O(this,this.L+R(this)),r(this)&this.C);
        Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.D+R(this)),r(this)&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.D+this.K+R(this)),this.L&this.C);Q(this,a);this.A-=this.B.P},function(a){a=a.call(this,N(this,this.D+this.J+R(this)),this.L&this.C);Q(this,a);this.A-=this.B.Q},function(a){a=a.call(this,O(this,this.L+this.K+R(this)),this.L&this.C);Q(this,a);this.A-=this.B.Q},function(a){a=a.call(this,O(this,this.L+this.J+R(this)),this.L&this.C);Q(this,a);this.A-=
        this.B.P},function(a){a=a.call(this,N(this,this.K+R(this)),this.L&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.J+R(this)),this.L&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,O(this,this.L+R(this)),this.L&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.D+R(this)),this.L&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.D+this.K+R(this)),this.K&this.C);Q(this,a);this.A-=this.B.P},function(a){a=a.call(this,
        N(this,this.D+this.J+R(this)),this.K&this.C);Q(this,a);this.A-=this.B.Q},function(a){a=a.call(this,O(this,this.L+this.K+R(this)),this.K&this.C);Q(this,a);this.A-=this.B.Q},function(a){a=a.call(this,O(this,this.L+this.J+R(this)),this.K&this.C);Q(this,a);this.A-=this.B.P},function(a){a=a.call(this,N(this,this.K+R(this)),this.K&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.J+R(this)),this.K&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,O(this,this.L+R(this)),
        this.K&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.D+R(this)),this.K&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.D+this.K+R(this)),this.J&this.C);Q(this,a);this.A-=this.B.P},function(a){a=a.call(this,N(this,this.D+this.J+R(this)),this.J&this.C);Q(this,a);this.A-=this.B.Q},function(a){a=a.call(this,O(this,this.L+this.K+R(this)),this.J&this.C);Q(this,a);this.A-=this.B.Q},function(a){a=a.call(this,O(this,this.L+this.J+R(this)),this.J&this.C);
        Q(this,a);this.A-=this.B.P},function(a){a=a.call(this,N(this,this.K+R(this)),this.J&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.J+R(this)),this.J&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,O(this,this.L+R(this)),this.J&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.D+R(this)),this.J&this.C);Q(this,a);this.A-=this.B.I},z[192],z[200],z[208],z[216],z[224],z[232],z[240],z[248],z[193],z[201],z[209],z[217],z[225],z[233],z[241],
        z[249],z[194],z[202],z[210],z[218],z[226],z[234],z[242],z[250],z[195],z[203],z[211],z[219],z[227],z[235],z[243],z[251],z[196],z[204],z[212],z[220],z[228],z[236],z[244],z[252],z[197],z[205],z[213],z[221],z[229],z[237],z[245],z[253],z[198],z[206],z[214],z[222],z[230],z[238],z[246],z[254],z[199],z[207],z[215],z[223],z[231],z[239],z[247],z[255]],ue=[function(a,b){var c=a[0].call(this,N(this,this.D+this.K),b.call(this));Q(this,c);this.A-=this.B.ba},function(a,b){var c=a[0].call(this,N(this,this.D+this.J),
        b.call(this));Q(this,c);this.A-=this.B.ca},function(a,b){var c=a[0].call(this,O(this,this.L+this.K),b.call(this));Q(this,c);this.A-=this.B.ca},function(a,b){var c=a[0].call(this,O(this,this.L+this.J),b.call(this));Q(this,c);this.A-=this.B.ba},function(a,b){var c=a[0].call(this,N(this,this.K),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[0].call(this,N(this,this.J),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[0].call(this,N(this,R(this)),b.call(this));Q(this,c);
        this.A-=this.B.da},function(a,b){var c=a[0].call(this,N(this,this.D),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[1].call(this,N(this,this.D+this.K),b.call(this));Q(this,c);this.A-=this.B.ba},function(a,b){var c=a[1].call(this,N(this,this.D+this.J),b.call(this));Q(this,c);this.A-=this.B.ca},function(a,b){var c=a[1].call(this,O(this,this.L+this.K),b.call(this));Q(this,c);this.A-=this.B.ca},function(a,b){var c=a[1].call(this,O(this,this.L+this.J),b.call(this));Q(this,c);this.A-=this.B.ba},
        function(a,b){var c=a[1].call(this,N(this,this.K),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[1].call(this,N(this,this.J),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[1].call(this,N(this,R(this)),b.call(this));Q(this,c);this.A-=this.B.da},function(a,b){var c=a[1].call(this,N(this,this.D),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[2].call(this,N(this,this.D+this.K),b.call(this));Q(this,c);this.A-=this.B.ba},function(a,b){var c=a[2].call(this,
        N(this,this.D+this.J),b.call(this));Q(this,c);this.A-=this.B.ca},function(a,b){var c=a[2].call(this,O(this,this.L+this.K),b.call(this));Q(this,c);this.A-=this.B.ca},function(a,b){var c=a[2].call(this,O(this,this.L+this.J),b.call(this));Q(this,c);this.A-=this.B.ba},function(a,b){var c=a[2].call(this,N(this,this.K),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[2].call(this,N(this,this.J),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[2].call(this,N(this,R(this)),b.call(this));
        Q(this,c);this.A-=this.B.da},function(a,b){var c=a[2].call(this,N(this,this.D),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[3].call(this,N(this,this.D+this.K),b.call(this));Q(this,c);this.A-=this.B.ba},function(a,b){var c=a[3].call(this,N(this,this.D+this.J),b.call(this));Q(this,c);this.A-=this.B.ca},function(a,b){var c=a[3].call(this,O(this,this.L+this.K),b.call(this));Q(this,c);this.A-=this.B.ca},function(a,b){var c=a[3].call(this,O(this,this.L+this.J),b.call(this));Q(this,c);
        this.A-=this.B.ba},function(a,b){var c=a[3].call(this,N(this,this.K),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[3].call(this,N(this,this.J),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[3].call(this,N(this,R(this)),b.call(this));Q(this,c);this.A-=this.B.da},function(a,b){var c=a[3].call(this,N(this,this.D),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[4].call(this,N(this,this.D+this.K),b.call(this));Q(this,c);this.A-=this.B.ba},function(a,b){var c=
        a[4].call(this,N(this,this.D+this.J),b.call(this));Q(this,c);this.A-=this.B.ca},function(a,b){var c=a[4].call(this,O(this,this.L+this.K),b.call(this));Q(this,c);this.A-=this.B.ca},function(a,b){var c=a[4].call(this,O(this,this.L+this.J),b.call(this));Q(this,c);this.A-=this.B.ba},function(a,b){var c=a[4].call(this,N(this,this.K),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[4].call(this,N(this,this.J),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[4].call(this,N(this,
        R(this)),b.call(this));Q(this,c);this.A-=this.B.da},function(a,b){var c=a[4].call(this,N(this,this.D),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[5].call(this,N(this,this.D+this.K),b.call(this));Q(this,c);this.A-=this.B.ba},function(a,b){var c=a[5].call(this,N(this,this.D+this.J),b.call(this));Q(this,c);this.A-=this.B.ca},function(a,b){var c=a[5].call(this,O(this,this.L+this.K),b.call(this));Q(this,c);this.A-=this.B.ca},function(a,b){var c=a[5].call(this,O(this,this.L+this.J),
        b.call(this));Q(this,c);this.A-=this.B.ba},function(a,b){var c=a[5].call(this,N(this,this.K),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[5].call(this,N(this,this.J),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[5].call(this,N(this,R(this)),b.call(this));Q(this,c);this.A-=this.B.da},function(a,b){var c=a[5].call(this,N(this,this.D),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[6].call(this,N(this,this.D+this.K),b.call(this));Q(this,c);this.A-=
        this.B.ba},function(a,b){var c=a[6].call(this,N(this,this.D+this.J),b.call(this));Q(this,c);this.A-=this.B.ca},function(a,b){var c=a[6].call(this,O(this,this.L+this.K),b.call(this));Q(this,c);this.A-=this.B.ca},function(a,b){var c=a[6].call(this,O(this,this.L+this.J),b.call(this));Q(this,c);this.A-=this.B.ba},function(a,b){var c=a[6].call(this,N(this,this.K),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[6].call(this,N(this,this.J),b.call(this));Q(this,c);this.A-=this.B.N},function(a,
        b){var c=a[6].call(this,N(this,R(this)),b.call(this));Q(this,c);this.A-=this.B.da},function(a,b){var c=a[6].call(this,N(this,this.D),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[7].call(this,N(this,this.D+this.K),b.call(this));Q(this,c);this.A-=this.B.ba},function(a,b){var c=a[7].call(this,N(this,this.D+this.J),b.call(this));Q(this,c);this.A-=this.B.ca},function(a,b){var c=a[7].call(this,O(this,this.L+this.K),b.call(this));Q(this,c);this.A-=this.B.ca},function(a,b){var c=a[7].call(this,
        O(this,this.L+this.J),b.call(this));Q(this,c);this.A-=this.B.ba},function(a,b){var c=a[7].call(this,N(this,this.K),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[7].call(this,N(this,this.J),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[7].call(this,N(this,R(this)),b.call(this));Q(this,c);this.A-=this.B.da},function(a,b){var c=a[7].call(this,N(this,this.D),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[0].call(this,N(this,this.D+this.K+this.M()),
        b.call(this));Q(this,c);this.A-=this.B.P},function(a,b){var c=a[0].call(this,N(this,this.D+this.J+this.M()),b.call(this));Q(this,c);this.A-=this.B.Q},function(a,b){var c=a[0].call(this,O(this,this.L+this.K+this.M()),b.call(this));Q(this,c);this.A-=this.B.Q},function(a,b){var c=a[0].call(this,O(this,this.L+this.J+this.M()),b.call(this));Q(this,c);this.A-=this.B.P},function(a,b){var c=a[0].call(this,N(this,this.K+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,
        N(this,this.J+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,O(this,this.L+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,N(this,this.D+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,N(this,this.D+this.K+this.M()),b.call(this));Q(this,c);this.A-=this.B.P},function(a,b){var c=a[1].call(this,N(this,this.D+this.J+this.M()),b.call(this));Q(this,c);this.A-=this.B.Q},function(a,b){var c=
        a[1].call(this,O(this,this.L+this.K+this.M()),b.call(this));Q(this,c);this.A-=this.B.Q},function(a,b){var c=a[1].call(this,O(this,this.L+this.J+this.M()),b.call(this));Q(this,c);this.A-=this.B.P},function(a,b){var c=a[1].call(this,N(this,this.K+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,N(this,this.J+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,O(this,this.L+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,
        b){var c=a[1].call(this,N(this,this.D+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,N(this,this.D+this.K+this.M()),b.call(this));Q(this,c);this.A-=this.B.P},function(a,b){var c=a[2].call(this,N(this,this.D+this.J+this.M()),b.call(this));Q(this,c);this.A-=this.B.Q},function(a,b){var c=a[2].call(this,O(this,this.L+this.K+this.M()),b.call(this));Q(this,c);this.A-=this.B.Q},function(a,b){var c=a[2].call(this,O(this,this.L+this.J+this.M()),b.call(this));Q(this,
        c);this.A-=this.B.P},function(a,b){var c=a[2].call(this,N(this,this.K+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,N(this,this.J+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,O(this,this.L+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,N(this,this.D+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,N(this,this.D+this.K+this.M()),b.call(this));
        Q(this,c);this.A-=this.B.P},function(a,b){var c=a[3].call(this,N(this,this.D+this.J+this.M()),b.call(this));Q(this,c);this.A-=this.B.Q},function(a,b){var c=a[3].call(this,O(this,this.L+this.K+this.M()),b.call(this));Q(this,c);this.A-=this.B.Q},function(a,b){var c=a[3].call(this,O(this,this.L+this.J+this.M()),b.call(this));Q(this,c);this.A-=this.B.P},function(a,b){var c=a[3].call(this,N(this,this.K+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,N(this,this.J+
        this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,O(this,this.L+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,N(this,this.D+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,N(this,this.D+this.K+this.M()),b.call(this));Q(this,c);this.A-=this.B.P},function(a,b){var c=a[4].call(this,N(this,this.D+this.J+this.M()),b.call(this));Q(this,c);this.A-=this.B.Q},function(a,b){var c=a[4].call(this,
        O(this,this.L+this.K+this.M()),b.call(this));Q(this,c);this.A-=this.B.Q},function(a,b){var c=a[4].call(this,O(this,this.L+this.J+this.M()),b.call(this));Q(this,c);this.A-=this.B.P},function(a,b){var c=a[4].call(this,N(this,this.K+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,N(this,this.J+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,O(this,this.L+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=
        a[4].call(this,N(this,this.D+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,N(this,this.D+this.K+this.M()),b.call(this));Q(this,c);this.A-=this.B.P},function(a,b){var c=a[5].call(this,N(this,this.D+this.J+this.M()),b.call(this));Q(this,c);this.A-=this.B.Q},function(a,b){var c=a[5].call(this,O(this,this.L+this.K+this.M()),b.call(this));Q(this,c);this.A-=this.B.Q},function(a,b){var c=a[5].call(this,O(this,this.L+this.J+this.M()),b.call(this));Q(this,c);this.A-=
        this.B.P},function(a,b){var c=a[5].call(this,N(this,this.K+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,N(this,this.J+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,O(this,this.L+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,N(this,this.D+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,N(this,this.D+this.K+this.M()),b.call(this));Q(this,
        c);this.A-=this.B.P},function(a,b){var c=a[6].call(this,N(this,this.D+this.J+this.M()),b.call(this));Q(this,c);this.A-=this.B.Q},function(a,b){var c=a[6].call(this,O(this,this.L+this.K+this.M()),b.call(this));Q(this,c);this.A-=this.B.Q},function(a,b){var c=a[6].call(this,O(this,this.L+this.J+this.M()),b.call(this));Q(this,c);this.A-=this.B.P},function(a,b){var c=a[6].call(this,N(this,this.K+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,N(this,this.J+this.M()),
        b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,O(this,this.L+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,N(this,this.D+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,N(this,this.D+this.K+this.M()),b.call(this));Q(this,c);this.A-=this.B.P},function(a,b){var c=a[7].call(this,N(this,this.D+this.J+this.M()),b.call(this));Q(this,c);this.A-=this.B.Q},function(a,b){var c=a[7].call(this,O(this,
        this.L+this.K+this.M()),b.call(this));Q(this,c);this.A-=this.B.Q},function(a,b){var c=a[7].call(this,O(this,this.L+this.J+this.M()),b.call(this));Q(this,c);this.A-=this.B.P},function(a,b){var c=a[7].call(this,N(this,this.K+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,N(this,this.J+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,O(this,this.L+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,
        N(this,this.D+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,N(this,this.D+this.K+R(this)),b.call(this));Q(this,c);this.A-=this.B.P},function(a,b){var c=a[0].call(this,N(this,this.D+this.J+R(this)),b.call(this));Q(this,c);this.A-=this.B.Q},function(a,b){var c=a[0].call(this,O(this,this.L+this.K+R(this)),b.call(this));Q(this,c);this.A-=this.B.Q},function(a,b){var c=a[0].call(this,O(this,this.L+this.J+R(this)),b.call(this));Q(this,c);this.A-=this.B.P},function(a,
        b){var c=a[0].call(this,N(this,this.K+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,N(this,this.J+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,O(this,this.L+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,N(this,this.D+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,N(this,this.D+this.K+R(this)),b.call(this));Q(this,c);this.A-=this.B.P},function(a,
        b){var c=a[1].call(this,N(this,this.D+this.J+R(this)),b.call(this));Q(this,c);this.A-=this.B.Q},function(a,b){var c=a[1].call(this,O(this,this.L+this.K+R(this)),b.call(this));Q(this,c);this.A-=this.B.Q},function(a,b){var c=a[1].call(this,O(this,this.L+this.J+R(this)),b.call(this));Q(this,c);this.A-=this.B.P},function(a,b){var c=a[1].call(this,N(this,this.K+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,N(this,this.J+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},
        function(a,b){var c=a[1].call(this,O(this,this.L+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,N(this,this.D+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,N(this,this.D+this.K+R(this)),b.call(this));Q(this,c);this.A-=this.B.P},function(a,b){var c=a[2].call(this,N(this,this.D+this.J+R(this)),b.call(this));Q(this,c);this.A-=this.B.Q},function(a,b){var c=a[2].call(this,O(this,this.L+this.K+R(this)),b.call(this));Q(this,c);
        this.A-=this.B.Q},function(a,b){var c=a[2].call(this,O(this,this.L+this.J+R(this)),b.call(this));Q(this,c);this.A-=this.B.P},function(a,b){var c=a[2].call(this,N(this,this.K+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,N(this,this.J+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,O(this,this.L+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,N(this,this.D+R(this)),b.call(this));Q(this,
        c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,N(this,this.D+this.K+R(this)),b.call(this));Q(this,c);this.A-=this.B.P},function(a,b){var c=a[3].call(this,N(this,this.D+this.J+R(this)),b.call(this));Q(this,c);this.A-=this.B.Q},function(a,b){var c=a[3].call(this,O(this,this.L+this.K+R(this)),b.call(this));Q(this,c);this.A-=this.B.Q},function(a,b){var c=a[3].call(this,O(this,this.L+this.J+R(this)),b.call(this));Q(this,c);this.A-=this.B.P},function(a,b){var c=a[3].call(this,N(this,this.K+R(this)),
        b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,N(this,this.J+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,O(this,this.L+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,N(this,this.D+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,N(this,this.D+this.K+R(this)),b.call(this));Q(this,c);this.A-=this.B.P},function(a,b){var c=a[4].call(this,N(this,this.D+this.J+
        R(this)),b.call(this));Q(this,c);this.A-=this.B.Q},function(a,b){var c=a[4].call(this,O(this,this.L+this.K+R(this)),b.call(this));Q(this,c);this.A-=this.B.Q},function(a,b){var c=a[4].call(this,O(this,this.L+this.J+R(this)),b.call(this));Q(this,c);this.A-=this.B.P},function(a,b){var c=a[4].call(this,N(this,this.K+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,N(this,this.J+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,O(this,
        this.L+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,N(this,this.D+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,N(this,this.D+this.K+R(this)),b.call(this));Q(this,c);this.A-=this.B.P},function(a,b){var c=a[5].call(this,N(this,this.D+this.J+R(this)),b.call(this));Q(this,c);this.A-=this.B.Q},function(a,b){var c=a[5].call(this,O(this,this.L+this.K+R(this)),b.call(this));Q(this,c);this.A-=this.B.Q},function(a,b){var c=a[5].call(this,
        O(this,this.L+this.J+R(this)),b.call(this));Q(this,c);this.A-=this.B.P},function(a,b){var c=a[5].call(this,N(this,this.K+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,N(this,this.J+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,O(this,this.L+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,N(this,this.D+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,
        N(this,this.D+this.K+R(this)),b.call(this));Q(this,c);this.A-=this.B.P},function(a,b){var c=a[6].call(this,N(this,this.D+this.J+R(this)),b.call(this));Q(this,c);this.A-=this.B.Q},function(a,b){var c=a[6].call(this,O(this,this.L+this.K+R(this)),b.call(this));Q(this,c);this.A-=this.B.Q},function(a,b){var c=a[6].call(this,O(this,this.L+this.J+R(this)),b.call(this));Q(this,c);this.A-=this.B.P},function(a,b){var c=a[6].call(this,N(this,this.K+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,
        b){var c=a[6].call(this,N(this,this.J+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,O(this,this.L+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,N(this,this.D+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,N(this,this.D+this.K+R(this)),b.call(this));Q(this,c);this.A-=this.B.P},function(a,b){var c=a[7].call(this,N(this,this.D+this.J+R(this)),b.call(this));Q(this,c);this.A-=this.B.Q},
        function(a,b){var c=a[7].call(this,O(this,this.L+this.K+R(this)),b.call(this));Q(this,c);this.A-=this.B.Q},function(a,b){var c=a[7].call(this,O(this,this.L+this.J+R(this)),b.call(this));Q(this,c);this.A-=this.B.P},function(a,b){var c=a[7].call(this,N(this,this.K+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,N(this,this.J+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,O(this,this.L+R(this)),b.call(this));Q(this,c);this.A-=
        this.B.I},function(a,b){var c=a[7].call(this,N(this,this.D+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,this.F&this.C,b.call(this));this.F=this.F&~this.C|c},function(a,b){var c=a[0].call(this,this.G&this.C,b.call(this));this.G=this.G&~this.C|c},function(a,b){var c=a[0].call(this,this.H&this.C,b.call(this));this.H=this.H&~this.C|c},function(a,b){var c=a[0].call(this,this.D&this.C,b.call(this));this.D=this.D&~this.C|c},function(a,b){var c=a[0].call(this,r(this)&
        this.C,b.call(this));u(this,r(this)&~this.C|c)},function(a,b){var c=a[0].call(this,this.L&this.C,b.call(this));this.L=this.L&~this.C|c},function(a,b){var c=a[0].call(this,this.K&this.C,b.call(this));this.K=this.K&~this.C|c},function(a,b){var c=a[0].call(this,this.J&this.C,b.call(this));this.J=this.J&~this.C|c},function(a,b){var c=a[1].call(this,this.F&this.C,b.call(this));this.F=this.F&~this.C|c},function(a,b){var c=a[1].call(this,this.G&this.C,b.call(this));this.G=this.G&~this.C|c},function(a,b){var c=
        a[1].call(this,this.H&this.C,b.call(this));this.H=this.H&~this.C|c},function(a,b){var c=a[1].call(this,this.D&this.C,b.call(this));this.D=this.D&~this.C|c},function(a,b){var c=a[1].call(this,r(this)&this.C,b.call(this));u(this,r(this)&~this.C|c)},function(a,b){var c=a[1].call(this,this.L&this.C,b.call(this));this.L=this.L&~this.C|c},function(a,b){var c=a[1].call(this,this.K&this.C,b.call(this));this.K=this.K&~this.C|c},function(a,b){var c=a[1].call(this,this.J&this.C,b.call(this));this.J=this.J&~this.C|
        c},function(a,b){var c=a[2].call(this,this.F&this.C,b.call(this));this.F=this.F&~this.C|c},function(a,b){var c=a[2].call(this,this.G&this.C,b.call(this));this.G=this.G&~this.C|c},function(a,b){var c=a[2].call(this,this.H&this.C,b.call(this));this.H=this.H&~this.C|c},function(a,b){var c=a[2].call(this,this.D&this.C,b.call(this));this.D=this.D&~this.C|c},function(a,b){var c=a[2].call(this,r(this)&this.C,b.call(this));u(this,r(this)&~this.C|c)},function(a,b){var c=a[2].call(this,this.L&this.C,b.call(this));
        this.L=this.L&~this.C|c},function(a,b){var c=a[2].call(this,this.K&this.C,b.call(this));this.K=this.K&~this.C|c},function(a,b){var c=a[2].call(this,this.J&this.C,b.call(this));this.J=this.J&~this.C|c},function(a,b){var c=a[3].call(this,this.F&this.C,b.call(this));this.F=this.F&~this.C|c},function(a,b){var c=a[3].call(this,this.G&this.C,b.call(this));this.G=this.G&~this.C|c},function(a,b){var c=a[3].call(this,this.H&this.C,b.call(this));this.H=this.H&~this.C|c},function(a,b){var c=a[3].call(this,this.D&
        this.C,b.call(this));this.D=this.D&~this.C|c},function(a,b){var c=a[3].call(this,r(this)&this.C,b.call(this));u(this,r(this)&~this.C|c)},function(a,b){var c=a[3].call(this,this.L&this.C,b.call(this));this.L=this.L&~this.C|c},function(a,b){var c=a[3].call(this,this.K&this.C,b.call(this));this.K=this.K&~this.C|c},function(a,b){var c=a[3].call(this,this.J&this.C,b.call(this));this.J=this.J&~this.C|c},function(a,b){var c=a[4].call(this,this.F&this.C,b.call(this));this.F=this.F&~this.C|c},function(a,b){var c=
        a[4].call(this,this.G&this.C,b.call(this));this.G=this.G&~this.C|c},function(a,b){var c=a[4].call(this,this.H&this.C,b.call(this));this.H=this.H&~this.C|c},function(a,b){var c=a[4].call(this,this.D&this.C,b.call(this));this.D=this.D&~this.C|c},function(a,b){var c=a[4].call(this,r(this)&this.C,b.call(this));u(this,r(this)&~this.C|c)},function(a,b){var c=a[4].call(this,this.L&this.C,b.call(this));this.L=this.L&~this.C|c},function(a,b){var c=a[4].call(this,this.K&this.C,b.call(this));this.K=this.K&~this.C|
        c},function(a,b){var c=a[4].call(this,this.J&this.C,b.call(this));this.J=this.J&~this.C|c},function(a,b){var c=a[5].call(this,this.F&this.C,b.call(this));this.F=this.F&~this.C|c},function(a,b){var c=a[5].call(this,this.G&this.C,b.call(this));this.G=this.G&~this.C|c},function(a,b){var c=a[5].call(this,this.H&this.C,b.call(this));this.H=this.H&~this.C|c},function(a,b){var c=a[5].call(this,this.D&this.C,b.call(this));this.D=this.D&~this.C|c},function(a,b){var c=a[5].call(this,r(this)&this.C,b.call(this));
        u(this,r(this)&~this.C|c)},function(a,b){var c=a[5].call(this,this.L&this.C,b.call(this));this.L=this.L&~this.C|c},function(a,b){var c=a[5].call(this,this.K&this.C,b.call(this));this.K=this.K&~this.C|c},function(a,b){var c=a[5].call(this,this.J&this.C,b.call(this));this.J=this.J&~this.C|c},function(a,b){var c=a[6].call(this,this.F&this.C,b.call(this));this.F=this.F&~this.C|c},function(a,b){var c=a[6].call(this,this.G&this.C,b.call(this));this.G=this.G&~this.C|c},function(a,b){var c=a[6].call(this,
        this.H&this.C,b.call(this));this.H=this.H&~this.C|c},function(a,b){var c=a[6].call(this,this.D&this.C,b.call(this));this.D=this.D&~this.C|c},function(a,b){var c=a[6].call(this,r(this)&this.C,b.call(this));u(this,r(this)&~this.C|c)},function(a,b){var c=a[6].call(this,this.L&this.C,b.call(this));this.L=this.L&~this.C|c},function(a,b){var c=a[6].call(this,this.K&this.C,b.call(this));this.K=this.K&~this.C|c},function(a,b){var c=a[6].call(this,this.J&this.C,b.call(this));this.J=this.J&~this.C|c},function(a,
        b){var c=a[7].call(this,this.F&this.C,b.call(this));this.F=this.F&~this.C|c},function(a,b){var c=a[7].call(this,this.G&this.C,b.call(this));this.G=this.G&~this.C|c},function(a,b){var c=a[7].call(this,this.H&this.C,b.call(this));this.H=this.H&~this.C|c},function(a,b){var c=a[7].call(this,this.D&this.C,b.call(this));this.D=this.D&~this.C|c},function(a,b){var c=a[7].call(this,r(this)&this.C,b.call(this));u(this,r(this)&~this.C|c)},function(a,b){var c=a[7].call(this,this.L&this.C,b.call(this));this.L=
        this.L&~this.C|c},function(a,b){var c=a[7].call(this,this.K&this.C,b.call(this));this.K=this.K&~this.C|c},function(a,b){var c=a[7].call(this,this.J&this.C,b.call(this));this.J=this.J&~this.C|c}],A=[function(a){a=a.call(this,this.F&255,D(this,this.F));this.F=this.F&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.F&255,D(this,this.G));this.F=this.F&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.F&255,D(this,this.H));this.F=this.F&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.F&
        255,D(this,this.D));this.F=this.F&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.F&255,D(this,U(this,0)));this.F=this.F&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.F&255,D(this,R(this)));this.F=this.F&-256|a;this.A-=this.B.da},function(a){a=a.call(this,this.F&255,D(this,this.K));this.F=this.F&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.F&255,D(this,this.J));this.F=this.F&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.G&255,D(this,this.F));this.G=this.G&-256|
        a;this.A-=this.B.N},function(a){a=a.call(this,this.G&255,D(this,this.G));this.G=this.G&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.G&255,D(this,this.H));this.G=this.G&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.G&255,D(this,this.D));this.G=this.G&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.G&255,D(this,U(this,0)));this.G=this.G&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.G&255,D(this,R(this)));this.G=this.G&-256|a;this.A-=this.B.da},function(a){a=a.call(this,
        this.G&255,D(this,this.K));this.G=this.G&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.G&255,D(this,this.J));this.G=this.G&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.H&255,D(this,this.F));this.H=this.H&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.H&255,D(this,this.G));this.H=this.H&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.H&255,D(this,this.H));this.H=this.H&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.H&255,D(this,this.D));this.H=this.H&
        -256|a;this.A-=this.B.N},function(a){a=a.call(this,this.H&255,D(this,U(this,0)));this.H=this.H&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.H&255,D(this,R(this)));this.H=this.H&-256|a;this.A-=this.B.da},function(a){a=a.call(this,this.H&255,D(this,this.K));this.H=this.H&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.H&255,D(this,this.J));this.H=this.H&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.D&255,D(this,this.F));this.D=this.D&-256|a;this.A-=this.B.N},function(a){a=
        a.call(this,this.D&255,D(this,this.G));this.D=this.D&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.D&255,D(this,this.H));this.D=this.D&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.D&255,D(this,this.D));this.D=this.D&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.D&255,D(this,U(this,0)));this.D=this.D&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.D&255,D(this,R(this)));this.D=this.D&-256|a;this.A-=this.B.da},function(a){a=a.call(this,this.D&255,D(this,this.K));
        this.D=this.D&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.D&255,D(this,this.J));this.D=this.D&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.F>>8&255,D(this,this.F));this.F=this.F&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.F>>8&255,D(this,this.G));this.F=this.F&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.F>>8&255,D(this,this.H));this.F=this.F&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.F>>8&255,D(this,this.D));this.F=this.F&
        -65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.F>>8&255,D(this,U(this,0)));this.F=this.F&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.F>>8&255,D(this,R(this)));this.F=this.F&-65281|a<<8;this.A-=this.B.da},function(a){a=a.call(this,this.F>>8&255,D(this,this.K));this.F=this.F&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.F>>8&255,D(this,this.J));this.F=this.F&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.G>>8&255,D(this,this.F));this.G=this.G&
        -65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.G>>8&255,D(this,this.G));this.G=this.G&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.G>>8&255,D(this,this.H));this.G=this.G&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.G>>8&255,D(this,this.D));this.G=this.G&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.G>>8&255,D(this,U(this,0)));this.G=this.G&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.G>>8&255,D(this,R(this)));this.G=this.G&
        -65281|a<<8;this.A-=this.B.da},function(a){a=a.call(this,this.G>>8&255,D(this,this.K));this.G=this.G&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.G>>8&255,D(this,this.J));this.G=this.G&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.H>>8&255,D(this,this.F));this.H=this.H&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.H>>8&255,D(this,this.G));this.H=this.H&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.H>>8&255,D(this,this.H));this.H=this.H&
        -65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.H>>8&255,D(this,this.D));this.H=this.H&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.H>>8&255,D(this,U(this,0)));this.H=this.H&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.H>>8&255,D(this,R(this)));this.H=this.H&-65281|a<<8;this.A-=this.B.da},function(a){a=a.call(this,this.H>>8&255,D(this,this.K));this.H=this.H&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.H>>8&255,D(this,this.J));this.H=this.H&
        -65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.D>>8&255,D(this,this.F));this.D=this.D&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.D>>8&255,D(this,this.G));this.D=this.D&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.D>>8&255,D(this,this.H));this.D=this.D&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.D>>8&255,D(this,this.D));this.D=this.D&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.D>>8&255,D(this,U(this,0)));this.D=this.D&
        -65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.D>>8&255,D(this,R(this)));this.D=this.D&-65281|a<<8;this.A-=this.B.da},function(a){a=a.call(this,this.D>>8&255,D(this,this.K));this.D=this.D&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.D>>8&255,D(this,this.J));this.D=this.D&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.F&255,D(this,this.F+this.M()));this.F=this.F&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&255,D(this,this.G+this.M()));this.F=
        this.F&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&255,D(this,this.H+this.M()));this.F=this.F&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&255,D(this,this.D+this.M()));this.F=this.F&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&255,D(this,U(this,1)+this.M()));this.F=this.F&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&255,E(this,this.L+this.M()));this.F=this.F&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&255,D(this,this.K+this.M()));
        this.F=this.F&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&255,D(this,this.J+this.M()));this.F=this.F&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&255,D(this,this.F+this.M()));this.G=this.G&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&255,D(this,this.G+this.M()));this.G=this.G&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&255,D(this,this.H+this.M()));this.G=this.G&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&255,D(this,this.D+this.M()));
        this.G=this.G&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&255,D(this,U(this,1)+this.M()));this.G=this.G&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&255,E(this,this.L+this.M()));this.G=this.G&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&255,D(this,this.K+this.M()));this.G=this.G&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&255,D(this,this.J+this.M()));this.G=this.G&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&255,D(this,this.F+this.M()));
        this.H=this.H&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&255,D(this,this.G+this.M()));this.H=this.H&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&255,D(this,this.H+this.M()));this.H=this.H&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&255,D(this,this.D+this.M()));this.H=this.H&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&255,D(this,U(this,1)+this.M()));this.H=this.H&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&255,E(this,this.L+this.M()));
        this.H=this.H&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&255,D(this,this.K+this.M()));this.H=this.H&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&255,D(this,this.J+this.M()));this.H=this.H&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&255,D(this,this.F+this.M()));this.D=this.D&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&255,D(this,this.G+this.M()));this.D=this.D&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&255,D(this,this.H+this.M()));
        this.D=this.D&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&255,D(this,this.D+this.M()));this.D=this.D&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&255,D(this,U(this,1)+this.M()));this.D=this.D&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&255,E(this,this.L+this.M()));this.D=this.D&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&255,D(this,this.K+this.M()));this.D=this.D&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&255,D(this,this.J+this.M()));
        this.D=this.D&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.F>>8&255,D(this,this.F+this.M()));this.F=this.F&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.F>>8&255,D(this,this.G+this.M()));this.F=this.F&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.F>>8&255,D(this,this.H+this.M()));this.F=this.F&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.F>>8&255,D(this,this.D+this.M()));this.F=this.F&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,
        this.F>>8&255,D(this,U(this,1)+this.M()));this.F=this.F&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.F>>8&255,E(this,this.L+this.M()));this.F=this.F&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.F>>8&255,D(this,this.K+this.M()));this.F=this.F&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.F>>8&255,D(this,this.J+this.M()));this.F=this.F&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.G>>8&255,D(this,this.F+this.M()));this.G=this.G&-65281|a<<
        8;this.A-=this.B.I},function(a){a=a.call(this,this.G>>8&255,D(this,this.G+this.M()));this.G=this.G&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.G>>8&255,D(this,this.H+this.M()));this.G=this.G&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.G>>8&255,D(this,this.D+this.M()));this.G=this.G&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.G>>8&255,D(this,U(this,1)+this.M()));this.G=this.G&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.G>>8&255,E(this,
        this.L+this.M()));this.G=this.G&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.G>>8&255,D(this,this.K+this.M()));this.G=this.G&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.G>>8&255,D(this,this.J+this.M()));this.G=this.G&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.H>>8&255,D(this,this.F+this.M()));this.H=this.H&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.H>>8&255,D(this,this.G+this.M()));this.H=this.H&-65281|a<<8;this.A-=this.B.I},function(a){a=
        a.call(this,this.H>>8&255,D(this,this.H+this.M()));this.H=this.H&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.H>>8&255,D(this,this.D+this.M()));this.H=this.H&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.H>>8&255,D(this,U(this,1)+this.M()));this.H=this.H&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.H>>8&255,E(this,this.L+this.M()));this.H=this.H&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.H>>8&255,D(this,this.K+this.M()));this.H=this.H&
        -65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.H>>8&255,D(this,this.J+this.M()));this.H=this.H&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.D>>8&255,D(this,this.F+this.M()));this.D=this.D&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.D>>8&255,D(this,this.G+this.M()));this.D=this.D&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.D>>8&255,D(this,this.H+this.M()));this.D=this.D&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.D>>8&
        255,D(this,this.D+this.M()));this.D=this.D&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.D>>8&255,D(this,U(this,1)+this.M()));this.D=this.D&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.D>>8&255,E(this,this.L+this.M()));this.D=this.D&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.D>>8&255,D(this,this.K+this.M()));this.D=this.D&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.D>>8&255,D(this,this.J+this.M()));this.D=this.D&-65281|a<<8;this.A-=
        this.B.I},function(a){a=a.call(this,this.F&255,D(this,this.F+R(this)));this.F=this.F&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&255,D(this,this.G+R(this)));this.F=this.F&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&255,D(this,this.H+R(this)));this.F=this.F&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&255,D(this,this.D+R(this)));this.F=this.F&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&255,D(this,U(this,2)+R(this)));this.F=this.F&-256|a;this.A-=
        this.B.I},function(a){a=a.call(this,this.F&255,E(this,this.L+R(this)));this.F=this.F&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&255,D(this,this.K+R(this)));this.F=this.F&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&255,D(this,this.J+R(this)));this.F=this.F&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&255,D(this,this.F+R(this)));this.G=this.G&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&255,D(this,this.G+R(this)));this.G=this.G&-256|a;this.A-=this.B.I},
        function(a){a=a.call(this,this.G&255,D(this,this.H+R(this)));this.G=this.G&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&255,D(this,this.D+R(this)));this.G=this.G&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&255,D(this,U(this,2)+R(this)));this.G=this.G&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&255,E(this,this.L+R(this)));this.G=this.G&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&255,D(this,this.K+R(this)));this.G=this.G&-256|a;this.A-=this.B.I},
        function(a){a=a.call(this,this.G&255,D(this,this.J+R(this)));this.G=this.G&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&255,D(this,this.F+R(this)));this.H=this.H&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&255,D(this,this.G+R(this)));this.H=this.H&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&255,D(this,this.H+R(this)));this.H=this.H&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&255,D(this,this.D+R(this)));this.H=this.H&-256|a;this.A-=this.B.I},function(a){a=
        a.call(this,this.H&255,D(this,U(this,2)+R(this)));this.H=this.H&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&255,E(this,this.L+R(this)));this.H=this.H&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&255,D(this,this.K+R(this)));this.H=this.H&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&255,D(this,this.J+R(this)));this.H=this.H&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&255,D(this,this.F+R(this)));this.D=this.D&-256|a;this.A-=this.B.I},function(a){a=
        a.call(this,this.D&255,D(this,this.G+R(this)));this.D=this.D&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&255,D(this,this.H+R(this)));this.D=this.D&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&255,D(this,this.D+R(this)));this.D=this.D&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&255,D(this,U(this,2)+R(this)));this.D=this.D&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&255,E(this,this.L+R(this)));this.D=this.D&-256|a;this.A-=this.B.I},function(a){a=
        a.call(this,this.D&255,D(this,this.K+R(this)));this.D=this.D&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&255,D(this,this.J+R(this)));this.D=this.D&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.F>>8&255,D(this,this.F+R(this)));this.F=this.F&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.F>>8&255,D(this,this.G+R(this)));this.F=this.F&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.F>>8&255,D(this,this.H+R(this)));this.F=this.F&-65281|a<<8;this.A-=this.B.I},
        function(a){a=a.call(this,this.F>>8&255,D(this,this.D+R(this)));this.F=this.F&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.F>>8&255,D(this,U(this,2)+R(this)));this.F=this.F&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.F>>8&255,E(this,this.L+R(this)));this.F=this.F&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.F>>8&255,D(this,this.K+R(this)));this.F=this.F&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.F>>8&255,D(this,this.J+R(this)));this.F=
        this.F&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.G>>8&255,D(this,this.F+R(this)));this.G=this.G&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.G>>8&255,D(this,this.G+R(this)));this.G=this.G&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.G>>8&255,D(this,this.H+R(this)));this.G=this.G&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.G>>8&255,D(this,this.D+R(this)));this.G=this.G&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.G>>
        8&255,D(this,U(this,2)+R(this)));this.G=this.G&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.G>>8&255,E(this,this.L+R(this)));this.G=this.G&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.G>>8&255,D(this,this.K+R(this)));this.G=this.G&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.G>>8&255,D(this,this.J+R(this)));this.G=this.G&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.H>>8&255,D(this,this.F+R(this)));this.H=this.H&-65281|a<<8;this.A-=this.B.I},
        function(a){a=a.call(this,this.H>>8&255,D(this,this.G+R(this)));this.H=this.H&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.H>>8&255,D(this,this.H+R(this)));this.H=this.H&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.H>>8&255,D(this,this.D+R(this)));this.H=this.H&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.H>>8&255,D(this,U(this,2)+R(this)));this.H=this.H&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.H>>8&255,E(this,this.L+R(this)));this.H=
        this.H&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.H>>8&255,D(this,this.K+R(this)));this.H=this.H&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.H>>8&255,D(this,this.J+R(this)));this.H=this.H&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.D>>8&255,D(this,this.F+R(this)));this.D=this.D&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.D>>8&255,D(this,this.G+R(this)));this.D=this.D&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.D>>
        8&255,D(this,this.H+R(this)));this.D=this.D&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.D>>8&255,D(this,this.D+R(this)));this.D=this.D&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.D>>8&255,D(this,U(this,2)+R(this)));this.D=this.D&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.D>>8&255,E(this,this.L+R(this)));this.D=this.D&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.D>>8&255,D(this,this.K+R(this)));this.D=this.D&-65281|a<<8;this.A-=this.B.I},
        function(a){a=a.call(this,this.D>>8&255,D(this,this.J+R(this)));this.D=this.D&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.F&255,this.F&255);this.F=this.F&-256|a},function(a){a=a.call(this,this.F&255,this.G&255);this.F=this.F&-256|a},function(a){a=a.call(this,this.F&255,this.H&255);this.F=this.F&-256|a},function(a){a=a.call(this,this.F&255,this.D&255);this.F=this.F&-256|a},function(a){a=a.call(this,this.F&255,this.F>>8&255);this.F=this.F&-256|a},function(a){a=a.call(this,this.F&255,
        this.G>>8&255);this.F=this.F&-256|a},function(a){a=a.call(this,this.F&255,this.H>>8&255);this.F=this.F&-256|a},function(a){a=a.call(this,this.F&255,this.D>>8&255);this.F=this.F&-256|a},function(a){a=a.call(this,this.G&255,this.F&255);this.G=this.G&-256|a},function(a){a=a.call(this,this.G&255,this.G&255);this.G=this.G&-256|a},function(a){a=a.call(this,this.G&255,this.H&255);this.G=this.G&-256|a},function(a){a=a.call(this,this.G&255,this.D&255);this.G=this.G&-256|a},function(a){a=a.call(this,this.G&
        255,this.F>>8&255);this.G=this.G&-256|a},function(a){a=a.call(this,this.G&255,this.G>>8&255);this.G=this.G&-256|a},function(a){a=a.call(this,this.G&255,this.H>>8&255);this.G=this.G&-256|a},function(a){a=a.call(this,this.G&255,this.D>>8&255);this.G=this.G&-256|a},function(a){a=a.call(this,this.H&255,this.F&255);this.H=this.H&-256|a},function(a){a=a.call(this,this.H&255,this.G&255);this.H=this.H&-256|a},function(a){a=a.call(this,this.H&255,this.H&255);this.H=this.H&-256|a},function(a){a=a.call(this,
        this.H&255,this.D&255);this.H=this.H&-256|a},function(a){a=a.call(this,this.H&255,this.F>>8&255);this.H=this.H&-256|a},function(a){a=a.call(this,this.H&255,this.G>>8&255);this.H=this.H&-256|a},function(a){a=a.call(this,this.H&255,this.H>>8&255);this.H=this.H&-256|a},function(a){a=a.call(this,this.H&255,this.D>>8&255);this.H=this.H&-256|a},function(a){a=a.call(this,this.D&255,this.F&255);this.D=this.D&-256|a},function(a){a=a.call(this,this.D&255,this.G&255);this.D=this.D&-256|a},function(a){a=a.call(this,
        this.D&255,this.H&255);this.D=this.D&-256|a},function(a){a=a.call(this,this.D&255,this.D&255);this.D=this.D&-256|a},function(a){a=a.call(this,this.D&255,this.F>>8&255);this.D=this.D&-256|a},function(a){a=a.call(this,this.D&255,this.G>>8&255);this.D=this.D&-256|a},function(a){a=a.call(this,this.D&255,this.H>>8&255);this.D=this.D&-256|a},function(a){a=a.call(this,this.D&255,this.D>>8&255);this.D=this.D&-256|a},function(a){a=a.call(this,this.F>>8&255,this.F&255);this.F=this.F&-65281|a<<8},function(a){a=
        a.call(this,this.F>>8&255,this.G&255);this.F=this.F&-65281|a<<8},function(a){a=a.call(this,this.F>>8&255,this.H&255);this.F=this.F&-65281|a<<8},function(a){a=a.call(this,this.F>>8&255,this.D&255);this.F=this.F&-65281|a<<8},function(a){a=a.call(this,this.F>>8&255,this.F>>8&255);this.F=this.F&-65281|a<<8},function(a){a=a.call(this,this.F>>8&255,this.G>>8&255);this.F=this.F&-65281|a<<8},function(a){a=a.call(this,this.F>>8&255,this.H>>8&255);this.F=this.F&-65281|a<<8},function(a){a=a.call(this,this.F>>
        8&255,this.D>>8&255);this.F=this.F&-65281|a<<8},function(a){a=a.call(this,this.G>>8&255,this.F&255);this.G=this.G&-65281|a<<8},function(a){a=a.call(this,this.G>>8&255,this.G&255);this.G=this.G&-65281|a<<8},function(a){a=a.call(this,this.G>>8&255,this.H&255);this.G=this.G&-65281|a<<8},function(a){a=a.call(this,this.G>>8&255,this.D&255);this.G=this.G&-65281|a<<8},function(a){a=a.call(this,this.G>>8&255,this.F>>8&255);this.G=this.G&-65281|a<<8},function(a){a=a.call(this,this.G>>8&255,this.G>>8&255);
        this.G=this.G&-65281|a<<8},function(a){a=a.call(this,this.G>>8&255,this.H>>8&255);this.G=this.G&-65281|a<<8},function(a){a=a.call(this,this.G>>8&255,this.D>>8&255);this.G=this.G&-65281|a<<8},function(a){a=a.call(this,this.H>>8&255,this.F&255);this.H=this.H&-65281|a<<8},function(a){a=a.call(this,this.H>>8&255,this.G&255);this.H=this.H&-65281|a<<8},function(a){a=a.call(this,this.H>>8&255,this.H&255);this.H=this.H&-65281|a<<8},function(a){a=a.call(this,this.H>>8&255,this.D&255);this.H=this.H&-65281|
        a<<8},function(a){a=a.call(this,this.H>>8&255,this.F>>8&255);this.H=this.H&-65281|a<<8},function(a){a=a.call(this,this.H>>8&255,this.G>>8&255);this.H=this.H&-65281|a<<8},function(a){a=a.call(this,this.H>>8&255,this.H>>8&255);this.H=this.H&-65281|a<<8},function(a){a=a.call(this,this.H>>8&255,this.D>>8&255);this.H=this.H&-65281|a<<8},function(a){a=a.call(this,this.D>>8&255,this.F&255);this.D=this.D&-65281|a<<8},function(a){a=a.call(this,this.D>>8&255,this.G&255);this.D=this.D&-65281|a<<8},function(a){a=
        a.call(this,this.D>>8&255,this.H&255);this.D=this.D&-65281|a<<8},function(a){a=a.call(this,this.D>>8&255,this.D&255);this.D=this.D&-65281|a<<8},function(a){a=a.call(this,this.D>>8&255,this.F>>8&255);this.D=this.D&-65281|a<<8},function(a){a=a.call(this,this.D>>8&255,this.G>>8&255);this.D=this.D&-65281|a<<8},function(a){a=a.call(this,this.D>>8&255,this.H>>8&255);this.D=this.D&-65281|a<<8},function(a){a=a.call(this,this.D>>8&255,this.D>>8&255);this.D=this.D&-65281|a<<8}],ve=[function(a){a=a.call(this,
        L(this,this.F),this.F&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,this.G),this.F&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,this.H),this.F&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,this.D),this.F&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,U(this,0)),this.F&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,R(this)),this.F&255);P(this,a);this.A-=this.B.da},function(a){a=a.call(this,L(this,this.K),
        this.F&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,this.J),this.F&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,this.F),this.G&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,this.G),this.G&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,this.H),this.G&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,this.D),this.G&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,U(this,0)),this.G&255);
        P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,R(this)),this.G&255);P(this,a);this.A-=this.B.da},function(a){a=a.call(this,L(this,this.K),this.G&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,this.J),this.G&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,this.F),this.H&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,this.G),this.H&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,this.H),this.H&255);P(this,a);this.A-=
        this.B.N},function(a){a=a.call(this,L(this,this.D),this.H&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,U(this,0)),this.H&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,R(this)),this.H&255);P(this,a);this.A-=this.B.da},function(a){a=a.call(this,L(this,this.K),this.H&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,this.J),this.H&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,this.F),this.D&255);P(this,a);this.A-=this.B.N},
        function(a){a=a.call(this,L(this,this.G),this.D&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,this.H),this.D&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,this.D),this.D&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,U(this,0)),this.D&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,R(this)),this.D&255);P(this,a);this.A-=this.B.da},function(a){a=a.call(this,L(this,this.K),this.D&255);P(this,a);this.A-=this.B.N},function(a){a=
        a.call(this,L(this,this.J),this.D&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,this.F),this.F>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,this.G),this.F>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,this.H),this.F>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,this.D),this.F>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,U(this,0)),this.F>>8&255);P(this,a);this.A-=this.B.N},function(a){a=
        a.call(this,L(this,R(this)),this.F>>8&255);P(this,a);this.A-=this.B.da},function(a){a=a.call(this,L(this,this.K),this.F>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,this.J),this.F>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,this.F),this.G>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,this.G),this.G>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,this.H),this.G>>8&255);P(this,a);this.A-=this.B.N},function(a){a=
        a.call(this,L(this,this.D),this.G>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,U(this,0)),this.G>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,R(this)),this.G>>8&255);P(this,a);this.A-=this.B.da},function(a){a=a.call(this,L(this,this.K),this.G>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,this.J),this.G>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,this.F),this.H>>8&255);P(this,a);this.A-=this.B.N},function(a){a=
        a.call(this,L(this,this.G),this.H>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,this.H),this.H>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,this.D),this.H>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,U(this,0)),this.H>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,R(this)),this.H>>8&255);P(this,a);this.A-=this.B.da},function(a){a=a.call(this,L(this,this.K),this.H>>8&255);P(this,a);this.A-=this.B.N},function(a){a=
        a.call(this,L(this,this.J),this.H>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,this.F),this.D>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,this.G),this.D>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,this.H),this.D>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,this.D),this.D>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,U(this,0)),this.D>>8&255);P(this,a);this.A-=this.B.N},function(a){a=
        a.call(this,L(this,R(this)),this.D>>8&255);P(this,a);this.A-=this.B.da},function(a){a=a.call(this,L(this,this.K),this.D>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,this.J),this.D>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,L(this,this.F+this.M()),this.F&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.G+this.M()),this.F&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.H+this.M()),this.F&255);P(this,a);this.A-=this.B.I},
        function(a){a=a.call(this,L(this,this.D+this.M()),this.F&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,U(this,1)+this.M()),this.F&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.L+this.M()),this.F&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.K+this.M()),this.F&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.J+this.M()),this.F&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.F+this.M()),
        this.G&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.G+this.M()),this.G&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.H+this.M()),this.G&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.D+this.M()),this.G&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,U(this,1)+this.M()),this.G&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.L+this.M()),this.G&255);P(this,a);this.A-=this.B.I},function(a){a=
        a.call(this,L(this,this.K+this.M()),this.G&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.J+this.M()),this.G&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.F+this.M()),this.H&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.G+this.M()),this.H&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.H+this.M()),this.H&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.D+this.M()),this.H&255);P(this,
        a);this.A-=this.B.I},function(a){a=a.call(this,L(this,U(this,1)+this.M()),this.H&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.L+this.M()),this.H&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.K+this.M()),this.H&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.J+this.M()),this.H&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.F+this.M()),this.D&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,
        this.G+this.M()),this.D&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.H+this.M()),this.D&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.D+this.M()),this.D&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,U(this,1)+this.M()),this.D&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.L+this.M()),this.D&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.K+this.M()),this.D&255);P(this,a);this.A-=this.B.I},
        function(a){a=a.call(this,L(this,this.J+this.M()),this.D&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.F+this.M()),this.F>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.G+this.M()),this.F>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.H+this.M()),this.F>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.D+this.M()),this.F>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,U(this,
        1)+this.M()),this.F>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.L+this.M()),this.F>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.K+this.M()),this.F>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.J+this.M()),this.F>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.F+this.M()),this.G>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.G+this.M()),this.G>>8&255);P(this,a);
        this.A-=this.B.I},function(a){a=a.call(this,L(this,this.H+this.M()),this.G>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.D+this.M()),this.G>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,U(this,1)+this.M()),this.G>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.L+this.M()),this.G>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.K+this.M()),this.G>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,
        L(this,this.J+this.M()),this.G>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.F+this.M()),this.H>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.G+this.M()),this.H>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.H+this.M()),this.H>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.D+this.M()),this.H>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,U(this,1)+this.M()),this.H>>8&
        255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.L+this.M()),this.H>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.K+this.M()),this.H>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.J+this.M()),this.H>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.F+this.M()),this.D>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.G+this.M()),this.D>>8&255);P(this,a);this.A-=this.B.I},function(a){a=
        a.call(this,L(this,this.H+this.M()),this.D>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.D+this.M()),this.D>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,U(this,1)+this.M()),this.D>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.L+this.M()),this.D>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.K+this.M()),this.D>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.J+this.M()),
        this.D>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.F+R(this)),this.F&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.G+R(this)),this.F&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.H+R(this)),this.F&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.D+R(this)),this.F&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,U(this,2)+R(this)),this.F&255);P(this,a);this.A-=this.B.I},function(a){a=
        a.call(this,M(this,this.L+R(this)),this.F&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.K+R(this)),this.F&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.J+R(this)),this.F&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.F+R(this)),this.G&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.G+R(this)),this.G&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.H+R(this)),this.G&255);P(this,a);
        this.A-=this.B.I},function(a){a=a.call(this,L(this,this.D+R(this)),this.G&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,U(this,2)+R(this)),this.G&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.L+R(this)),this.G&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.K+R(this)),this.G&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.J+R(this)),this.G&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.F+
        R(this)),this.H&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.G+R(this)),this.H&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.H+R(this)),this.H&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.D+R(this)),this.H&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,U(this,2)+R(this)),this.H&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.L+R(this)),this.H&255);P(this,a);this.A-=this.B.I},function(a){a=
        a.call(this,L(this,this.K+R(this)),this.H&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.J+R(this)),this.H&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.F+R(this)),this.D&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.G+R(this)),this.D&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.H+R(this)),this.D&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.D+R(this)),this.D&255);P(this,a);
        this.A-=this.B.I},function(a){a=a.call(this,L(this,U(this,2)+R(this)),this.D&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.L+R(this)),this.D&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.K+R(this)),this.D&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.J+R(this)),this.D&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.F+R(this)),this.F>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,
        this.G+R(this)),this.F>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.H+R(this)),this.F>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.D+R(this)),this.F>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,U(this,2)+R(this)),this.F>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.L+R(this)),this.F>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.K+R(this)),this.F>>8&255);P(this,
        a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.J+R(this)),this.F>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.F+R(this)),this.G>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.G+R(this)),this.G>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.H+R(this)),this.G>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.D+R(this)),this.G>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,
        L(this,U(this,2)+R(this)),this.G>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.L+R(this)),this.G>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.K+R(this)),this.G>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.J+R(this)),this.G>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.F+R(this)),this.H>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.G+R(this)),this.H>>8&255);
        P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.H+R(this)),this.H>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.D+R(this)),this.H>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,U(this,2)+R(this)),this.H>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.L+R(this)),this.H>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.K+R(this)),this.H>>8&255);P(this,a);this.A-=this.B.I},function(a){a=
        a.call(this,L(this,this.J+R(this)),this.H>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.F+R(this)),this.D>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.G+R(this)),this.D>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.H+R(this)),this.D>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.D+R(this)),this.D>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,U(this,2)+R(this)),this.D>>
        8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.L+R(this)),this.D>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.K+R(this)),this.D>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,L(this,this.J+R(this)),this.D>>8&255);P(this,a);this.A-=this.B.I},A[192],A[200],A[208],A[216],A[224],A[232],A[240],A[248],A[193],A[201],A[209],A[217],A[225],A[233],A[241],A[249],A[194],A[202],A[210],A[218],A[226],A[234],A[242],A[250],A[195],A[203],A[211],A[219],
        A[227],A[235],A[243],A[251],A[196],A[204],A[212],A[220],A[228],A[236],A[244],A[252],A[197],A[205],A[213],A[221],A[229],A[237],A[245],A[253],A[198],A[206],A[214],A[222],A[230],A[238],A[246],A[254],A[199],A[207],A[215],A[223],A[231],A[239],A[247],A[255]],we=[function(a,b){var c=a[0].call(this,L(this,this.F),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[0].call(this,L(this,this.G),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[0].call(this,L(this,this.H),b.call(this));
        P(this,c);this.A-=this.B.N},function(a,b){var c=a[0].call(this,L(this,this.D),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[0].call(this,L(this,U(this,0)),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[0].call(this,L(this,R(this)),b.call(this));P(this,c);this.A-=this.B.da},function(a,b){var c=a[0].call(this,L(this,this.K),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[0].call(this,L(this,this.J),b.call(this));P(this,c);this.A-=this.B.N},function(a,
        b){var c=a[1].call(this,L(this,this.F),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[1].call(this,L(this,this.G),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[1].call(this,L(this,this.H),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[1].call(this,L(this,this.D),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[1].call(this,L(this,U(this,0)),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[1].call(this,L(this,R(this)),
        b.call(this));P(this,c);this.A-=this.B.da},function(a,b){var c=a[1].call(this,L(this,this.K),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[1].call(this,L(this,this.J),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[2].call(this,L(this,this.F),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[2].call(this,L(this,this.G),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[2].call(this,L(this,this.H),b.call(this));P(this,c);this.A-=this.B.N},
        function(a,b){var c=a[2].call(this,L(this,this.D),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[2].call(this,L(this,U(this,0)),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[2].call(this,L(this,R(this)),b.call(this));P(this,c);this.A-=this.B.da},function(a,b){var c=a[2].call(this,L(this,this.K),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[2].call(this,L(this,this.J),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[3].call(this,L(this,
        this.F),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[3].call(this,L(this,this.G),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[3].call(this,L(this,this.H),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[3].call(this,L(this,this.D),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[3].call(this,L(this,U(this,0)),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[3].call(this,L(this,R(this)),b.call(this));P(this,c);this.A-=
        this.B.da},function(a,b){var c=a[3].call(this,L(this,this.K),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[3].call(this,L(this,this.J),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[4].call(this,L(this,this.F),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[4].call(this,L(this,this.G),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[4].call(this,L(this,this.H),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[4].call(this,
        L(this,this.D),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[4].call(this,L(this,U(this,0)),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[4].call(this,L(this,R(this)),b.call(this));P(this,c);this.A-=this.B.da},function(a,b){var c=a[4].call(this,L(this,this.K),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[4].call(this,L(this,this.J),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[5].call(this,L(this,this.F),b.call(this));P(this,
        c);this.A-=this.B.N},function(a,b){var c=a[5].call(this,L(this,this.G),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[5].call(this,L(this,this.H),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[5].call(this,L(this,this.D),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[5].call(this,L(this,U(this,0)),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[5].call(this,L(this,R(this)),b.call(this));P(this,c);this.A-=this.B.da},function(a,b){var c=
        a[5].call(this,L(this,this.K),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[5].call(this,L(this,this.J),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[6].call(this,L(this,this.F),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[6].call(this,L(this,this.G),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[6].call(this,L(this,this.H),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[6].call(this,L(this,this.D),b.call(this));
        P(this,c);this.A-=this.B.N},function(a,b){var c=a[6].call(this,L(this,U(this,0)),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[6].call(this,L(this,R(this)),b.call(this));P(this,c);this.A-=this.B.da},function(a,b){var c=a[6].call(this,L(this,this.K),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[6].call(this,L(this,this.J),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[7].call(this,L(this,this.F),b.call(this));P(this,c);this.A-=this.B.N},function(a,
        b){var c=a[7].call(this,L(this,this.G),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[7].call(this,L(this,this.H),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[7].call(this,L(this,this.D),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[7].call(this,L(this,U(this,0)),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[7].call(this,L(this,R(this)),b.call(this));P(this,c);this.A-=this.B.da},function(a,b){var c=a[7].call(this,L(this,this.K),
        b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[7].call(this,L(this,this.J),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[0].call(this,L(this,this.F+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,L(this,this.G+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,L(this,this.H+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,L(this,this.D+this.M()),b.call(this));
        P(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,L(this,U(this,1)+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,M(this,this.L+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,L(this,this.K+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,L(this,this.J+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,L(this,this.F+this.M()),b.call(this));
        P(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,L(this,this.G+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,L(this,this.H+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,L(this,this.D+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,L(this,U(this,1)+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,M(this,this.L+this.M()),b.call(this));
        P(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,L(this,this.K+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,L(this,this.J+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,L(this,this.F+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,L(this,this.G+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,L(this,this.H+this.M()),b.call(this));
        P(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,L(this,this.D+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,L(this,U(this,1)+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,M(this,this.L+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,L(this,this.K+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,L(this,this.J+this.M()),b.call(this));
        P(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,L(this,this.F+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,L(this,this.G+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,L(this,this.H+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,L(this,this.D+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,L(this,U(this,1)+this.M()),b.call(this));
        P(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,M(this,this.L+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,L(this,this.K+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,L(this,this.J+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,L(this,this.F+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,L(this,this.G+this.M()),b.call(this));
        P(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,L(this,this.H+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,L(this,this.D+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,L(this,U(this,1)+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,M(this,this.L+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,L(this,this.K+this.M()),b.call(this));
        P(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,L(this,this.J+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,L(this,this.F+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,L(this,this.G+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,L(this,this.H+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,L(this,this.D+this.M()),b.call(this));
        P(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,L(this,U(this,1)+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,M(this,this.L+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,L(this,this.K+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,L(this,this.J+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,L(this,this.F+this.M()),b.call(this));
        P(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,L(this,this.G+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,L(this,this.H+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,L(this,this.D+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,L(this,U(this,1)+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,M(this,this.L+this.M()),b.call(this));
        P(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,L(this,this.K+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,L(this,this.J+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,L(this,this.F+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,L(this,this.G+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,L(this,this.H+this.M()),b.call(this));
        P(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,L(this,this.D+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,L(this,U(this,1)+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,M(this,this.L+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,L(this,this.K+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,L(this,this.J+this.M()),b.call(this));
        P(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,L(this,this.F+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,L(this,this.G+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,L(this,this.H+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,L(this,this.D+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,L(this,U(this,2)+R(this)),b.call(this));
        P(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,M(this,this.L+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,L(this,this.K+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,L(this,this.J+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,L(this,this.F+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,L(this,this.G+R(this)),b.call(this));P(this,
        c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,L(this,this.H+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,L(this,this.D+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,L(this,U(this,2)+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,M(this,this.L+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,L(this,this.K+R(this)),b.call(this));P(this,
        c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,L(this,this.J+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,L(this,this.F+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,L(this,this.G+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,L(this,this.H+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,L(this,this.D+R(this)),b.call(this));P(this,c);
        this.A-=this.B.I},function(a,b){var c=a[2].call(this,L(this,U(this,2)+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,M(this,this.L+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,L(this,this.K+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,L(this,this.J+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,L(this,this.F+R(this)),b.call(this));P(this,c);
        this.A-=this.B.I},function(a,b){var c=a[3].call(this,L(this,this.G+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,L(this,this.H+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,L(this,this.D+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,L(this,U(this,2)+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,M(this,this.L+R(this)),b.call(this));P(this,c);
        this.A-=this.B.I},function(a,b){var c=a[3].call(this,L(this,this.K+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,L(this,this.J+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,L(this,this.F+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,L(this,this.G+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,L(this,this.H+R(this)),b.call(this));P(this,c);this.A-=
        this.B.I},function(a,b){var c=a[4].call(this,L(this,this.D+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,L(this,U(this,2)+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,M(this,this.L+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,L(this,this.K+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,L(this,this.J+R(this)),b.call(this));P(this,c);this.A-=
        this.B.I},function(a,b){var c=a[5].call(this,L(this,this.F+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,L(this,this.G+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,L(this,this.H+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,L(this,this.D+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,L(this,U(this,2)+R(this)),b.call(this));P(this,c);this.A-=
        this.B.I},function(a,b){var c=a[5].call(this,M(this,this.L+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,L(this,this.K+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,L(this,this.J+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,L(this,this.F+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,L(this,this.G+R(this)),b.call(this));P(this,c);this.A-=this.B.I},
        function(a,b){var c=a[6].call(this,L(this,this.H+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,L(this,this.D+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,L(this,U(this,2)+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,M(this,this.L+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,L(this,this.K+R(this)),b.call(this));P(this,c);this.A-=this.B.I},
        function(a,b){var c=a[6].call(this,L(this,this.J+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,L(this,this.F+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,L(this,this.G+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,L(this,this.H+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,L(this,this.D+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,
        b){var c=a[7].call(this,L(this,U(this,2)+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,M(this,this.L+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,L(this,this.K+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,L(this,this.J+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,this.F&255,b.call(this));this.F=this.F&-256|c},function(a,b){var c=a[0].call(this,
        this.G&255,b.call(this));this.G=this.G&-256|c},function(a,b){var c=a[0].call(this,this.H&255,b.call(this));this.H=this.H&-256|c},function(a,b){var c=a[0].call(this,this.D&255,b.call(this));this.D=this.D&-256|c},function(a,b){var c=a[0].call(this,this.F>>8&255,b.call(this));this.F=this.F&-65281|c<<8},function(a,b){var c=a[0].call(this,this.G>>8&255,b.call(this));this.G=this.G&-65281|c<<8},function(a,b){var c=a[0].call(this,this.H>>8&255,b.call(this));this.H=this.H&-65281|c<<8},function(a,b){var c=
        a[0].call(this,this.D>>8&255,b.call(this));this.D=this.D&-65281|c<<8},function(a,b){var c=a[1].call(this,this.F&255,b.call(this));this.F=this.F&-256|c},function(a,b){var c=a[1].call(this,this.G&255,b.call(this));this.G=this.G&-256|c},function(a,b){var c=a[1].call(this,this.H&255,b.call(this));this.H=this.H&-256|c},function(a,b){var c=a[1].call(this,this.D&255,b.call(this));this.D=this.D&-256|c},function(a,b){var c=a[1].call(this,this.F>>8&255,b.call(this));this.F=this.F&-65281|c<<8},function(a,b){var c=
        a[1].call(this,this.G>>8&255,b.call(this));this.G=this.G&-65281|c<<8},function(a,b){var c=a[1].call(this,this.H>>8&255,b.call(this));this.H=this.H&-65281|c<<8},function(a,b){var c=a[1].call(this,this.D>>8&255,b.call(this));this.D=this.D&-65281|c<<8},function(a,b){var c=a[2].call(this,this.F&255,b.call(this));this.F=this.F&-256|c},function(a,b){var c=a[2].call(this,this.G&255,b.call(this));this.G=this.G&-256|c},function(a,b){var c=a[2].call(this,this.H&255,b.call(this));this.H=this.H&-256|c},function(a,
        b){var c=a[2].call(this,this.D&255,b.call(this));this.D=this.D&-256|c},function(a,b){var c=a[2].call(this,this.F>>8&255,b.call(this));this.F=this.F&-65281|c<<8},function(a,b){var c=a[2].call(this,this.G>>8&255,b.call(this));this.G=this.G&-65281|c<<8},function(a,b){var c=a[2].call(this,this.H>>8&255,b.call(this));this.H=this.H&-65281|c<<8},function(a,b){var c=a[2].call(this,this.D>>8&255,b.call(this));this.D=this.D&-65281|c<<8},function(a,b){var c=a[3].call(this,this.F&255,b.call(this));this.F=this.F&
        -256|c},function(a,b){var c=a[3].call(this,this.G&255,b.call(this));this.G=this.G&-256|c},function(a,b){var c=a[3].call(this,this.H&255,b.call(this));this.H=this.H&-256|c},function(a,b){var c=a[3].call(this,this.D&255,b.call(this));this.D=this.D&-256|c},function(a,b){var c=a[3].call(this,this.F>>8&255,b.call(this));this.F=this.F&-65281|c<<8},function(a,b){var c=a[3].call(this,this.G>>8&255,b.call(this));this.G=this.G&-65281|c<<8},function(a,b){var c=a[3].call(this,this.H>>8&255,b.call(this));this.H=
        this.H&-65281|c<<8},function(a,b){var c=a[3].call(this,this.D>>8&255,b.call(this));this.D=this.D&-65281|c<<8},function(a,b){var c=a[4].call(this,this.F&255,b.call(this));this.F=this.F&-256|c},function(a,b){var c=a[4].call(this,this.G&255,b.call(this));this.G=this.G&-256|c},function(a,b){var c=a[4].call(this,this.H&255,b.call(this));this.H=this.H&-256|c},function(a,b){var c=a[4].call(this,this.D&255,b.call(this));this.D=this.D&-256|c},function(a,b){var c=a[4].call(this,this.F>>8&255,b.call(this));
        this.F=this.F&-65281|c<<8},function(a,b){var c=a[4].call(this,this.G>>8&255,b.call(this));this.G=this.G&-65281|c<<8},function(a,b){var c=a[4].call(this,this.H>>8&255,b.call(this));this.H=this.H&-65281|c<<8},function(a,b){var c=a[4].call(this,this.D>>8&255,b.call(this));this.D=this.D&-65281|c<<8},function(a,b){var c=a[5].call(this,this.F&255,b.call(this));this.F=this.F&-256|c},function(a,b){var c=a[5].call(this,this.G&255,b.call(this));this.G=this.G&-256|c},function(a,b){var c=a[5].call(this,this.H&
        255,b.call(this));this.H=this.H&-256|c},function(a,b){var c=a[5].call(this,this.D&255,b.call(this));this.D=this.D&-256|c},function(a,b){var c=a[5].call(this,this.F>>8&255,b.call(this));this.F=this.F&-65281|c<<8},function(a,b){var c=a[5].call(this,this.G>>8&255,b.call(this));this.G=this.G&-65281|c<<8},function(a,b){var c=a[5].call(this,this.H>>8&255,b.call(this));this.H=this.H&-65281|c<<8},function(a,b){var c=a[5].call(this,this.D>>8&255,b.call(this));this.D=this.D&-65281|c<<8},function(a,b){var c=
        a[6].call(this,this.F&255,b.call(this));this.F=this.F&-256|c},function(a,b){var c=a[6].call(this,this.G&255,b.call(this));this.G=this.G&-256|c},function(a,b){var c=a[6].call(this,this.H&255,b.call(this));this.H=this.H&-256|c},function(a,b){var c=a[6].call(this,this.D&255,b.call(this));this.D=this.D&-256|c},function(a,b){var c=a[6].call(this,this.F>>8&255,b.call(this));this.F=this.F&-65281|c<<8},function(a,b){var c=a[6].call(this,this.G>>8&255,b.call(this));this.G=this.G&-65281|c<<8},function(a,b){var c=
        a[6].call(this,this.H>>8&255,b.call(this));this.H=this.H&-65281|c<<8},function(a,b){var c=a[6].call(this,this.D>>8&255,b.call(this));this.D=this.D&-65281|c<<8},function(a,b){var c=a[7].call(this,this.F&255,b.call(this));this.F=this.F&-256|c},function(a,b){var c=a[7].call(this,this.G&255,b.call(this));this.G=this.G&-256|c},function(a,b){var c=a[7].call(this,this.H&255,b.call(this));this.H=this.H&-256|c},function(a,b){var c=a[7].call(this,this.D&255,b.call(this));this.D=this.D&-256|c},function(a,b){var c=
        a[7].call(this,this.F>>8&255,b.call(this));this.F=this.F&-65281|c<<8},function(a,b){var c=a[7].call(this,this.G>>8&255,b.call(this));this.G=this.G&-65281|c<<8},function(a,b){var c=a[7].call(this,this.H>>8&255,b.call(this));this.H=this.H&-65281|c<<8},function(a,b){var c=a[7].call(this,this.D>>8&255,b.call(this));this.D=this.D&-65281|c<<8}],B=[function(a){a=a.call(this,this.F&this.C,G(this,this.F));this.F=this.F&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.F&this.C,G(this,this.G));this.F=
        this.F&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.F&this.C,G(this,this.H));this.F=this.F&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.F&this.C,G(this,this.D));this.F=this.F&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.F&this.C,G(this,U(this,0)));this.F=this.F&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.F&this.C,G(this,R(this)));this.F=this.F&~this.C|a;this.A-=this.B.da},function(a){a=a.call(this,this.F&this.C,G(this,this.K));this.F=this.F&
        ~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.F&this.C,G(this,this.J));this.F=this.F&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.G&this.C,G(this,this.F));this.G=this.G&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.G&this.C,G(this,this.G));this.G=this.G&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.G&this.C,G(this,this.H));this.G=this.G&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.G&this.C,G(this,this.D));this.G=this.G&~this.C|a;this.A-=
        this.B.N},function(a){a=a.call(this,this.G&this.C,G(this,U(this,0)));this.G=this.G&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.G&this.C,G(this,R(this)));this.G=this.G&~this.C|a;this.A-=this.B.da},function(a){a=a.call(this,this.G&this.C,G(this,this.K));this.G=this.G&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.G&this.C,G(this,this.J));this.G=this.G&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.H&this.C,G(this,this.F));this.H=this.H&~this.C|a;this.A-=this.B.N},
        function(a){a=a.call(this,this.H&this.C,G(this,this.G));this.H=this.H&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.H&this.C,G(this,this.H));this.H=this.H&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.H&this.C,G(this,this.D));this.H=this.H&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.H&this.C,G(this,U(this,0)));this.H=this.H&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.H&this.C,G(this,R(this)));this.H=this.H&~this.C|a;this.A-=this.B.da},function(a){a=
        a.call(this,this.H&this.C,G(this,this.K));this.H=this.H&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.H&this.C,G(this,this.J));this.H=this.H&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.D&this.C,G(this,this.F));this.D=this.D&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.D&this.C,G(this,this.G));this.D=this.D&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.D&this.C,G(this,this.H));this.D=this.D&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,
        this.D&this.C,G(this,this.D));this.D=this.D&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.D&this.C,G(this,U(this,0)));this.D=this.D&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.D&this.C,G(this,R(this)));this.D=this.D&~this.C|a;this.A-=this.B.da},function(a){a=a.call(this,this.D&this.C,G(this,this.K));this.D=this.D&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.D&this.C,G(this,this.J));this.D=this.D&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,r(this)&
        this.C,G(this,this.F));u(this,r(this)&~this.C|a);this.A-=this.B.N},function(a){a=a.call(this,r(this)&this.C,G(this,this.G));u(this,r(this)&~this.C|a);this.A-=this.B.N},function(a){a=a.call(this,r(this)&this.C,G(this,this.H));u(this,r(this)&~this.C|a);this.A-=this.B.N},function(a){a=a.call(this,r(this)&this.C,G(this,this.D));u(this,r(this)&~this.C|a);this.A-=this.B.N},function(a){a=a.call(this,r(this)&this.C,G(this,U(this,0)));u(this,r(this)&~this.C|a);this.A-=this.B.N},function(a){a=a.call(this,r(this)&
        this.C,G(this,R(this)));u(this,r(this)&~this.C|a);this.A-=this.B.da},function(a){a=a.call(this,r(this)&this.C,G(this,this.K));u(this,r(this)&~this.C|a);this.A-=this.B.N},function(a){a=a.call(this,r(this)&this.C,G(this,this.J));u(this,r(this)&~this.C|a);this.A-=this.B.N},function(a){a=a.call(this,this.L&this.C,G(this,this.F));this.L=this.L&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.L&this.C,G(this,this.G));this.L=this.L&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.L&this.C,
        G(this,this.H));this.L=this.L&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.L&this.C,G(this,this.D));this.L=this.L&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.L&this.C,G(this,U(this,0)));this.L=this.L&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.L&this.C,G(this,R(this)));this.L=this.L&~this.C|a;this.A-=this.B.da},function(a){a=a.call(this,this.L&this.C,G(this,this.K));this.L=this.L&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.L&this.C,G(this,
        this.J));this.L=this.L&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.K&this.C,G(this,this.F));this.K=this.K&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.K&this.C,G(this,this.G));this.K=this.K&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.K&this.C,G(this,this.H));this.K=this.K&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.K&this.C,G(this,this.D));this.K=this.K&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.K&this.C,G(this,U(this,0)));
        this.K=this.K&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.K&this.C,G(this,R(this)));this.K=this.K&~this.C|a;this.A-=this.B.da},function(a){a=a.call(this,this.K&this.C,G(this,this.K));this.K=this.K&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.K&this.C,G(this,this.J));this.K=this.K&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.J&this.C,G(this,this.F));this.J=this.J&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.J&this.C,G(this,this.G));this.J=this.J&
        ~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.J&this.C,G(this,this.H));this.J=this.J&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.J&this.C,G(this,this.D));this.J=this.J&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.J&this.C,G(this,U(this,0)));this.J=this.J&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.J&this.C,G(this,R(this)));this.J=this.J&~this.C|a;this.A-=this.B.da},function(a){a=a.call(this,this.J&this.C,G(this,this.K));this.J=this.J&~this.C|
        a;this.A-=this.B.N},function(a){a=a.call(this,this.J&this.C,G(this,this.J));this.J=this.J&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.F&this.C,G(this,this.F+this.M()));this.F=this.F&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&this.C,G(this,this.G+this.M()));this.F=this.F&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&this.C,G(this,this.H+this.M()));this.F=this.F&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&this.C,G(this,this.D+this.M()));
        this.F=this.F&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&this.C,G(this,U(this,1)+this.M()));this.F=this.F&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&this.C,H(this,this.L+this.M()));this.F=this.F&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&this.C,G(this,this.K+this.M()));this.F=this.F&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&this.C,G(this,this.J+this.M()));this.F=this.F&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&
        this.C,G(this,this.F+this.M()));this.G=this.G&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&this.C,G(this,this.G+this.M()));this.G=this.G&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&this.C,G(this,this.H+this.M()));this.G=this.G&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&this.C,G(this,this.D+this.M()));this.G=this.G&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&this.C,G(this,U(this,1)+this.M()));this.G=this.G&~this.C|a;this.A-=this.B.I},
        function(a){a=a.call(this,this.G&this.C,H(this,this.L+this.M()));this.G=this.G&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&this.C,G(this,this.K+this.M()));this.G=this.G&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&this.C,G(this,this.J+this.M()));this.G=this.G&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&this.C,G(this,this.F+this.M()));this.H=this.H&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&this.C,G(this,this.G+this.M()));this.H=this.H&
        ~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&this.C,G(this,this.H+this.M()));this.H=this.H&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&this.C,G(this,this.D+this.M()));this.H=this.H&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&this.C,G(this,U(this,1)+this.M()));this.H=this.H&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&this.C,H(this,this.L+this.M()));this.H=this.H&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&this.C,G(this,
        this.K+this.M()));this.H=this.H&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&this.C,G(this,this.J+this.M()));this.H=this.H&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&this.C,G(this,this.F+this.M()));this.D=this.D&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&this.C,G(this,this.G+this.M()));this.D=this.D&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&this.C,G(this,this.H+this.M()));this.D=this.D&~this.C|a;this.A-=this.B.I},function(a){a=
        a.call(this,this.D&this.C,G(this,this.D+this.M()));this.D=this.D&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&this.C,G(this,U(this,1)+this.M()));this.D=this.D&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&this.C,H(this,this.L+this.M()));this.D=this.D&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&this.C,G(this,this.K+this.M()));this.D=this.D&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&this.C,G(this,this.J+this.M()));this.D=this.D&~this.C|
        a;this.A-=this.B.I},function(a){a=a.call(this,r(this)&this.C,G(this,this.F+this.M()));u(this,r(this)&~this.C|a);this.A-=this.B.I},function(a){a=a.call(this,r(this)&this.C,G(this,this.G+this.M()));u(this,r(this)&~this.C|a);this.A-=this.B.I},function(a){a=a.call(this,r(this)&this.C,G(this,this.H+this.M()));u(this,r(this)&~this.C|a);this.A-=this.B.I},function(a){a=a.call(this,r(this)&this.C,G(this,this.D+this.M()));u(this,r(this)&~this.C|a);this.A-=this.B.I},function(a){a=a.call(this,r(this)&this.C,
        G(this,U(this,1)+this.M()));u(this,r(this)&~this.C|a);this.A-=this.B.I},function(a){a=a.call(this,r(this)&this.C,H(this,this.L+this.M()));u(this,r(this)&~this.C|a);this.A-=this.B.I},function(a){a=a.call(this,r(this)&this.C,G(this,this.K+this.M()));u(this,r(this)&~this.C|a);this.A-=this.B.I},function(a){a=a.call(this,r(this)&this.C,G(this,this.J+this.M()));u(this,r(this)&~this.C|a);this.A-=this.B.I},function(a){a=a.call(this,this.L&this.C,G(this,this.F+this.M()));this.L=this.L&~this.C|a;this.A-=this.B.I},
        function(a){a=a.call(this,this.L&this.C,G(this,this.G+this.M()));this.L=this.L&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.L&this.C,G(this,this.H+this.M()));this.L=this.L&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.L&this.C,G(this,this.D+this.M()));this.L=this.L&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.L&this.C,G(this,U(this,1)+this.M()));this.L=this.L&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.L&this.C,H(this,this.L+this.M()));this.L=
        this.L&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.L&this.C,G(this,this.K+this.M()));this.L=this.L&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.L&this.C,G(this,this.J+this.M()));this.L=this.L&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.K&this.C,G(this,this.F+this.M()));this.K=this.K&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.K&this.C,G(this,this.G+this.M()));this.K=this.K&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.K&this.C,
        G(this,this.H+this.M()));this.K=this.K&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.K&this.C,G(this,this.D+this.M()));this.K=this.K&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.K&this.C,G(this,U(this,1)+this.M()));this.K=this.K&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.K&this.C,H(this,this.L+this.M()));this.K=this.K&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.K&this.C,G(this,this.K+this.M()));this.K=this.K&~this.C|a;this.A-=this.B.I},function(a){a=
        a.call(this,this.K&this.C,G(this,this.J+this.M()));this.K=this.K&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.J&this.C,G(this,this.F+this.M()));this.J=this.J&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.J&this.C,G(this,this.G+this.M()));this.J=this.J&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.J&this.C,G(this,this.H+this.M()));this.J=this.J&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.J&this.C,G(this,this.D+this.M()));this.J=this.J&~this.C|
        a;this.A-=this.B.I},function(a){a=a.call(this,this.J&this.C,G(this,U(this,1)+this.M()));this.J=this.J&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.J&this.C,H(this,this.L+this.M()));this.J=this.J&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.J&this.C,G(this,this.K+this.M()));this.J=this.J&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.J&this.C,G(this,this.J+this.M()));this.J=this.J&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&this.C,G(this,this.F+
        R(this)));this.F=this.F&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&this.C,G(this,this.G+R(this)));this.F=this.F&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&this.C,G(this,this.H+R(this)));this.F=this.F&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&this.C,G(this,this.D+R(this)));this.F=this.F&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&this.C,G(this,U(this,2)+R(this)));this.F=this.F&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,
        this.F&this.C,H(this,this.L+R(this)));this.F=this.F&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&this.C,G(this,this.K+R(this)));this.F=this.F&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&this.C,G(this,this.J+R(this)));this.F=this.F&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&this.C,G(this,this.F+R(this)));this.G=this.G&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&this.C,G(this,this.G+R(this)));this.G=this.G&~this.C|a;this.A-=this.B.I},
        function(a){a=a.call(this,this.G&this.C,G(this,this.H+R(this)));this.G=this.G&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&this.C,G(this,this.D+R(this)));this.G=this.G&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&this.C,G(this,U(this,2)+R(this)));this.G=this.G&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&this.C,H(this,this.L+R(this)));this.G=this.G&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&this.C,G(this,this.K+R(this)));this.G=this.G&
        ~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&this.C,G(this,this.J+R(this)));this.G=this.G&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&this.C,G(this,this.F+R(this)));this.H=this.H&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&this.C,G(this,this.G+R(this)));this.H=this.H&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&this.C,G(this,this.H+R(this)));this.H=this.H&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&this.C,G(this,this.D+
        R(this)));this.H=this.H&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&this.C,G(this,U(this,2)+R(this)));this.H=this.H&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&this.C,H(this,this.L+R(this)));this.H=this.H&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&this.C,G(this,this.K+R(this)));this.H=this.H&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&this.C,G(this,this.J+R(this)));this.H=this.H&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,
        this.D&this.C,G(this,this.F+R(this)));this.D=this.D&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&this.C,G(this,this.G+R(this)));this.D=this.D&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&this.C,G(this,this.H+R(this)));this.D=this.D&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&this.C,G(this,this.D+R(this)));this.D=this.D&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&this.C,G(this,U(this,2)+R(this)));this.D=this.D&~this.C|a;this.A-=this.B.I},
        function(a){a=a.call(this,this.D&this.C,H(this,this.L+R(this)));this.D=this.D&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&this.C,G(this,this.K+R(this)));this.D=this.D&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&this.C,G(this,this.J+R(this)));this.D=this.D&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,r(this)&this.C,G(this,this.F+R(this)));u(this,r(this)&~this.C|a);this.A-=this.B.I},function(a){a=a.call(this,r(this)&this.C,G(this,this.G+R(this)));u(this,r(this)&
        ~this.C|a);this.A-=this.B.I},function(a){a=a.call(this,r(this)&this.C,G(this,this.H+R(this)));u(this,r(this)&~this.C|a);this.A-=this.B.I},function(a){a=a.call(this,r(this)&this.C,G(this,this.D+R(this)));u(this,r(this)&~this.C|a);this.A-=this.B.I},function(a){a=a.call(this,r(this)&this.C,G(this,U(this,2)+R(this)));u(this,r(this)&~this.C|a);this.A-=this.B.I},function(a){a=a.call(this,r(this)&this.C,H(this,this.L+R(this)));u(this,r(this)&~this.C|a);this.A-=this.B.I},function(a){a=a.call(this,r(this)&
        this.C,G(this,this.K+R(this)));u(this,r(this)&~this.C|a);this.A-=this.B.I},function(a){a=a.call(this,r(this)&this.C,G(this,this.J+R(this)));u(this,r(this)&~this.C|a);this.A-=this.B.I},function(a){a=a.call(this,this.L&this.C,G(this,this.F+R(this)));this.L=this.L&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.L&this.C,G(this,this.G+R(this)));this.L=this.L&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.L&this.C,G(this,this.H+R(this)));this.L=this.L&~this.C|a;this.A-=this.B.I},
        function(a){a=a.call(this,this.L&this.C,G(this,this.D+R(this)));this.L=this.L&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.L&this.C,G(this,U(this,2)+R(this)));this.L=this.L&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.L&this.C,H(this,this.L+R(this)));this.L=this.L&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.L&this.C,G(this,this.K+R(this)));this.L=this.L&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.L&this.C,G(this,this.J+R(this)));this.L=this.L&
        ~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.K&this.C,G(this,this.F+R(this)));this.K=this.K&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.K&this.C,G(this,this.G+R(this)));this.K=this.K&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.K&this.C,G(this,this.H+R(this)));this.K=this.K&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.K&this.C,G(this,this.D+R(this)));this.K=this.K&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.K&this.C,G(this,U(this,
        2)+R(this)));this.K=this.K&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.K&this.C,H(this,this.L+R(this)));this.K=this.K&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.K&this.C,G(this,this.K+R(this)));this.K=this.K&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.K&this.C,G(this,this.J+R(this)));this.K=this.K&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.J&this.C,G(this,this.F+R(this)));this.J=this.J&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,
        this.J&this.C,G(this,this.G+R(this)));this.J=this.J&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.J&this.C,G(this,this.H+R(this)));this.J=this.J&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.J&this.C,G(this,this.D+R(this)));this.J=this.J&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.J&this.C,G(this,U(this,2)+R(this)));this.J=this.J&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.J&this.C,H(this,this.L+R(this)));this.J=this.J&~this.C|a;this.A-=this.B.I},
        function(a){a=a.call(this,this.J&this.C,G(this,this.K+R(this)));this.J=this.J&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.J&this.C,G(this,this.J+R(this)));this.J=this.J&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&this.C,this.F&this.C);this.F=this.F&~this.C|a},function(a){a=a.call(this,this.F&this.C,this.G&this.C);this.F=this.F&~this.C|a},function(a){a=a.call(this,this.F&this.C,this.H&this.C);this.F=this.F&~this.C|a},function(a){a=a.call(this,this.F&this.C,this.D&this.C);
        this.F=this.F&~this.C|a},function(a){a=a.call(this,this.F&this.C,r(this)&this.C);this.F=this.F&~this.C|a},function(a){a=a.call(this,this.F&this.C,this.L&this.C);this.F=this.F&~this.C|a},function(a){a=a.call(this,this.F&this.C,this.K&this.C);this.F=this.F&~this.C|a},function(a){a=a.call(this,this.F&this.C,this.J&this.C);this.F=this.F&~this.C|a},function(a){a=a.call(this,this.G&this.C,this.F&this.C);this.G=this.G&~this.C|a},function(a){a=a.call(this,this.G&this.C,this.G&this.C);this.G=this.G&~this.C|
        a},function(a){a=a.call(this,this.G&this.C,this.H&this.C);this.G=this.G&~this.C|a},function(a){a=a.call(this,this.G&this.C,this.D&this.C);this.G=this.G&~this.C|a},function(a){a=a.call(this,this.G&this.C,r(this)&this.C);this.G=this.G&~this.C|a},function(a){a=a.call(this,this.G&this.C,this.L&this.C);this.G=this.G&~this.C|a},function(a){a=a.call(this,this.G&this.C,this.K&this.C);this.G=this.G&~this.C|a},function(a){a=a.call(this,this.G&this.C,this.J&this.C);this.G=this.G&~this.C|a},function(a){a=a.call(this,
        this.H&this.C,this.F&this.C);this.H=this.H&~this.C|a},function(a){a=a.call(this,this.H&this.C,this.G&this.C);this.H=this.H&~this.C|a},function(a){a=a.call(this,this.H&this.C,this.H&this.C);this.H=this.H&~this.C|a},function(a){a=a.call(this,this.H&this.C,this.D&this.C);this.H=this.H&~this.C|a},function(a){a=a.call(this,this.H&this.C,r(this)&this.C);this.H=this.H&~this.C|a},function(a){a=a.call(this,this.H&this.C,this.L&this.C);this.H=this.H&~this.C|a},function(a){a=a.call(this,this.H&this.C,this.K&
        this.C);this.H=this.H&~this.C|a},function(a){a=a.call(this,this.H&this.C,this.J&this.C);this.H=this.H&~this.C|a},function(a){a=a.call(this,this.D&this.C,this.F&this.C);this.D=this.D&~this.C|a},function(a){a=a.call(this,this.D&this.C,this.G&this.C);this.D=this.D&~this.C|a},function(a){a=a.call(this,this.D&this.C,this.H&this.C);this.D=this.D&~this.C|a},function(a){a=a.call(this,this.D&this.C,this.D&this.C);this.D=this.D&~this.C|a},function(a){a=a.call(this,this.D&this.C,r(this)&this.C);this.D=this.D&
        ~this.C|a},function(a){a=a.call(this,this.D&this.C,this.L&this.C);this.D=this.D&~this.C|a},function(a){a=a.call(this,this.D&this.C,this.K&this.C);this.D=this.D&~this.C|a},function(a){a=a.call(this,this.D&this.C,this.J&this.C);this.D=this.D&~this.C|a},function(a){a=a.call(this,r(this)&this.C,this.F&this.C);u(this,r(this)&~this.C|a)},function(a){a=a.call(this,r(this)&this.C,this.G&this.C);u(this,r(this)&~this.C|a)},function(a){a=a.call(this,r(this)&this.C,this.H&this.C);u(this,r(this)&~this.C|a)},function(a){a=
        a.call(this,r(this)&this.C,this.D&this.C);u(this,r(this)&~this.C|a)},function(a){a=a.call(this,r(this)&this.C,r(this)&this.C);u(this,r(this)&~this.C|a)},function(a){a=a.call(this,r(this)&this.C,this.L&this.C);u(this,r(this)&~this.C|a)},function(a){a=a.call(this,r(this)&this.C,this.K&this.C);u(this,r(this)&~this.C|a)},function(a){a=a.call(this,r(this)&this.C,this.J&this.C);u(this,r(this)&~this.C|a)},function(a){a=a.call(this,this.L&this.C,this.F&this.C);this.L=this.L&~this.C|a},function(a){a=a.call(this,
        this.L&this.C,this.G&this.C);this.L=this.L&~this.C|a},function(a){a=a.call(this,this.L&this.C,this.H&this.C);this.L=this.L&~this.C|a},function(a){a=a.call(this,this.L&this.C,this.D&this.C);this.L=this.L&~this.C|a},function(a){a=a.call(this,this.L&this.C,r(this)&this.C);this.L=this.L&~this.C|a},function(a){a=a.call(this,this.L&this.C,this.L&this.C);this.L=this.L&~this.C|a},function(a){a=a.call(this,this.L&this.C,this.K&this.C);this.L=this.L&~this.C|a},function(a){a=a.call(this,this.L&this.C,this.J&
        this.C);this.L=this.L&~this.C|a},function(a){a=a.call(this,this.K&this.C,this.F&this.C);this.K=this.K&~this.C|a},function(a){a=a.call(this,this.K&this.C,this.G&this.C);this.K=this.K&~this.C|a},function(a){a=a.call(this,this.K&this.C,this.H&this.C);this.K=this.K&~this.C|a},function(a){a=a.call(this,this.K&this.C,this.D&this.C);this.K=this.K&~this.C|a},function(a){a=a.call(this,this.K&this.C,r(this)&this.C);this.K=this.K&~this.C|a},function(a){a=a.call(this,this.K&this.C,this.L&this.C);this.K=this.K&
        ~this.C|a},function(a){a=a.call(this,this.K&this.C,this.K&this.C);this.K=this.K&~this.C|a},function(a){a=a.call(this,this.K&this.C,this.J&this.C);this.K=this.K&~this.C|a},function(a){a=a.call(this,this.J&this.C,this.F&this.C);this.J=this.J&~this.C|a},function(a){a=a.call(this,this.J&this.C,this.G&this.C);this.J=this.J&~this.C|a},function(a){a=a.call(this,this.J&this.C,this.H&this.C);this.J=this.J&~this.C|a},function(a){a=a.call(this,this.J&this.C,this.D&this.C);this.J=this.J&~this.C|a},function(a){a=
        a.call(this,this.J&this.C,r(this)&this.C);this.J=this.J&~this.C|a},function(a){a=a.call(this,this.J&this.C,this.L&this.C);this.J=this.J&~this.C|a},function(a){a=a.call(this,this.J&this.C,this.K&this.C);this.J=this.J&~this.C|a},function(a){a=a.call(this,this.J&this.C,this.J&this.C);this.J=this.J&~this.C|a}],xe=[function(a){a=a.call(this,N(this,this.F),this.F&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,this.G),this.F&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,
        N(this,this.H),this.F&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,this.D),this.F&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,U(this,0)),this.F&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,R(this)),this.F&this.C);Q(this,a);this.A-=this.B.da},function(a){a=a.call(this,N(this,this.K),this.F&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,this.J),this.F&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,
        N(this,this.F),this.G&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,this.G),this.G&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,this.H),this.G&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,this.D),this.G&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,U(this,0)),this.G&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,R(this)),this.G&this.C);Q(this,a);this.A-=this.B.da},function(a){a=a.call(this,
        N(this,this.K),this.G&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,this.J),this.G&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,this.F),this.H&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,this.G),this.H&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,this.H),this.H&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,this.D),this.H&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,
        N(this,U(this,0)),this.H&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,R(this)),this.H&this.C);Q(this,a);this.A-=this.B.da},function(a){a=a.call(this,N(this,this.K),this.H&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,this.J),this.H&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,this.F),this.D&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,this.G),this.D&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,
        N(this,this.H),this.D&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,this.D),this.D&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,U(this,0)),this.D&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,R(this)),this.D&this.C);Q(this,a);this.A-=this.B.da},function(a){a=a.call(this,N(this,this.K),this.D&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,this.J),this.D&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,
        N(this,this.F),r(this)&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,this.G),r(this)&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,this.H),r(this)&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,this.D),r(this)&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,U(this,0)),r(this)&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,R(this)),r(this)&this.C);Q(this,a);this.A-=this.B.da},function(a){a=
        a.call(this,N(this,this.K),r(this)&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,this.J),r(this)&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,this.F),this.L&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,this.G),this.L&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,this.H),this.L&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,this.D),this.L&this.C);Q(this,a);this.A-=this.B.N},function(a){a=
        a.call(this,N(this,U(this,0)),this.L&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,R(this)),this.L&this.C);Q(this,a);this.A-=this.B.da},function(a){a=a.call(this,N(this,this.K),this.L&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,this.J),this.L&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,this.F),this.K&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,this.G),this.K&this.C);Q(this,a);this.A-=this.B.N},function(a){a=
        a.call(this,N(this,this.H),this.K&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,this.D),this.K&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,U(this,0)),this.K&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,R(this)),this.K&this.C);Q(this,a);this.A-=this.B.da},function(a){a=a.call(this,N(this,this.K),this.K&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,this.J),this.K&this.C);Q(this,a);this.A-=this.B.N},function(a){a=
        a.call(this,N(this,this.F),this.J&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,this.G),this.J&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,this.H),this.J&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,this.D),this.J&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,U(this,0)),this.J&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,R(this)),this.J&this.C);Q(this,a);this.A-=this.B.da},function(a){a=
        a.call(this,N(this,this.K),this.J&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,this.J),this.J&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,N(this,this.F+this.M()),this.F&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.G+this.M()),this.F&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.H+this.M()),this.F&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.D+this.M()),this.F&this.C);Q(this,
        a);this.A-=this.B.I},function(a){a=a.call(this,N(this,U(this,1)+this.M()),this.F&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,O(this,this.L+this.M()),this.F&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.K+this.M()),this.F&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.J+this.M()),this.F&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.F+this.M()),this.G&this.C);Q(this,a);this.A-=this.B.I},function(a){a=
        a.call(this,N(this,this.G+this.M()),this.G&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.H+this.M()),this.G&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.D+this.M()),this.G&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,U(this,1)+this.M()),this.G&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,O(this,this.L+this.M()),this.G&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.K+this.M()),
        this.G&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.J+this.M()),this.G&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.F+this.M()),this.H&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.G+this.M()),this.H&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.H+this.M()),this.H&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.D+this.M()),this.H&this.C);Q(this,a);this.A-=this.B.I},
        function(a){a=a.call(this,N(this,U(this,1)+this.M()),this.H&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,O(this,this.L+this.M()),this.H&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.K+this.M()),this.H&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.J+this.M()),this.H&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.F+this.M()),this.D&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,
        this.G+this.M()),this.D&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.H+this.M()),this.D&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.D+this.M()),this.D&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,U(this,1)+this.M()),this.D&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,O(this,this.L+this.M()),this.D&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.K+this.M()),this.D&this.C);Q(this,
        a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.J+this.M()),this.D&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.F+this.M()),r(this)&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.G+this.M()),r(this)&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.H+this.M()),r(this)&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.D+this.M()),r(this)&this.C);Q(this,a);this.A-=this.B.I},function(a){a=
        a.call(this,N(this,U(this,1)+this.M()),r(this)&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,O(this,this.L+this.M()),r(this)&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.K+this.M()),r(this)&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.J+this.M()),r(this)&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.F+this.M()),this.L&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.G+this.M()),
        this.L&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.H+this.M()),this.L&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.D+this.M()),this.L&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,U(this,1)+this.M()),this.L&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,O(this,this.L+this.M()),this.L&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.K+this.M()),this.L&this.C);Q(this,a);this.A-=
        this.B.I},function(a){a=a.call(this,N(this,this.J+this.M()),this.L&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.F+this.M()),this.K&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.G+this.M()),this.K&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.H+this.M()),this.K&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.D+this.M()),this.K&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,
        N(this,U(this,1)+this.M()),this.K&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,O(this,this.L+this.M()),this.K&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.K+this.M()),this.K&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.J+this.M()),this.K&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.F+this.M()),this.J&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.G+this.M()),this.J&this.C);
        Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.H+this.M()),this.J&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.D+this.M()),this.J&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,U(this,1)+this.M()),this.J&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,O(this,this.L+this.M()),this.J&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.K+this.M()),this.J&this.C);Q(this,a);this.A-=this.B.I},function(a){a=
        a.call(this,N(this,this.J+this.M()),this.J&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.F+R(this)),this.F&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.G+R(this)),this.F&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.H+R(this)),this.F&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.D+R(this)),this.F&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,U(this,2)+R(this)),this.F&
        this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,O(this,this.L+R(this)),this.F&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.K+R(this)),this.F&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.J+R(this)),this.F&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.F+R(this)),this.G&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.G+R(this)),this.G&this.C);Q(this,a);this.A-=this.B.I},function(a){a=
        a.call(this,N(this,this.H+R(this)),this.G&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.D+R(this)),this.G&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,U(this,2)+R(this)),this.G&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,O(this,this.L+R(this)),this.G&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.K+R(this)),this.G&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.J+R(this)),this.G&
        this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.F+R(this)),this.H&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.G+R(this)),this.H&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.H+R(this)),this.H&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.D+R(this)),this.H&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,U(this,2)+R(this)),this.H&this.C);Q(this,a);this.A-=this.B.I},function(a){a=
        a.call(this,O(this,this.L+R(this)),this.H&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.K+R(this)),this.H&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.J+R(this)),this.H&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.F+R(this)),this.D&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.G+R(this)),this.D&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.H+R(this)),this.D&
        this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.D+R(this)),this.D&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,U(this,2)+R(this)),this.D&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,O(this,this.L+R(this)),this.D&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.K+R(this)),this.D&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.J+R(this)),this.D&this.C);Q(this,a);this.A-=this.B.I},function(a){a=
        a.call(this,N(this,this.F+R(this)),r(this)&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.G+R(this)),r(this)&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.H+R(this)),r(this)&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.D+R(this)),r(this)&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,U(this,2)+R(this)),r(this)&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,O(this,this.L+R(this)),
        r(this)&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.K+R(this)),r(this)&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.J+R(this)),r(this)&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.F+R(this)),this.L&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.G+R(this)),this.L&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.H+R(this)),this.L&this.C);Q(this,a);this.A-=this.B.I},
        function(a){a=a.call(this,N(this,this.D+R(this)),this.L&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,U(this,2)+R(this)),this.L&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,O(this,this.L+R(this)),this.L&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.K+R(this)),this.L&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.J+R(this)),this.L&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.F+
        R(this)),this.K&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.G+R(this)),this.K&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.H+R(this)),this.K&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.D+R(this)),this.K&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,U(this,2)+R(this)),this.K&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,O(this,this.L+R(this)),this.K&this.C);Q(this,a);this.A-=
        this.B.I},function(a){a=a.call(this,N(this,this.K+R(this)),this.K&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.J+R(this)),this.K&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.F+R(this)),this.J&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.G+R(this)),this.J&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.H+R(this)),this.J&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,
        this.D+R(this)),this.J&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,U(this,2)+R(this)),this.J&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,O(this,this.L+R(this)),this.J&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.K+R(this)),this.J&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,N(this,this.J+R(this)),this.J&this.C);Q(this,a);this.A-=this.B.I},B[192],B[200],B[208],B[216],B[224],B[232],B[240],B[248],B[193],B[201],B[209],
        B[217],B[225],B[233],B[241],B[249],B[194],B[202],B[210],B[218],B[226],B[234],B[242],B[250],B[195],B[203],B[211],B[219],B[227],B[235],B[243],B[251],B[196],B[204],B[212],B[220],B[228],B[236],B[244],B[252],B[197],B[205],B[213],B[221],B[229],B[237],B[245],B[253],B[198],B[206],B[214],B[222],B[230],B[238],B[246],B[254],B[199],B[207],B[215],B[223],B[231],B[239],B[247],B[255]],ye=[function(a,b){var c=a[0].call(this,N(this,this.F),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[0].call(this,
        N(this,this.G),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[0].call(this,N(this,this.H),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[0].call(this,N(this,this.D),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[0].call(this,N(this,U(this,0)),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[0].call(this,N(this,R(this)),b.call(this));Q(this,c);this.A-=this.B.da},function(a,b){var c=a[0].call(this,N(this,this.K),b.call(this));Q(this,
        c);this.A-=this.B.N},function(a,b){var c=a[0].call(this,N(this,this.J),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[1].call(this,N(this,this.F),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[1].call(this,N(this,this.G),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[1].call(this,N(this,this.H),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[1].call(this,N(this,this.D),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=
        a[1].call(this,N(this,U(this,0)),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[1].call(this,N(this,R(this)),b.call(this));Q(this,c);this.A-=this.B.da},function(a,b){var c=a[1].call(this,N(this,this.K),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[1].call(this,N(this,this.J),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[2].call(this,N(this,this.F),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[2].call(this,N(this,this.G),b.call(this));
        Q(this,c);this.A-=this.B.N},function(a,b){var c=a[2].call(this,N(this,this.H),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[2].call(this,N(this,this.D),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[2].call(this,N(this,U(this,0)),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[2].call(this,N(this,R(this)),b.call(this));Q(this,c);this.A-=this.B.da},function(a,b){var c=a[2].call(this,N(this,this.K),b.call(this));Q(this,c);this.A-=this.B.N},function(a,
        b){var c=a[2].call(this,N(this,this.J),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[3].call(this,N(this,this.F),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[3].call(this,N(this,this.G),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[3].call(this,N(this,this.H),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[3].call(this,N(this,this.D),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[3].call(this,N(this,U(this,0)),
        b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[3].call(this,N(this,R(this)),b.call(this));Q(this,c);this.A-=this.B.da},function(a,b){var c=a[3].call(this,N(this,this.K),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[3].call(this,N(this,this.J),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[4].call(this,N(this,this.F),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[4].call(this,N(this,this.G),b.call(this));Q(this,c);this.A-=this.B.N},
        function(a,b){var c=a[4].call(this,N(this,this.H),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[4].call(this,N(this,this.D),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[4].call(this,N(this,U(this,0)),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[4].call(this,N(this,R(this)),b.call(this));Q(this,c);this.A-=this.B.da},function(a,b){var c=a[4].call(this,N(this,this.K),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[4].call(this,N(this,
        this.J),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[5].call(this,N(this,this.F),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[5].call(this,N(this,this.G),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[5].call(this,N(this,this.H),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[5].call(this,N(this,this.D),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[5].call(this,N(this,U(this,0)),b.call(this));Q(this,c);this.A-=
        this.B.N},function(a,b){var c=a[5].call(this,N(this,R(this)),b.call(this));Q(this,c);this.A-=this.B.da},function(a,b){var c=a[5].call(this,N(this,this.K),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[5].call(this,N(this,this.J),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[6].call(this,N(this,this.F),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[6].call(this,N(this,this.G),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[6].call(this,
        N(this,this.H),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[6].call(this,N(this,this.D),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[6].call(this,N(this,U(this,0)),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[6].call(this,N(this,R(this)),b.call(this));Q(this,c);this.A-=this.B.da},function(a,b){var c=a[6].call(this,N(this,this.K),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[6].call(this,N(this,this.J),b.call(this));Q(this,
        c);this.A-=this.B.N},function(a,b){var c=a[7].call(this,N(this,this.F),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[7].call(this,N(this,this.G),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[7].call(this,N(this,this.H),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[7].call(this,N(this,this.D),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[7].call(this,N(this,U(this,0)),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=
        a[7].call(this,N(this,R(this)),b.call(this));Q(this,c);this.A-=this.B.da},function(a,b){var c=a[7].call(this,N(this,this.K),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[7].call(this,N(this,this.J),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[0].call(this,N(this,this.F+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,N(this,this.G+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,N(this,
        this.H+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,N(this,this.D+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,N(this,U(this,1)+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,O(this,this.L+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,N(this,this.K+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,
        N(this,this.J+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,N(this,this.F+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,N(this,this.G+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,N(this,this.H+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,N(this,this.D+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,
        N(this,U(this,1)+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,O(this,this.L+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,N(this,this.K+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,N(this,this.J+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,N(this,this.F+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,
        N(this,this.G+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,N(this,this.H+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,N(this,this.D+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,N(this,U(this,1)+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,O(this,this.L+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,
        N(this,this.K+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,N(this,this.J+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,N(this,this.F+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,N(this,this.G+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,N(this,this.H+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,
        N(this,this.D+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,N(this,U(this,1)+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,O(this,this.L+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,N(this,this.K+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,N(this,this.J+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,
        N(this,this.F+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,N(this,this.G+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,N(this,this.H+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,N(this,this.D+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,N(this,U(this,1)+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,
        O(this,this.L+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,N(this,this.K+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,N(this,this.J+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,N(this,this.F+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,N(this,this.G+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,
        N(this,this.H+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,N(this,this.D+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,N(this,U(this,1)+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,O(this,this.L+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,N(this,this.K+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,
        N(this,this.J+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,N(this,this.F+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,N(this,this.G+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,N(this,this.H+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,N(this,this.D+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,
        N(this,U(this,1)+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,O(this,this.L+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,N(this,this.K+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,N(this,this.J+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,N(this,this.F+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,
        N(this,this.G+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,N(this,this.H+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,N(this,this.D+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,N(this,U(this,1)+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,O(this,this.L+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,
        N(this,this.K+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,N(this,this.J+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,N(this,this.F+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,N(this,this.G+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,N(this,this.H+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,
        N(this,this.D+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,N(this,U(this,2)+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,O(this,this.L+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,N(this,this.K+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,N(this,this.J+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,
        N(this,this.F+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,N(this,this.G+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,N(this,this.H+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,N(this,this.D+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,N(this,U(this,2)+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,
        O(this,this.L+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,N(this,this.K+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,N(this,this.J+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,N(this,this.F+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,N(this,this.G+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,N(this,
        this.H+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,N(this,this.D+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,N(this,U(this,2)+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,O(this,this.L+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,N(this,this.K+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,N(this,
        this.J+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,N(this,this.F+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,N(this,this.G+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,N(this,this.H+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,N(this,this.D+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,N(this,U(this,
        2)+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,O(this,this.L+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,N(this,this.K+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,N(this,this.J+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,N(this,this.F+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,N(this,this.G+
        R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,N(this,this.H+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,N(this,this.D+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,N(this,U(this,2)+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,O(this,this.L+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,N(this,this.K+
        R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,N(this,this.J+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,N(this,this.F+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,N(this,this.G+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,N(this,this.H+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,N(this,this.D+R(this)),
        b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,N(this,U(this,2)+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,O(this,this.L+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,N(this,this.K+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,N(this,this.J+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,N(this,this.F+R(this)),
        b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,N(this,this.G+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,N(this,this.H+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,N(this,this.D+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,N(this,U(this,2)+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,O(this,this.L+R(this)),
        b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,N(this,this.K+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,N(this,this.J+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,N(this,this.F+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,N(this,this.G+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,N(this,this.H+R(this)),b.call(this));
        Q(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,N(this,this.D+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,N(this,U(this,2)+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,O(this,this.L+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,N(this,this.K+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,N(this,this.J+R(this)),b.call(this));
        Q(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,this.F&this.C,b.call(this));this.F=this.F&~this.C|c},function(a,b){var c=a[0].call(this,this.G&this.C,b.call(this));this.G=this.G&~this.C|c},function(a,b){var c=a[0].call(this,this.H&this.C,b.call(this));this.H=this.H&~this.C|c},function(a,b){var c=a[0].call(this,this.D&this.C,b.call(this));this.D=this.D&~this.C|c},function(a,b){var c=a[0].call(this,r(this)&this.C,b.call(this));u(this,r(this)&~this.C|c)},function(a,b){var c=a[0].call(this,
        this.L&this.C,b.call(this));this.L=this.L&~this.C|c},function(a,b){var c=a[0].call(this,this.K&this.C,b.call(this));this.K=this.K&~this.C|c},function(a,b){var c=a[0].call(this,this.J&this.C,b.call(this));this.J=this.J&~this.C|c},function(a,b){var c=a[1].call(this,this.F&this.C,b.call(this));this.F=this.F&~this.C|c},function(a,b){var c=a[1].call(this,this.G&this.C,b.call(this));this.G=this.G&~this.C|c},function(a,b){var c=a[1].call(this,this.H&this.C,b.call(this));this.H=this.H&~this.C|c},function(a,
        b){var c=a[1].call(this,this.D&this.C,b.call(this));this.D=this.D&~this.C|c},function(a,b){var c=a[1].call(this,r(this)&this.C,b.call(this));u(this,r(this)&~this.C|c)},function(a,b){var c=a[1].call(this,this.L&this.C,b.call(this));this.L=this.L&~this.C|c},function(a,b){var c=a[1].call(this,this.K&this.C,b.call(this));this.K=this.K&~this.C|c},function(a,b){var c=a[1].call(this,this.J&this.C,b.call(this));this.J=this.J&~this.C|c},function(a,b){var c=a[2].call(this,this.F&this.C,b.call(this));this.F=
        this.F&~this.C|c},function(a,b){var c=a[2].call(this,this.G&this.C,b.call(this));this.G=this.G&~this.C|c},function(a,b){var c=a[2].call(this,this.H&this.C,b.call(this));this.H=this.H&~this.C|c},function(a,b){var c=a[2].call(this,this.D&this.C,b.call(this));this.D=this.D&~this.C|c},function(a,b){var c=a[2].call(this,r(this)&this.C,b.call(this));u(this,r(this)&~this.C|c)},function(a,b){var c=a[2].call(this,this.L&this.C,b.call(this));this.L=this.L&~this.C|c},function(a,b){var c=a[2].call(this,this.K&
        this.C,b.call(this));this.K=this.K&~this.C|c},function(a,b){var c=a[2].call(this,this.J&this.C,b.call(this));this.J=this.J&~this.C|c},function(a,b){var c=a[3].call(this,this.F&this.C,b.call(this));this.F=this.F&~this.C|c},function(a,b){var c=a[3].call(this,this.G&this.C,b.call(this));this.G=this.G&~this.C|c},function(a,b){var c=a[3].call(this,this.H&this.C,b.call(this));this.H=this.H&~this.C|c},function(a,b){var c=a[3].call(this,this.D&this.C,b.call(this));this.D=this.D&~this.C|c},function(a,b){var c=
        a[3].call(this,r(this)&this.C,b.call(this));u(this,r(this)&~this.C|c)},function(a,b){var c=a[3].call(this,this.L&this.C,b.call(this));this.L=this.L&~this.C|c},function(a,b){var c=a[3].call(this,this.K&this.C,b.call(this));this.K=this.K&~this.C|c},function(a,b){var c=a[3].call(this,this.J&this.C,b.call(this));this.J=this.J&~this.C|c},function(a,b){var c=a[4].call(this,this.F&this.C,b.call(this));this.F=this.F&~this.C|c},function(a,b){var c=a[4].call(this,this.G&this.C,b.call(this));this.G=this.G&~this.C|
        c},function(a,b){var c=a[4].call(this,this.H&this.C,b.call(this));this.H=this.H&~this.C|c},function(a,b){var c=a[4].call(this,this.D&this.C,b.call(this));this.D=this.D&~this.C|c},function(a,b){var c=a[4].call(this,r(this)&this.C,b.call(this));u(this,r(this)&~this.C|c)},function(a,b){var c=a[4].call(this,this.L&this.C,b.call(this));this.L=this.L&~this.C|c},function(a,b){var c=a[4].call(this,this.K&this.C,b.call(this));this.K=this.K&~this.C|c},function(a,b){var c=a[4].call(this,this.J&this.C,b.call(this));
        this.J=this.J&~this.C|c},function(a,b){var c=a[5].call(this,this.F&this.C,b.call(this));this.F=this.F&~this.C|c},function(a,b){var c=a[5].call(this,this.G&this.C,b.call(this));this.G=this.G&~this.C|c},function(a,b){var c=a[5].call(this,this.H&this.C,b.call(this));this.H=this.H&~this.C|c},function(a,b){var c=a[5].call(this,this.D&this.C,b.call(this));this.D=this.D&~this.C|c},function(a,b){var c=a[5].call(this,r(this)&this.C,b.call(this));u(this,r(this)&~this.C|c)},function(a,b){var c=a[5].call(this,
        this.L&this.C,b.call(this));this.L=this.L&~this.C|c},function(a,b){var c=a[5].call(this,this.K&this.C,b.call(this));this.K=this.K&~this.C|c},function(a,b){var c=a[5].call(this,this.J&this.C,b.call(this));this.J=this.J&~this.C|c},function(a,b){var c=a[6].call(this,this.F&this.C,b.call(this));this.F=this.F&~this.C|c},function(a,b){var c=a[6].call(this,this.G&this.C,b.call(this));this.G=this.G&~this.C|c},function(a,b){var c=a[6].call(this,this.H&this.C,b.call(this));this.H=this.H&~this.C|c},function(a,
        b){var c=a[6].call(this,this.D&this.C,b.call(this));this.D=this.D&~this.C|c},function(a,b){var c=a[6].call(this,r(this)&this.C,b.call(this));u(this,r(this)&~this.C|c)},function(a,b){var c=a[6].call(this,this.L&this.C,b.call(this));this.L=this.L&~this.C|c},function(a,b){var c=a[6].call(this,this.K&this.C,b.call(this));this.K=this.K&~this.C|c},function(a,b){var c=a[6].call(this,this.J&this.C,b.call(this));this.J=this.J&~this.C|c},function(a,b){var c=a[7].call(this,this.F&this.C,b.call(this));this.F=
        this.F&~this.C|c},function(a,b){var c=a[7].call(this,this.G&this.C,b.call(this));this.G=this.G&~this.C|c},function(a,b){var c=a[7].call(this,this.H&this.C,b.call(this));this.H=this.H&~this.C|c},function(a,b){var c=a[7].call(this,this.D&this.C,b.call(this));this.D=this.D&~this.C|c},function(a,b){var c=a[7].call(this,r(this)&this.C,b.call(this));u(this,r(this)&~this.C|c)},function(a,b){var c=a[7].call(this,this.L&this.C,b.call(this));this.L=this.L&~this.C|c},function(a,b){var c=a[7].call(this,this.K&
        this.C,b.call(this));this.K=this.K&~this.C|c},function(a,b){var c=a[7].call(this,this.J&this.C,b.call(this));this.J=this.J&~this.C|c}],pf=[function(){return this.F+this.F},function(){return this.G+this.F},function(){return this.H+this.F},function(){return this.D+this.F},function(){this.ha=this.la;return r(this)+this.F},function(a){return(a?(this.ha=this.la,this.L):this.oa())+this.F},function(){return this.K+this.F},function(){return this.J+this.F},function(){return this.F+this.G},function(){return this.G+
        this.G},function(){return this.H+this.G},function(){return this.D+this.G},function(){this.ha=this.la;return r(this)+this.G},function(a){return(a?(this.ha=this.la,this.L):this.oa())+this.G},function(){return this.K+this.G},function(){return this.J+this.G},function(){return this.F+this.H},function(){return this.G+this.H},function(){return this.H+this.H},function(){return this.D+this.H},function(){this.ha=this.la;return r(this)+this.H},function(a){return(a?(this.ha=this.la,this.L):this.oa())+this.H},
        function(){return this.K+this.H},function(){return this.J+this.H},function(){return this.F+this.D},function(){return this.G+this.D},function(){return this.H+this.D},function(){return this.D+this.D},function(){this.ha=this.la;return r(this)+this.D},function(a){return(a?(this.ha=this.la,this.L):this.oa())+this.D},function(){return this.K+this.D},function(){return this.J+this.D},function(){return this.F},function(){return this.G},function(){return this.H},function(){return this.D},function(){this.ha=
        this.la;return r(this)},function(a){return a?(this.ha=this.la,this.L):this.oa()},function(){return this.K},function(){return this.J},function(){return this.F+this.L},function(){return this.G+this.L},function(){return this.H+this.L},function(){return this.D+this.L},function(){this.ha=this.la;return r(this)+this.L},function(a){return(a?(this.ha=this.la,this.L):this.oa())+this.L},function(){return this.K+this.L},function(){return this.J+this.L},function(){return this.F+this.K},function(){return this.G+
        this.K},function(){return this.H+this.K},function(){return this.D+this.K},function(){this.ha=this.la;return r(this)+this.K},function(a){return(a?(this.ha=this.la,this.L):this.oa())+this.K},function(){return this.K+this.K},function(){return this.J+this.K},function(){return this.F+this.J},function(){return this.G+this.J},function(){return this.H+this.J},function(){return this.D+this.J},function(){this.ha=this.la;return r(this)+this.J},function(a){return(a?(this.ha=this.la,this.L):this.oa())+this.J},
        function(){return this.K+this.J},function(){return this.J+this.J},function(){return this.F+(this.F<<1)},function(){return this.G+(this.F<<1)},function(){return this.H+(this.F<<1)},function(){return this.D+(this.F<<1)},function(){this.ha=this.la;return r(this)+(this.F<<1)},function(a){return(a?(this.ha=this.la,this.L):this.oa())+(this.F<<1)},function(){return this.K+(this.F<<1)},function(){return this.J+(this.F<<1)},function(){return this.F+(this.G<<1)},function(){return this.G+(this.G<<1)},function(){return this.H+
        (this.G<<1)},function(){return this.D+(this.G<<1)},function(){this.ha=this.la;return r(this)+(this.G<<1)},function(a){return(a?(this.ha=this.la,this.L):this.oa())+(this.G<<1)},function(){return this.K+(this.G<<1)},function(){return this.J+(this.G<<1)},function(){return this.F+(this.H<<1)},function(){return this.G+(this.H<<1)},function(){return this.H+(this.H<<1)},function(){return this.D+(this.H<<1)},function(){this.ha=this.la;return r(this)+(this.H<<1)},function(a){return(a?(this.ha=this.la,this.L):
        this.oa())+(this.H<<1)},function(){return this.K+(this.H<<1)},function(){return this.J+(this.H<<1)},function(){return this.F+(this.D<<1)},function(){return this.G+(this.D<<1)},function(){return this.H+(this.D<<1)},function(){return this.D+(this.D<<1)},function(){this.ha=this.la;return r(this)+(this.D<<1)},function(a){return(a?(this.ha=this.la,this.L):this.oa())+(this.D<<1)},function(){return this.K+(this.D<<1)},function(){return this.J+(this.D<<1)},function(){return this.F},function(){return this.G},
        function(){return this.H},function(){return this.D},function(){this.ha=this.la;return r(this)},function(a){return a?(this.ha=this.la,this.L):this.oa()},function(){return this.K},function(){return this.J},function(){return this.F+(this.L<<1)},function(){return this.G+(this.L<<1)},function(){return this.H+(this.L<<1)},function(){return this.D+(this.L<<1)},function(){this.ha=this.la;return r(this)+(this.L<<1)},function(a){return(a?(this.ha=this.la,this.L):this.oa())+(this.L<<1)},function(){return this.K+
        (this.L<<1)},function(){return this.J+(this.L<<1)},function(){return this.F+(this.K<<1)},function(){return this.G+(this.K<<1)},function(){return this.H+(this.K<<1)},function(){return this.D+(this.K<<1)},function(){this.ha=this.la;return r(this)+(this.K<<1)},function(a){return(a?(this.ha=this.la,this.L):this.oa())+(this.K<<1)},function(){return this.K+(this.K<<1)},function(){return this.J+(this.K<<1)},function(){return this.F+(this.J<<1)},function(){return this.G+(this.J<<1)},function(){return this.H+
        (this.J<<1)},function(){return this.D+(this.J<<1)},function(){this.ha=this.la;return r(this)+(this.J<<1)},function(a){return(a?(this.ha=this.la,this.L):this.oa())+(this.J<<1)},function(){return this.K+(this.J<<1)},function(){return this.J+(this.J<<1)},function(){return this.F+(this.F<<2)},function(){return this.G+(this.F<<2)},function(){return this.H+(this.F<<2)},function(){return this.D+(this.F<<2)},function(){this.ha=this.la;return r(this)+(this.F<<2)},function(a){return(a?(this.ha=this.la,this.L):
        this.oa())+(this.F<<2)},function(){return this.K+(this.F<<2)},function(){return this.J+(this.F<<2)},function(){return this.F+(this.G<<2)},function(){return this.G+(this.G<<2)},function(){return this.H+(this.G<<2)},function(){return this.D+(this.G<<2)},function(){this.ha=this.la;return r(this)+(this.G<<2)},function(a){return(a?(this.ha=this.la,this.L):this.oa())+(this.G<<2)},function(){return this.K+(this.G<<2)},function(){return this.J+(this.G<<2)},function(){return this.F+(this.H<<2)},function(){return this.G+
        (this.H<<2)},function(){return this.H+(this.H<<2)},function(){return this.D+(this.H<<2)},function(){this.ha=this.la;return r(this)+(this.H<<2)},function(a){return(a?(this.ha=this.la,this.L):this.oa())+(this.H<<2)},function(){return this.K+(this.H<<2)},function(){return this.J+(this.H<<2)},function(){return this.F+(this.D<<2)},function(){return this.G+(this.D<<2)},function(){return this.H+(this.D<<2)},function(){return this.D+(this.D<<2)},function(){this.ha=this.la;return r(this)+(this.D<<2)},function(a){return(a?
        (this.ha=this.la,this.L):this.oa())+(this.D<<2)},function(){return this.K+(this.D<<2)},function(){return this.J+(this.D<<2)},function(){return this.F},function(){return this.G},function(){return this.H},function(){return this.D},function(){this.ha=this.la;return r(this)},function(a){return a?(this.ha=this.la,this.L):this.oa()},function(){return this.K},function(){return this.J},function(){return this.F+(this.L<<2)},function(){return this.G+(this.L<<2)},function(){return this.H+(this.L<<2)},function(){return this.D+
        (this.L<<2)},function(){this.ha=this.la;return r(this)+(this.L<<2)},function(a){return(a?(this.ha=this.la,this.L):this.oa())+(this.L<<2)},function(){return this.K+(this.L<<2)},function(){return this.J+(this.L<<2)},function(){return this.F+(this.K<<2)},function(){return this.G+(this.K<<2)},function(){return this.H+(this.K<<2)},function(){return this.D+(this.K<<2)},function(){this.ha=this.la;return r(this)+(this.K<<2)},function(a){return(a?(this.ha=this.la,this.L):this.oa())+(this.K<<2)},function(){return this.K+
        (this.K<<2)},function(){return this.J+(this.K<<2)},function(){return this.F+(this.J<<2)},function(){return this.G+(this.J<<2)},function(){return this.H+(this.J<<2)},function(){return this.D+(this.J<<2)},function(){this.ha=this.la;return r(this)+(this.J<<2)},function(a){return(a?(this.ha=this.la,this.L):this.oa())+(this.J<<2)},function(){return this.K+(this.J<<2)},function(){return this.J+(this.J<<2)},function(){return this.F+(this.F<<3)},function(){return this.G+(this.F<<3)},function(){return this.H+
        (this.F<<3)},function(){return this.D+(this.F<<3)},function(){this.ha=this.la;return r(this)+(this.F<<3)},function(a){return(a?(this.ha=this.la,this.L):this.oa())+(this.F<<3)},function(){return this.K+(this.F<<3)},function(){return this.J+(this.F<<3)},function(){return this.F+(this.G<<3)},function(){return this.G+(this.G<<3)},function(){return this.H+(this.G<<3)},function(){return this.D+(this.G<<3)},function(){this.ha=this.la;return r(this)+(this.G<<3)},function(a){return(a?(this.ha=this.la,this.L):
        this.oa())+(this.G<<3)},function(){return this.K+(this.G<<3)},function(){return this.J+(this.G<<3)},function(){return this.F+(this.H<<3)},function(){return this.G+(this.H<<3)},function(){return this.H+(this.H<<3)},function(){return this.D+(this.H<<3)},function(){this.ha=this.la;return r(this)+(this.H<<3)},function(a){return(a?(this.ha=this.la,this.L):this.oa())+(this.H<<3)},function(){return this.K+(this.H<<3)},function(){return this.J+(this.H<<3)},function(){return this.F+(this.D<<3)},function(){return this.G+
        (this.D<<3)},function(){return this.H+(this.D<<3)},function(){return this.D+(this.D<<3)},function(){this.ha=this.la;return r(this)+(this.D<<3)},function(a){return(a?(this.ha=this.la,this.L):this.oa())+(this.D<<3)},function(){return this.K+(this.D<<3)},function(){return this.J+(this.D<<3)},function(){return this.F},function(){return this.G},function(){return this.H},function(){return this.D},function(){this.ha=this.la;return r(this)},function(a){return a?(this.ha=this.la,this.L):this.oa()},function(){return this.K},
        function(){return this.J},function(){return this.F+(this.L<<3)},function(){return this.G+(this.L<<3)},function(){return this.H+(this.L<<3)},function(){return this.D+(this.L<<3)},function(){this.ha=this.la;return r(this)+(this.L<<3)},function(a){return(a?(this.ha=this.la,this.L):this.oa())+(this.L<<3)},function(){return this.K+(this.L<<3)},function(){return this.J+(this.L<<3)},function(){return this.F+(this.K<<3)},function(){return this.G+(this.K<<3)},function(){return this.H+(this.K<<3)},function(){return this.D+
        (this.K<<3)},function(){this.ha=this.la;return r(this)+(this.K<<3)},function(a){return(a?(this.ha=this.la,this.L):this.oa())+(this.K<<3)},function(){return this.K+(this.K<<3)},function(){return this.J+(this.K<<3)},function(){return this.F+(this.J<<3)},function(){return this.G+(this.J<<3)},function(){return this.H+(this.J<<3)},function(){return this.D+(this.J<<3)},function(){this.ha=this.la;return r(this)+(this.J<<3)},function(a){return(a?(this.ha=this.la,this.L):this.oa())+(this.J<<3)},function(){return this.K+
        (this.J<<3)},function(){return this.J+(this.J<<3)}];
        function Sh(a){Ua.call(this,"ChipSet",a,Sh,32768);this.ka=(this.ka=a.model)&&Th[this.ka]||Uh;this.nc=0;var b=a.sw1;if(b)this.nc=Vh(b,Wh|Xh.dp);else{this.Te=[360,360];(b=a.floppies)&&b.length&&(this.Te=b);if(b=this.Te.length)this.nc|=Yh.Ek,b--,this.nc|=(b&3)<<Yh.oh;if(b=a.monitor||(this.ka<Zh?"mono":"ega"),void 0!==$h[b])this.nc|=$h[b]<<Xh.oh}this.zf=Vh(a.sw2||"11110000",0);this.Nq=this.ka==Uh?16:64;this.Qi=this.Ch=1;this.ka>=Zh&&(this.Qi=this.Ch=2);this.jf=a.scaleTimers||!1;this.Ls=a.rtcDate;this.Vn=
        !1;a.sound&&(this.al=this.Gh=null,window&&(this.al=window.AudioContext||window.webkitAudioContext),this.al&&(this.Gh=new this.al));this.reset(!0);ob(this)}eb(Sh);var Uh=5150,Zh=5170,Th={5150:Uh,5160:5160,5170:Zh,deskpro386:5180},$h={none:0,tv:1,color:2,mono:3,ega:0,vga:0},Yh={Ek:1,ONE:0,St:64,Qt:128,pt:192,nh:192,oh:6},Wh=12,Xh={Rt:16,ht:32,dp:48,nh:48,oh:4};f=Sh.prototype;
        f.Nb=function(a,b,c){switch(b){case "sw1":return this.va[b]=c,ai(this,b,c,this.nc,{0:this.ka==Uh?"Bootable Floppy Drive":"Loop on POST",1:this.ka==Uh?"Reserved":"Coprocessor",2:"Base Memory Size",4:"Monitor Type",6:"Number of Floppy Drives"}),!0;case "sw2":if(this.ka==Uh)return this.va[b]=c,ai(this,b,c,this.zf,{0:"Expansion Memory Size",4:"Reserved"}),!0;break;case "swdesc":return this.va[b]=c,!0}return!1};
        f.Kc=function(a,b,c,d){this.ma=b;this.O=c;this.Y=d;this.Fa=a;this.Ja=xb(a,"Keyboard");this.ik=c.T.ge/1193181;oc(b,this,bi);sc(b,this,ci);this.ka<Zh?(oc(b,this,di),sc(b,this,ei)):(oc(b,this,fi),sc(b,this,gi));if(d){var e=this;hi(d,1024,function(){for(var a=0;a<e.ec.length;a++){for(var b=e.ec[a],c="PIC"+a+":",d=0;d<b.Pc.length;d++)c+=" IC"+(d+1)+"="+k(b.Pc[d]);c+=" IMR="+k(b.Wd)+" IRR="+k(b.Xb)+" ISR="+k(b.Tc)+" DELAY="+b.Rg;e.Y.R(c)}});hi(d,2048,function(){for(var a=0;a<e.Pb.length;a++){ii(e,a);var b=
        e.Pb[a],c="TIMER"+a+":",d=0;if(null!=b.ae)for(var w=0;w<=b.ae;w++)d|=b.fb[w]<<8*w;c+=" mode="+b.mode+" bytes="+b.ae+" count="+ga(d);e.Y.R(c)}});hi(d,4096,function(){for(var a="",b=0;64>b;b++){var c=13>=b?ji(e,b):e.ga[b];a&&(a+="\n");a+="CMOS["+k(b)+"]: "+k(c)}e.Y.R(a)})}Ce(c,26,this,this.Mq)};f.lc=function(a,b){if(!b)if(!a)this.reset();else if(!this.restore(a))return!1;return!0};f.kc=function(a){return a&&this.save?this.save():!0};
        f.reset=function(a){var b;this.Td=this.nc;this.fg=this.zf;ki(this);this.vb=Array(this.Qi);for(b=0;b<this.Qi;b++)li(this,b);this.ec=Array(this.Ch);mi(this,0,32);1<this.Ch&&mi(this,1,160);this.un=this.Tk=null;this.Pb=Array(5180==this.ka?6:3);for(b=0;b<this.Pb.length;b++)ni(this,b);this.zh=this.Uk=this.Uc=this.Ni=null;this.Mi=0;if(this.ka>=Zh){this.lb=16;this.oe=0;this.Vd=16;this.Hi=0;this.pe=160;512<=oi(this)&&(this.pe|=16);3==pi(this)&&(this.pe|=64);5180==this.ka&&(this.pe|=12);this.Ii=3;this.pg=Array(8);
        this.Df=0;a&&(this.ga=Array(64));qi(this,this.Ls);for(a=21;24>=a;a++)this.ga[a]=0;for(a=14;46>a;a++)void 0===this.ga[a]&&(this.ga[a]=0);this.ga[20]=this.Td&(Xh.nh|2|Yh.Ek|Yh.nh);this.ga[16]=ri(this,0)<<4|ri(this,1);si(this)}};
        function qi(a,b){var c=b?new Date(b):new Date;"[object Date]"!==Object.prototype.toString.call(c)||isNaN(c.getTime())?(c=new Date,a.R("CMOS date invalid ("+b+"), using "+c)):b&&a.R("CMOS date: "+c);a.ga[0]=c.getSeconds();a.ga[1]=0;a.ga[2]=c.getMinutes();a.ga[3]=0;a.ga[4]=c.getHours();a.ga[5]=0;a.ga[6]=c.getDay()+1;a.ga[7]=c.getDate();a.ga[8]=c.getMonth()+1;c=c.getFullYear();a.ga[9]=c%100;c/=100;a.ga[50]=c%10|c/10<<4;a.ga[10]=38;a.ga[11]=2;a.ga[12]=0;a.ga[13]=128;a.ei=a.Xg=0;a.yo=a.gk=null}
        function ji(a,b){var c=a.ga[b];if(10>b){var d=!1;4!=b&&5!=b||a.ga[11]&2||(c=12>c?c?c:12:(c-=12)?c+128:140,d=!0);a.ga[11]&4||(d&&128<c&&(c-=48),c=c%10|c/10<<4)}else 10==b&&(a.ga[b]^=128);return c}function ti(a){var b;void 0===b&&(b=a.gk);a.Xg=cd(a.O,a.jf)+b;a.ga[11]&64&&hd(a.O,b)}function si(a){for(var b=0,c=16;46>c;c++)b+=a.ga[c];a.ga[47]=b&255;a.ga[46]=b>>8}
        f.save=function(){var a=new Je(this);a.set(0,[this.nc,this.zf,this.Td,this.fg]);for(var b=[],c=0;c<this.vb;c++){for(var d=this.vb[c],e=d,g=[],l=0;l<e.Ub.length;l++){var p=e.Ub[l];g[l]=[p.ze,p.Ci,p.pc,p.kb,p.fb,p.mode,p.Oi,p.Gs,p.Is]}b[c]=[d.bf,d.Rk,d.vn,d.wb,g]}a.set(1,[b]);b=[];for(c=0;c<this.ec.length;c++)d=this.ec[c],b[c]=[d.Rg,d.Pc,d.De,d.Wd,d.Xb,d.Tc,d.Ef,d.yh];a.set(2,[b]);b=[];for(c=0;c<this.Pb.length;c++)d=this.Pb[c],b[c]=[d.pc,d.Wc,d.fb,d.Lf,d.xn,d.mode,d.wk,d.ff,d.ae,d.de,d.Ph,d.Rf,d.Od];
        a.set(3,[this.Tk,b,this.un]);a.set(4,[this.Ni,this.Uc,this.Uk,this.zh,this.Mi]);this.ka>=Zh&&(a.set(5,[this.lb,this.oe,this.Vd,this.Hi,this.pe,this.Ii]),a.set(6,[this.pg[7],this.pg,this.Df,this.ga,this.ei,this.Xg]));return a.data()};
        f.restore=function(a){var b,c;b=a[0];this.nc=b[0];this.zf=b[1];this.Td=b[2];this.fg=b[3];b=a[1];for(c=0;c<this.Qi;c++)li(this,c,1==b.length?b[0][c]:b);b=a[2];for(c=0;c<this.Ch;c++)mi(this,c,0===c?32:160,b[0][c]);b=a[3];this.Tk=b[0];this.un=b[2];for(c=0;c<this.Pb.length;c++)ni(this,c,b[1][c]);b=a[4];this.Ni=b[0];this.Uc=b[1];this.Uk=b[2];this.zh=b[3];this.Mi=b[4];if(b=a[5])this.lb=b[0],this.oe=b[1],this.Vd=b[2],this.Hi=b[3],this.pe=b[4],this.Ii=b[5];if(b=a[6])this.pg=b[1],this.pg[7]=b[0],this.Df=b[2],
        this.ga=b[3],this.ei=b[4],this.Xg=b[5],qi(this);return!0};var ui=[0,null,null,0,Array(4)];function li(a,b,c){var d=a.vb[b];d||(d={Ub:Array(4)});c=c&&5==c.length?c:ui;d.bf=c[0];d.Rk=c[1];d.vn=c[2];d.wb=c[3];d.Xq=b<<2;for(var e=0;e<d.Ub.length;e++)vi(d,e,c[4][e]);a.vb[b]=d}var wi=[!0,[0,0],[0,0],[0,0],[0,0]];
        function vi(a,b,c){var d=a.Ub[b];d||(d={Ci:[0,0],pc:[0,0],kb:[0,0],fb:[0,0]});c=c&&8==c.length?c:wi;d.ze=c[0];d.Ci[0]=c[1][0];d.Ci[1]=c[1][1];d.pc[0]=c[2][0];d.pc[1]=c[2][1];d.kb[0]=c[3][0];d.kb[1]=c[3][1];d.fb[0]=c[4][0];d.fb[1]=c[4][1];d.mode=c[5];d.Oi=c[6];d.Z=a;d.eo=b;xi(d,c[8],c[9]);a.Ub[b]=d}function xi(a,b,c,d){"string"==typeof b&&(b=gb(b));b&&(a.Xi=null,a.Gs=b.id,a.Is=c,a.Vi=b,a.tl=b[c],a.jk=d)}var yi=[0,Array(4)];
        function mi(a,b,c,d){var e=a.ec[b];e||(e={Pc:[null,null,null,null]});d=d&&8==d.length?d:yi;e.port=c;e.wu=b<<3;e.Rg=d[0];e.Pc[0]=d[1][0];e.Pc[1]=d[1][1];e.Pc[2]=d[1][2];e.Pc[3]=d[1][3];e.De=d[2];e.Wd=d[3];e.Xb=d[4];e.Tc=d[5];e.Ef=d[6];e.yh=d[7];a.ec[b]=e}var zi=[[0,0],[0,0],[0,0],[0,0]];
        function ni(a,b,c){var d=a.Pb[b];d||(d={pc:[0,0],Wc:[0,0],fb:[0,0],Lf:[0,0]});c=c&&13==c.length?c:zi;d.pc[0]=c[0][0];d.pc[1]=c[0][1];d.Wc[0]=c[1][0];d.Wc[1]=c[1][1];d.fb[0]=c[2][0];d.fb[1]=c[2][1];d.Lf[0]=c[3][0];d.Lf[1]=c[3][1];d.xn=c[4];d.mode=c[5];d.wk=c[6];d.ff=c[7];d.ae=c[8];d.de=c[9];d.Ph=c[10];d.Rf=c[11];d.Od=c[12];a.Pb[b]=d}function oi(a,b){return((((b?a.nc:a.Td)&12)>>2)+1)*a.Nq+32*((b?a.zf:a.fg)&15)}function Ai(a,b){var c=b?a.nc:a.Td;return a.ka!=Uh||c&Yh.Ek?((c&Yh.nh)>>Yh.oh)+1:0}
        function ri(a,b){if(b<Ai(a)){if(!a.Te)return 1;if(b<a.Te.length)switch(a.Te[b]){case 160:case 180:case 320:case 360:return 1;case 720:return 3;case 1200:return 2;case 1440:return 4}}return 0}function pi(a,b){return((b?a.nc:a.Td)&Xh.nh)>>Xh.oh}
        function ai(a,b,c,d,e){for(var g="",l=1;8>=l;l++){var p="pcjs-bitCell";l||(p+=" pcjs-bitCellLeft");g+='<div id="'+(b+"-"+l)+'" class="'+p+'" data-value="0">'+l+"</div>\n"}c.innerHTML=g;b=kb(c,"pcjs-bitCell");c=null;for(l=0;l<b.length;l++)null!=e&&null!=e[l]&&(c=e[l]),c&&b[l].setAttribute("title",c),Bi(b[l],d&1<<l?!1:!0),b[l].onclick=function(a,b){return function(){var c="1"!=b.getAttribute("data-value");Bi(b,c);var d=b.getAttribute("id").split("-"),e=1<<+d[1]-1;switch(d[0]){case "sw1":a.nc=a.nc&~e|
        (c?0:e);break;case "sw2":a.zf=a.zf&~e|(c?0:e)}ki(a)}}(a,b[l])}function Bi(a,b){a.setAttribute("data-value",b?"1":"0");a.style.color=b?"#ffffff":"#000000";a.style.backgroundColor=b?"#000000":"#ffffff"}function ki(a){var b=a.va.swdesc,c={0:"Enhanced Color",1:"TV",2:"Color",3:"Monochrome"};if(null!=b){var d;d=""+(oi(a,!0)+"Kb");d+=", "+c[pi(a,!0)]+" Monitor";d+=", "+Ai(a,!0)+" Floppy Drives";if(null!=a.Td&&a.Td!=a.nc||null!=a.fg&&a.fg!=a.zf)d+=" (Reset required)";b.textContent=d}}
        function Ci(a,b,c,d,e){var g=a.vb[b],l=g.Ub[c],p=l.kb[g.wb];a.qa(768)&&m(a,d,null,e,"DMA"+b+".CHANNEL"+c+".ADDR["+g.wb+"]",p,!0);g.wb^=1;b||0!=c||g.wb||(l.kb[0]++,255<l.kb[0]&&(l.kb[0]=0,l.kb[1]++,255<l.kb[1]&&(l.kb[1]=0)));return p}function Di(a,b,c,d,e,g){var l=a.vb[b];a.qa(768)&&m(a,d,e,g,"DMA"+b+".CHANNEL"+c+".ADDR["+l.wb+"]",null,!0);a=l.Ub[c];a.kb[l.wb]=a.Ci[l.wb]=e;l.wb^=1}
        function Ei(a,b,c,d,e){var g=a.vb[b],l=g.Ub[c],p=l.fb[g.wb];a.qa(768)&&m(a,d,null,e,"DMA"+b+".CHANNEL"+c+".COUNT["+g.wb+"]",p,!0);g.wb^=1;b||0!=c||g.wb||(l.fb[0]--,0>l.fb[0]&&(l.fb[0]=255,l.fb[1]--,0>l.fb[1]&&(l.fb[1]=255)));return p}function Fi(a,b,c,d,e,g){var l=a.vb[b];a.qa(768)&&m(a,d,e,g,"DMA"+b+".CHANNEL"+c+".COUNT["+l.wb+"]",null,!0);a=l.Ub[c];a.fb[l.wb]=a.pc[l.wb]=e;l.wb^=1}function Gi(a,b,c,d){var e=a.vb[b],g=e.bf|1;e.bf&=-16;a.qa(768)&&m(a,c,null,d,"DMA"+b+".STATUS",g,!0);return g}
        function Hi(a,b,c,d,e){var g=a.vb[b];a.qa(768)&&m(a,c,d,e,"DMA"+b+".REQ",null,!0);a=d&3;g.bf=g.bf&~(16<<a)|(d&4)<<a+2;g.vn=d}function Ii(a,b,c,d,e){var g=a.vb[b];a.qa(768)&&m(a,c,d,e,"DMA"+b+".MASK",null,!0);b=d&3;c=g.Ub[b];c.ze=!!(d&4);c.ze||Ji(a,g.Xq+b)}function Ki(a,b,c,d,e){a.qa(768)&&m(a,c,d,e,"DMA"+b+".MODE",null,!0);a.vb[b].Ub[d&3].mode=d}function Li(a,b,c,d,e){a.qa(768)&&m(a,c,d,e,"DMA"+b+".MASTER_CLEAR",null,!0);a=a.vb[b];for(b=0;b<a.Ub.length;b++)vi(a,b)}
        function Mi(a,b,c,d,e){var g=a.vb[b].Ub[c].Oi;a.qa(768)&&m(a,d,null,e,"DMA"+b+".CHANNEL"+c+".PAGE",g,!0);return g}function Ni(a,b,c,d,e,g){a.qa(768)&&m(a,d,e,g,"DMA"+b+".CHANNEL"+c+".PAGE",null,!0);a.vb[b].Ub[c].Oi=e}function Oi(a,b,c,d){var e=a.pg[b];a.qa(768)&&m(a,c,null,d,"DMA.SPARE"+b+".PAGE",e,!0);return e}function Pi(a,b,c,d,e){a.qa(768)&&m(a,c,d,e,"DMA.SPARE"+b+".PAGE",null,!0);a.pg[b]=d}function Qi(a,b,c,d,e){xi(a.vb[b>>2].Ub[b&3],c,d,e)}
        function Ji(a,b,c){b=a.vb[b>>2].Ub[b&3];b.Vi&&b.tl&&b.jk?(c&&(b.Xi=c),b.ze||uf(a,b,!0)):c&&c(!0)}function uf(a,b,c){c&&(b.count=b.fb[1]<<8|b.fb[0],b.type=b.mode&12,b.Xn=b.Ld=!1);for(var d=!1;0<=b.count&&(c=b.Oi<<16|b.kb[1]<<8|b.kb[0],4==b.type?(d=!0,function(c){b.tl.call(b.Vi,b.jk,-1,function(g,l){0>g&&(b.Xn||(b.Xn=!0),g=255);b.ze||a.ma.dd(c,g);(d=l)&&setTimeout(function(){Ri(b)||uf(a,b)},0)})}(c)):8==b.type?(c=a.ma.Qa(c),0>b.tl.call(b.Vi,b.jk,c)&&(b.Ld=!0)):0!=b.type&&(b.Ld=!0)),!d&&!Ri(b););}
        function Ri(a){if(!a.Ld&&0<=--a.count&&(a.mode&32?(a.kb[0]--,0>a.kb[0]&&(a.kb[0]=255,a.kb[1]--,0>a.kb[1]&&(a.kb[1]=255))):(a.kb[0]++,255<a.kb[0]&&(a.kb[0]=0,a.kb[1]++,255<a.kb[1]&&(a.kb[1]=0))),!a.ze))return!1;var b=a.Z;b.bf=b.bf&~(16<<a.eo)|1<<a.eo;a.mode&16||(a.ze=!0,a.Vi=a.jk=null);a.Xi&&(a.Xi(!a.Ld),a.Xi=null);return!0}function Si(a,b,c){var d=0,e=a.ec[b];if(null!=e.yh)switch(e.yh&3){case 2:d=e.Xb;break;case 3:d=e.Tc}a.qa(34048)&&m(a,e.port,null,c,"PIC"+b,d,!0);return d}
        function Ti(a,b,c,d){var e=a.ec[b];a.qa(34048)&&m(a,e.port,c,d,"PIC"+b,null,!0);if(c&16)e.De=0,e.Pc[e.De++]=c,e.Wd=0,e.Ef=7,e.Xb=e.Tc=0,e.yh=10;else if(c&8)c&100&&a.Da("PIC"+b+"("+k(e.port)+"): unsupported OCW3 command: "+k(c)),e.yh=c;else if(d=c&224,d&32){var g,l=0;if(96==(d&96))l=1<<(c&7);else for(g=e.Ef+1;;){g&=7;var p=1<<g;if(e.Tc&p){l=p;break}if(g++==e.Ef)break}e.Tc&l&&(e.Tc&=~l,Ui(a));d&128&&a.Da("PIC"+b+"("+k(e.port)+"): unsupported OCW2 rotate command: "+k(c))}else 192==d?e.Ef=c&7:a.Da("PIC"+
        b+"("+k(e.port)+"): unsupported OCW2 automatic EOI command: "+k(c))}function Vi(a,b,c){var d=a.ec[b],e=d.Wd;a.qa(34048)&&m(a,d.port+1,null,c,"PIC"+b,e,!0);return e}function Wi(a,b,c,d){var e=a.ec[b];a.qa(34048)&&m(a,e.port+1,c,d,"PIC"+b,null,!0);e.De<e.Pc.length?(e.Pc[e.De++]=c,2==e.De&&e.Pc[0]&2&&e.De++,3!=e.De||e.Pc[0]&1||e.De++):(e.Wd=c,d=a.O,d.S|=4,Ui(a,b||253!=c?0:6))}function Xi(a,b,c){var d=a.ec[b>>3];b=1<<(b&7);d.Xb&b||(d.Xb|=b,d.Rg=c||0,Ui(a))}
        function Yi(a,b){var c=a.ec[b>>3],d=1<<(b&7);c.Xb&d&&(c.Xb&=~d,Ui(a))}function Ui(a,b){var c,d=-1;1<a.Ch&&(c=a.ec[1],d=~(c.Tc|c.Wd)&c.Xb);c=a.ec[0];0<=d&&(c.Xb=d?c.Xb|4:c.Xb&-5);var d=~(c.Tc|c.Wd)&c.Xb,e=a.O;e.ja&&(e.Bb=d?e.Bb|1:e.Bb&-2);d&&b&&(c.Rg=b)}function sf(a,b){void 0===b&&(b=0);var c=-1,d=a.ec[b];if(d.Rg)c=-2,d.Rg--;else for(var e=d.Xb&((d.Tc|d.Wd)^255),g=d.Ef+1;;){var g=g&7,l=1<<g;if(e&l){c=b||2!=g?d.Pc[1]+g:sf(a,1);0<=c&&(d.Tc|=l,d.Xb&=~l);break}if(g++==d.Ef)break}return c}
        function Zi(a,b,c,d){var e;e=a.Pb[b];e.ff==e.ae&&$i(a,b);if(e.Ph)return e.Lf[e.ff++];ii(a,b);e=e.fb[e.ff++];a.qa(2304)&&m(a,c,null,d,"TIMER"+b,e,!0);return e}function aj(a,b,c,d,e){a.qa(2304)&&m(a,c,d,e,"TIMER"+b,null,!0);c=a.Pb[b];c.ff==c.ae&&$i(a,b);c.pc[c.ff++]=d;c.ff==c.ae&&(c.Rf&&0!=c.mode&&8!=c.mode||(c.Ph=!1,c.fb[0]=c.Wc[0]=c.pc[0],c.fb[1]=c.Wc[1]=c.pc[1],c.Od=cd(a.O,a.jf),c.Rf=!0,c.de=0!=c.mode,0==b&&(Yi(a,0),d=bj(a,0)*a.ik|0,6==c.mode&&(d>>=1),hd(a.O,d))),2==b&&kd(a))}f=Sh.prototype;
        f.uq=function(a,b){m(this,a,null,b,"PIT1_CTRL",null,2048);return null};f.Xr=function(a,b,c){this.Tk=b;m(this,a,b,c,"PIT1_CTRL",null,2048);a=(b&192)>>6;if(3!=a){c=b&1;var d=b&14;if(b&=48){var e=this.Pb[a];e.wk=b;e.mode=d;e.xn=c;e.pc=[0,0];e.fb=[0,0];e.Lf=[0,0];e.de=!1;e.Ph=!1;e.Rf=!1;$i(this,a);0==a&&Yi(this,0);2==a&&255==this.ec[0].Wd&&77==this.Uc&&(a=this.Pb[0],a.Wc[0]=a.pc[0],a.Wc[1]=a.pc[1],a.Od=cd(this.O,this.jf))}else ii(this,a),b=this.Pb[a],b.Lf[0]=b.fb[0],b.Lf[1]=b.fb[1],b.Ph=!0,$i(this,a)}};
        function bj(a,b){var c=a.Pb[b],d=c.pc[1]<<8|c.pc[0];d||(d=1==c.ae?256:65536);return d}function md(a,b){var c=a.Pb[b],d=c.Wc[1]<<8|c.Wc[0];d||(d=1==c.ae?256:65536);return d}function $i(a,b){var c=a.Pb[b];c.ff=32==c.wk?1:0;c.ae=48==c.wk?2:1}
        function ii(a,b,c){var d=a.Pb[b];if(d.Rf&&(2!=b||a.Uc&1)){var e=cd(a.O,a.jf),g=(e-d.Od)/a.ik|0;0>g&&(d.Od=e,g=0);var l=bj(a,b),p=md(a,b)-g;0==d.mode?(0>=p&&(p=0),p||(d.de=!0,d.Rf=!1,b||Xi(a,0))):4==d.mode?(d.de=1!=p,0>=p&&(p=l+p,0>=p&&(p=l),d.Wc[0]=p&255,d.Wc[1]=p>>8,d.Od=e,!b&&d.de&&Xi(a,0))):6==d.mode&&(p-=g,0>=p&&(d.de=!d.de,p=l+p,0>=p&&(p=l),d.Wc[0]=p&255,d.Wc[1]=p>>8,d.Od=e,!b&&d.de&&Xi(a,0)));d.fb[0]=p&255;d.fb[1]=p>>8;c&&(a.Od=0)}return d}
        function ld(a,b){for(var c=0;c<a.Pb.length;c++)ii(a,c,b);if(a.ka>=Zh){var c=a.O.T.ge,d=cd(a.O,a.jf);null==a.gk&&(a.ei=cd(a.O,a.jf),a.yo=1024,a.gk=Math.floor(a.O.T.ge/a.yo),ti(a));d>=a.Xg&&(a.ga[12]|=64,a.ga[11]&64&&(a.ga[12]|=128,Xi(a,8)),a.Xg=d+a.gk);a.ga[0]==a.ga[1]&&a.ga[2]==a.ga[3]&&a.ga[4]==a.ga[5]&&(a.ga[12]|=32,a.ga[11]&32&&(a.ga[12]|=128,Xi(a,8)));var e=d-a.ei,g=Math.floor(e/c);if(g&&!(a.ga[11]&128)){for(;g--;)if(60<=++a.ga[0]&&(a.ga[0]=0,60<=++a.ga[2]&&(a.ga[2]=0,24<=++a.ga[4]))){a.ga[4]=
        0;a.ga[6]=a.ga[6]%7+1;var l;l=a.ga[9];var p=ua[a.ga[8]-1];28==p&&0===l%4&&(l%100||0===l%400)&&p++;l=p;++a.ga[7]>l&&(a.ga[7]=1,12<++a.ga[8]&&(a.ga[8]=1,a.ga[9]=(a.ga[9]+1)%100))}a.ga[12]|=16;a.ga[11]&16&&(a.ga[12]|=128,Xi(a,8))}a.ei=d-e%c}}f.vq=function(a,b){var c=this.Ni;if(this.zh&16)if(this.Uc&128)c=this.Td;else if(this.Ja){var c=this.Ja,d=0;c.fc.length&&(d=c.fc[0]);c.qa()&&c.ab("scan code "+k(d)+" delivered");c=d}m(this,a,null,b,"PPI_A",c);return c};
        f.Yr=function(a,b,c){m(this,a,b,c,"PPI_A");this.Ni=b};f.wq=function(a,b){var c=this.Uc;m(this,a,null,b,"PPI_B",c);return c};f.Zr=function(a,b,c){m(this,a,b,c,"PPI_B");cj(this,b);this.Ja&&dj(this.Ja,b&128?!1:!0,b&64?!0:!1)};function cj(a,b){var c=!!(b&2),d=!!(a.Uc&2);a.Uc=b;c!=d&&kd(a,c)}f.xq=function(a,b){var c=0,c=this.ka==Uh?this.Uc&4?c|this.fg&15:c|this.fg>>4&1:this.Uc&8?c|this.Td>>4:c|this.Td&15;this.Uc&1&&ii(this,2).de&&(c=this.Uc&2?c|32:c|16);m(this,a,null,b,"PPI_C",c,32896);return c};
        f.$r=function(a,b,c){m(this,a,b,c,"PPI_C");this.Uk=b};f.yq=function(a,b){var c=this.zh;m(this,a,null,b,"PPI_CTRL",c);return c};f.as=function(a,b,c){m(this,a,b,c,"PPI_CTRL");this.zh=b};f.Lp=function(a,b){var c=this.Hi;m(this,a,null,b,"8042_OUTBUFF",c,16384);this.lb&=-258;this.Ja&&ej(this.Ja);return c};
        f.lr=function(a,b,c){m(this,a,b,c,"8042_INBUF.DATA",null,16384);if(this.lb&8)switch(this.oe){case 96:fj(this,b);break;case 209:gj(this,b);break;default:if(fj(this,this.Vd&-17),this.Ja){a=-1;switch(b){case 255:a=250,hj(this.Ja)}ij(this,a)}}this.oe=b;this.lb&=-9};f.Mp=function(a,b){var c=this.Uc&-209|(cd(this.O)&64?16:0);m(this,a,null,b,"8042_RWREG",c,16384);return c};f.mr=function(a,b,c){m(this,a,b,c,"8042_RWREG",null,16384);cj(this,b)};
        f.Np=function(a,b){m(this,a,null,b,"8042_STATUS",this.lb,16384);var c=this.lb&255;this.lb&256&&(this.lb|=1,this.lb&=-257);return c};
        f.kr=function(a,b,c){m(this,a,b,c,"8042_INBUFF.CMD",null,16384);this.oe=b;this.lb|=8;a=0;240<=this.oe&&(a=this.oe^15,this.oe=240);switch(this.oe){case 32:ij(this,this.Vd);break;case 173:fj(this,this.Vd|16);break;case 174:fj(this,this.Vd&-17);this.Ja&&ej(this.Ja);break;case 170:this.Ja&&(a=this.Ja,a.fc=[],a.qa()&&a.ab("scan codes flushed"));fj(this,this.Vd|16);ij(this,85);gj(this,3);break;case 171:ij(this,0);break;case 192:ij(this,this.pe);break;case 208:ij(this,this.Ii);break;case 224:ij(this,this.Vd&
        16?0:1);break;case 240:a&1&&me(this.O)}};function fj(a,b){a.Vd=b;a.lb=a.lb&-5|b&4;a.Ja&&dj(a.Ja,!!(b&8),!(b&16))}function ij(a,b,c){0<=b&&(a.Hi=b,c?a.lb|=1:(a.lb&=-2,a.lb|=256))}function gj(a,b){a.Ii=b;dc(a.ma,!!(b&2));b&1||me(a.O)}function jj(a,b){a.ka<Zh?Xi(a,1,4):a.Vd&16||a.lb&257||(ij(a,b,!0),kj(a.Ja),Xi(a,1,120))}f.aq=function(a,b){m(this,a,null,b,"CMOS.ADDR",this.Df,4096);return this.Df};f.Ar=function(a,b,c){m(this,a,b,c,"CMOS.ADDR",null,4096);this.Df=b;this.Mi=b&128?0:128};
        f.bq=function(a,b){var c=this.Df&63,d=13>=c?ji(this,c):this.ga[c];this.qa(4352)&&m(this,a,null,b,"CMOS.DATA["+k(c)+"]",d,!0);null!=b&&12==c&&(this.ga[c]&=15,d&128&&Yi(this,8),d&64&&this.ga[11]&64&&ti(this));return d};
        f.Br=function(a,b,c){var d=this.Df&63;this.qa(4352)&&m(this,a,b,c,"CMOS.DATA["+k(d)+"]",null,!0);a=b^this.ga[d];if(13>=d){if(c=b,10>d){var e=!1;this.ga[11]&4||(c=10*(c>>4)+(c&15),e=!0);if(4==d||5==d)e&&23<c&&(c+=48),this.ga[11]&2||(12>=c?c=12==c?0:c:(c-=116,c=24==c?12:c))}}else c=b;this.ga[d]=c;11==d&&a&64&&b&64&&ti(this)};f.Wr=function(a,b,c){m(this,a,b,c,"NMI");this.Mi=b};f.Cr=function(a,b,c){m(this,a,b,c,"COPROC.CLEAR")};f.Dr=function(a,b,c){m(this,a,b,c,"COPROC.RESET")};
        f.Mq=function(a){if(this.qa(8192)&&Ee(this.Y,26,a)){var b=this.O.F>>8;Fe(this.O,a,function(a,d){return function(e){d=cd(a.O)-d;var g,l=a.O.H&255,p=a.O.H>>8,v=a.O.H&255,w=a.O.H>>8;if(2==b||3==b)g=" CH(hour)="+ga(p)+" CL(min)="+k(l)+" DH(sec)="+k(w);else if(4==b||5==b)g=" CX(year)="+ga(a.O.G)+" DH(month)="+k(w)+" DL(day)="+k(v);Ge(a.Y,26,e,d,g)}}(this,cd(this.O)))}return!0};function Vh(a,b){if(void 0===a)return b;for(var c=0,d=1,e=0;e<a.length;e++)"0"==a.charAt(e)&&(c|=d),d<<=1;return c}
        function kd(a,b){if(a.Gh)try{void 0!==b?a.Vn=b:b=a.Vn&&a.O&&a.O.fa.qb;var c=Math.round(1193181/bj(a,2));if(20>c||2E4<c)b=!1;b?a.zc?(a.zc.frequency.value=c,a.qa(8388608)&&a.ab("speaker set to "+c+"hz",!0)):(a.zc=a.Gh.createOscillator(),a.zc&&(a.zc.type="number"==typeof a.zc.type?1:"square",a.zc.connect(a.Gh.destination),a.zc.frequency.value=c,"start"in a.zc?a.zc.start(0):a.zc.noteOn(0),a.qa(8388608)&&a.ab("speaker on at  "+c+"hz",!0))):a.zc&&("stop"in a.zc?a.zc.stop(0):a.zc.noteOff(0),a.zc.disconnect(),
        delete a.zc,a.qa(8388608)&&a.ab("speaker off at "+c+"hz",!0))}catch(d){a.Da("AudioContext exception: "+d.message),a.Gh=null}else b&&a.ab("BEEP",8388608)}
        var bi={0:function(a,b){return Ci(this,0,0,a,b)},1:function(a,b){return Ei(this,0,0,a,b)},2:function(a,b){return Ci(this,0,1,a,b)},3:function(a,b){return Ei(this,0,1,a,b)},4:function(a,b){return Ci(this,0,2,a,b)},5:function(a,b){return Ei(this,0,2,a,b)},6:function(a,b){return Ci(this,0,3,a,b)},7:function(a,b){return Ei(this,0,3,a,b)},8:function(a,b){return Gi(this,0,a,b)},32:function(a,b){return Si(this,0,b)},33:function(a,b){return Vi(this,0,b)},64:function(a,b){return Zi(this,0,a,b)},65:function(a,
        b){return Zi(this,1,a,b)},66:function(a,b){return Zi(this,2,a,b)},67:Sh.prototype.uq,129:function(a,b){return Mi(this,0,2,a,b)},130:function(a,b){return Mi(this,0,3,a,b)},131:function(a,b){return Mi(this,0,1,a,b)},135:function(a,b){return Mi(this,0,0,a,b)}},di={96:Sh.prototype.vq,97:Sh.prototype.wq,98:Sh.prototype.xq,99:Sh.prototype.yq},fi={96:Sh.prototype.Lp,97:Sh.prototype.Mp,100:Sh.prototype.Np,112:Sh.prototype.aq,113:Sh.prototype.bq,128:function(a,b){return Oi(this,7,a,b)},132:function(a,b){return Oi(this,
        0,a,b)},133:function(a,b){return Oi(this,1,a,b)},134:function(a,b){return Oi(this,2,a,b)},136:function(a,b){return Oi(this,3,a,b)},137:function(a,b){return Mi(this,1,2,a,b)},138:function(a,b){return Mi(this,1,3,a,b)},139:function(a,b){return Mi(this,1,1,a,b)},140:function(a,b){return Oi(this,4,a,b)},141:function(a,b){return Oi(this,5,a,b)},142:function(a,b){return Oi(this,6,a,b)},143:function(a,b){return Mi(this,1,0,a,b)},160:function(a,b){return Si(this,1,b)},161:function(a,b){return Vi(this,1,b)},
        192:function(a,b){return Ci(this,1,0,a,b)},194:function(a,b){return Ei(this,1,0,a,b)},196:function(a,b){return Ci(this,1,1,a,b)},198:function(a,b){return Ei(this,1,1,a,b)},200:function(a,b){return Ci(this,1,2,a,b)},202:function(a,b){return Ei(this,1,2,a,b)},204:function(a,b){return Ci(this,1,3,a,b)},206:function(a,b){return Ei(this,1,3,a,b)},208:function(a,b){return Gi(this,1,a,b)}},ci={0:function(a,b,c){Di(this,0,0,a,b,c)},1:function(a,b,c){Fi(this,0,0,a,b,c)},2:function(a,b,c){Di(this,0,1,a,b,c)},
        3:function(a,b,c){Fi(this,0,1,a,b,c)},4:function(a,b,c){Di(this,0,2,a,b,c)},5:function(a,b,c){Fi(this,0,2,a,b,c)},6:function(a,b,c){Di(this,0,3,a,b,c)},7:function(a,b,c){Fi(this,0,3,a,b,c)},8:function(a,b,c){this.qa(768)&&m(this,a,b,c,"DMA0.CMD",null,!0);this.vb[0].Rk=b},9:function(a,b,c){Hi(this,0,a,b,c)},10:function(a,b,c){Ii(this,0,a,b,c)},11:function(a,b,c){Ki(this,0,a,b,c)},12:function(a,b,c){this.qa(768)&&m(this,a,b,c,"DMA0.RESET_FF",null,!0);this.vb[0].wb=0},13:function(a,b,c){Li(this,0,a,
        b,c)},32:function(a,b,c){Ti(this,0,b,c)},33:function(a,b,c){Wi(this,0,b,c)},64:function(a,b,c){aj(this,0,a,b,c)},65:function(a,b,c){aj(this,1,a,b,c)},66:function(a,b,c){aj(this,2,a,b,c)},67:Sh.prototype.Xr,129:function(a,b,c){Ni(this,0,2,a,b,c)},130:function(a,b,c){Ni(this,0,3,a,b,c)},131:function(a,b,c){Ni(this,0,1,a,b,c)},135:function(a,b,c){Ni(this,0,0,a,b,c)}},ei={96:Sh.prototype.Yr,97:Sh.prototype.Zr,98:Sh.prototype.$r,99:Sh.prototype.as,160:Sh.prototype.Wr},gi={96:Sh.prototype.lr,97:Sh.prototype.mr,
        100:Sh.prototype.kr,112:Sh.prototype.Ar,113:Sh.prototype.Br,128:function(a,b,c){Pi(this,7,a,b,c)},132:function(a,b,c){Pi(this,0,a,b,c)},133:function(a,b,c){Pi(this,1,a,b,c)},134:function(a,b,c){Pi(this,2,a,b,c)},136:function(a,b,c){Pi(this,3,a,b,c)},137:function(a,b,c){Ni(this,1,2,a,b,c)},138:function(a,b,c){Ni(this,1,3,a,b,c)},139:function(a,b,c){Ni(this,1,1,a,b,c)},140:function(a,b,c){Pi(this,4,a,b,c)},141:function(a,b,c){Pi(this,5,a,b,c)},142:function(a,b,c){Pi(this,6,a,b,c)},143:function(a,b,
        c){Ni(this,1,0,a,b,c)},160:function(a,b,c){Ti(this,1,b,c)},161:function(a,b,c){Wi(this,1,b,c)},192:function(a,b,c){Di(this,1,0,a,b,c)},194:function(a,b,c){Fi(this,1,0,a,b,c)},196:function(a,b,c){Di(this,1,1,a,b,c)},198:function(a,b,c){Fi(this,1,1,a,b,c)},200:function(a,b,c){Di(this,1,2,a,b,c)},202:function(a,b,c){Fi(this,1,2,a,b,c)},204:function(a,b,c){Di(this,1,3,a,b,c)},206:function(a,b,c){Fi(this,1,3,a,b,c)},208:function(a,b,c){this.qa(768)&&m(this,a,b,c,"DMA1.CMD",null,!0);this.vb[1].Rk=b},210:function(a,
        b,c){Hi(this,1,a,b,c)},212:function(a,b,c){Ii(this,1,a,b,c)},214:function(a,b,c){Ki(this,1,a,b,c)},216:function(a,b,c){this.qa(768)&&m(this,a,b,c,"DMA1.RESET_FF",null,!0);this.vb[1].wb=0},218:function(a,b,c){Li(this,1,a,b,c)},240:Sh.prototype.Cr,241:Sh.prototype.Dr};Pa(function(){for(var a=kb(window.document,"pcjs","chipset"),b=0;b<a.length;b++){var c=a[b],d=ib(c),d=new Sh(d);jb(d,c);ki(d)}});
        function lj(a){Ua.call(this,"ROM",a,lj);this.Qb=null;this.Lk=a.addr;this.jh=a.size;this.vh=a.alias;this.pi=a.file;this.Hs=ha(this.pi);this.lf=a.notify;this.hn=null;if(this.lf&&(a=this.lf.indexOf("["),0<a)){try{this.hn=eval(this.lf.substr(a))}catch(b){}this.lf=this.lf.substr(0,a)}if(this.pi){a=this.pi;var c=ia(this.Hs);"json"!=c&&"hex"!=c&&(a=Aa()+"/api/v1/dump?file="+this.pi+"&format=bytes&decimal=true");za(a,!0,null,this,lj.prototype.gr)}}eb(lj);
        lj.prototype.Kc=function(a,b,c,d){this.ma=b;this.O=c;this.Y=d;mj(this)};lj.prototype.lc=function(){this.Kk&&(this.Y&&nj(this.Y,this.Lk,this.jh,this.Kk),delete this.Kk);return!0};lj.prototype.kc=function(){return!0};
        lj.prototype.gr=function(a,b,c){if(c)this.Da("Unable to load system ROM (error "+c+")");else{if("["==b.charAt(0)||"{"==b.charAt(0))try{var d=eval("("+b+")"),e=d.bytes,g=d.data;if(e)this.Qb=e;else if(g)for(this.Qb=Array(4*g.length),c=b=0;b<g.length;b++)this.Qb[c++]=g[b]&255,this.Qb[c++]=g[b]>>8&255,this.Qb[c++]=g[b]>>16&255,this.Qb[c++]=g[b]>>24&255;else this.Qb=d;this.Kk=d.symbols;if(!this.Qb.length){Ba("Empty ROM: "+a);return}if(1==this.Qb.length){Ba(this.Qb[0]);return}}catch(l){this.Da("ROM data error: "+
        l.message);return}else for(a=b.replace(/\n/gm," ").replace(/ +$/,"").split(" "),this.Qb=Array(a.length),d=0;d<a.length;d++)this.Qb[d]=fa(a[d],16);mj(this)}};
        function mj(a){if(!pb(a))if(!a.pi)ob(a);else if(a.Qb&&a.ma){if(a.Qb.length!=a.jh)qb(a,"ROM size (0x"+h(a.Qb.length)+") does not match specified size ("+("0x"+h(a.jh))+")");else{var b;b=a.Lk;if(ec(a.ma,b,a.jh,Ac)){for(var c=0;c<a.Qb.length;c++){var d=a.ma,e=b+c;d.na[(e&d.Db)>>>d.Ca].ti(e&d.Ga,a.Qb[c]&255,e)}b=!0}else b=!1;if(b){b=[];"number"==typeof a.vh?b.push(a.vh):null!=a.vh&&a.vh.length&&(b=a.vh);for(c=0;c<b.length;c++){var d=a,e=b[c],g=ic(d.ma,d.Lk,d.jh);hc(d.ma,e,d.jh,g)}a.lf&&((b=gb(a.lf,a.id))?
        (c=a.Qb,d=a.hn,5==b.$a?oj(b,c,d||[12640,8752],8):7==b.$a&&oj(b,c,d||[14221,16269],8),ob(b)):a.Da("Unable to find component: "+a.lf));delete a.Qb}}ob(a)}}Pa(function(){for(var a=kb(window.document,"pcjs","rom"),b=0;b<a.length;b++){var c=a[b],d=ib(c),d=new lj(d);jb(d,c)}});function pj(a){Ua.call(this,"RAM",a,pj);this.Di=a.addr;this.Le=a.size;this.Ep=a.test;this.Ap=!!this.Le;this.Yi=!1}eb(pj);pj.prototype.Kc=function(a,b,c,d){this.ma=b;this.O=c;this.Y=d;this.ja=xb(a,"ChipSet");ob(this)};
        pj.prototype.lc=function(a,b){b||this.reset();return!0};pj.prototype.kc=function(){return!0};
        pj.prototype.reset=function(){if(!this.Di&&!this.Ap&&this.ja){var a=1024*oi(this.ja);this.Le&&a!=this.Le&&(jc(this.ma,this.Di,this.Le),this.Yi=!1);this.Le=a}!this.Yi&&this.Le&&ec(this.ma,this.Di,this.Le,1)&&(this.Yi=!0,this.status(Math.floor(this.Le/1024)+"Kb allocated"),"ramCPQ"==this.Lg&&(this.Z=new qj(this),ec(this.ma,rj,1,4,this.Z)));if(this.Yi){if(this.Ep||lc(this.ma,1138,4660),"ramCPQ"!=this.Lg&&this.ja&&(a=this.ja,a.ga)){var b=1048576>this.Di?21:23,c=a.ga[b]|a.ga[b+1]<<8,c=c+(this.Le>>10);
        a.ga[b]=c&255;a.ga[b+1]=c>>8;si(a)}}else Ba("No RAM allocated")};function qj(a){this.ns=a;this.Zm=sj;this.Xo=tj;this.Dk=uj;this.ph=null}
        var rj=-2134900736,sj=65535,tj=2575,uj=2,vj=[null,0],wj=[function(a){var b=255;2>a?b=a&1?this.Z.Xo>>8:this.Z.Xo&255:4>a&&(b=a&1?this.Z.Dk>>8:this.Z.Dk&255);return b},null,null,function(a,b){var c=this.Z;if(a)2==a&&(c.Dk=c.Dk&-256|b);else if(b!=(c.Zm&255)){var d=c.ns.ma;if(b&1)c.ph&&(hc(d,917504,131072,c.ph),c.ph=null);else{c.ph||(c.ph=ic(d,917504,131072));var e=ic(d,16646144,131072);hc(d,917504,131072,e,b&2?1:Ac)}c.Zm=c.Zm&-256|b}},null,null];qj.prototype.$n=function(){return vj};
        qj.prototype.ul=function(){return wj};Pa(function(){for(var a=kb(window.document,"pcjs","ram"),b=0;b<a.length;b++){var c=a[b],d=ib(c),d=new pj(d);jb(d,c)}});function xj(a){Ua.call(this,"Keyboard",a,xj,65536);this.Tn=Ia("Mobi");this.Bp=Ia("MSIE");this.ab("mobile keyboard support: "+(this.Tn?"true":"false"));this.Bn=0;this.bj=!0;this.rl=this.ll=!1;this.Vb=[];this.Uq=500;this.Vq=100;this.Tq=50;this.Mn=!1;ob(this)}eb(xj);
        var V={it:1,jt:3,kt:26," ":32,"!":33,'"':34,"#":35,$:36,"%":37,"&":38,"'":39,"(":40,")":41,"*":42,"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,ft:65,gt:66,dn:67,bp:68,E:69,nt:70,qt:71,en:72,st:73,tt:74,ut:75,vt:76,wt:77,Fk:78,yt:79,zt:80,Bt:81,gn:82,Ft:83,Pt:84,Tt:85,Ut:86,Vt:87,Xt:88,Yt:89,Zt:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,$t:97,au:98,du:99,ku:100,lu:101,mu:102,ou:103,pu:104,qu:105,ru:106,su:107,
        tu:108,uu:109,vu:110,xu:111,yu:112,zu:113,Au:114,Bu:115,Cu:116,Du:117,Eu:118,Fu:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126},yj={};yj[186]=V[";"];yj[187]=V["="];yj[188]=V[","];yj[189]=V["-"];yj[190]=V["."];yj[191]=V["/"];yj[192]=V["`"];yj[219]=V["["];yj[220]=V["\\"];yj[221]=V["]"];yj[222]=V["'"];yj[173]=V["-"];var zj={};zj[V["1"]]=V["!"];zj[V["2"]]=V["@"];zj[V["3"]]=V["#"];zj[V["4"]]=V.$;zj[V["5"]]=V["%"];zj[V["6"]]=V["^"];zj[V["7"]]=V["&"];zj[V["8"]]=V["*"];zj[V["9"]]=V["("];
        zj[V["0"]]=V[")"];zj[186]=V[":"];zj[187]=V["+"];zj[188]=V["<"];zj[189]=V._;zj[190]=V[">"];zj[191]=V["?"];zj[192]=V["~"];zj[219]=V["{"];zj[220]=V["|"];zj[221]=V["}"];zj[222]=V['"'];zj[173]=V._;zj[61]=V["+"];zj[59]=V[":"];
        var Aj={3016:1,1016:2,1017:8,1018:32,1091:128,1093:64,1224:128,1020:512,1144:1024,1145:2048},Bj={TAB:1009,ESC:1027,F1:1112,F2:1113,F3:1114,F4:1115,F5:1116,F6:1117,F7:1118,F8:1119,F9:1120,F10:1121,LEFT:1037,UP:1038,RIGHT:1039,DOWN:1040,CTRL_C:4003,CTRL_BREAK:4008,CTRL_ALT_DEL:4046},Cj={esc:1027,1:V["1"],2:V["2"],3:V["3"],4:V["4"],5:V["5"],6:V["6"],7:V["7"],8:V["8"],9:V["9"],0:V["0"],"-":V["-"],"=":V["="],bs:1008,tab:1009,q:81,w:87,e:69,r:82,t:84,y:89,u:85,i:73,o:79,p:80,"[":V["["],"]":V["]"],enter:13,
        ctrl:1017,a:65,s:83,d:68,f:70,g:71,h:72,j:74,k:75,l:76,";":V[";"],quote:V["'"],"`":V["`"],shift:1016,"\\":V["\\"],z:90,x:88,c:67,v:86,b:66,n:78,m:77,",":V[","],".":V["."],"/":V["/"],"right-shift":3016,prtsc:1044,alt:1018,space:V[" "],"caps-lock":1020,f1:1112,f2:1113,f3:1114,f4:1115,f5:1116,f6:1117,f7:1118,f8:1119,f9:1120,f10:1121,"num-lock":1144,"scroll-lock":1145,"num-home":1036,"num-up":1038,"num-pgup":1033,"num-sub":1109,"num-left":1037,"num-center":1101,"num-right":1039,"num-add":1107,"num-end":1035,
        "num-down":1040,"num-pgdn":1034,"num-ins":1045,"num-del":1046},Dj={"caps-lock":512,"num-lock":1024,"scroll-lock":2048},W={1027:1};W[V["1"]]=2;W[V["!"]]=10754;W[V["2"]]=3;W[V["@"]]=10755;W[V["3"]]=4;W[V["#"]]=10756;W[V["4"]]=5;W[V.$]=10757;W[V["5"]]=6;W[V["%"]]=10758;W[V["6"]]=7;W[V["^"]]=10759;W[V["7"]]=8;W[V["&"]]=10760;W[V["8"]]=9;W[V["*"]]=10761;W[V["9"]]=10;W[V["("]]=10762;W[V["0"]]=11;W[V[")"]]=10763;W[V["-"]]=12;W[V._]=10764;W[V["="]]=13;W[V["+"]]=10765;W[1008]=14;W[1009]=15;W[113]=16;
        W[81]=10768;W[119]=17;W[87]=10769;W[101]=18;W[69]=10770;W[114]=19;W[82]=10771;W[116]=20;W[84]=10772;W[121]=21;W[89]=10773;W[117]=22;W[85]=10774;W[105]=23;W[73]=10775;W[111]=24;W[79]=10776;W[112]=25;W[80]=10777;W[V["["]]=26;W[V["{"]]=10778;W[V["]"]]=27;W[V["}"]]=10779;W[13]=28;W[1017]=29;W[97]=30;W[65]=10782;W[115]=31;W[83]=10783;W[100]=32;W[68]=10784;W[102]=33;W[70]=10785;W[103]=34;W[71]=10786;W[104]=35;W[72]=10787;W[106]=36;W[74]=10788;W[107]=37;W[75]=10789;W[108]=38;W[76]=10790;W[V[";"]]=39;
        W[V[":"]]=10791;W[V["'"]]=40;W[V['"']]=10792;W[V["`"]]=41;W[V["~"]]=10793;W[1016]=42;W[V["\\"]]=43;W[V["|"]]=10795;W[122]=44;W[90]=10796;W[120]=45;W[88]=10797;W[99]=46;W[67]=10798;W[118]=47;W[86]=10799;W[98]=48;W[66]=10800;W[110]=49;W[78]=10801;W[109]=50;W[77]=10802;W[V[","]]=51;W[V["<"]]=10803;W[V["."]]=52;W[V[">"]]=10804;W[V["/"]]=53;W[V["?"]]=10805;W[3016]=54;W[1044]=55;W[1018]=56;W[V[" "]]=57;W[1020]=58;W[1112]=59;W[1113]=60;W[1114]=61;W[1115]=62;W[1116]=63;W[1117]=64;W[1118]=65;W[1119]=66;
        W[1120]=67;W[1121]=68;W[1144]=69;W[1145]=70;W[1036]=71;W[1038]=72;W[1033]=73;W[1109]=74;W[1037]=75;W[1101]=76;W[1039]=77;W[1107]=78;W[1035]=79;W[1040]=80;W[1034]=81;W[1045]=82;W[1046]=83;W[1122]=87;W[1123]=88;W[1091]=91;W[1093]=93;W[1224]=91;W[4003]=7470;W[4008]=7494;W[4046]=3677523;f=xj.prototype;
        f.Nb=function(a,b,c){var d=this,e=a+"-"+b;if(void 0===this.va[e])switch(b){case "kbd":return c.onkeydown=function(a){return Ej(d,a,!0)},c.onkeypress=function(a){a=a||window.event;a=a.which||a.keyCode;if(d.Mn){var b=d.Vb.length?d.Vb[0].yf:0;b&&(65<=b&&90>=b||97<=b&&122>=b)&&(65<=a&&90>=a||97<=a&&122>=a)&&b!=a&&(d.rl=!0,a=b)}(b=!W[a]||!!(d.hc&128))||Fj(d,a,!0);return b},c.onkeyup=function(a){return Ej(d,a,!1)},!0;case "caps-lock":return this.va[e]=c,c.onclick=function(){d.O&&d.O.ed();Fj(d,1020,!0)},
        !0;case "num-lock":return this.va[e]=c,c.onclick=function(){d.O&&d.O.ed();Fj(d,1144,!0)},!0;case "scroll-lock":return this.va[e]=c,c.onclick=function(){d.O&&d.O.ed();Fj(d,1145,!0)},!0;default:var g=b.toUpperCase().replace(/-/g,"_");if(void 0!==Bj[g]&&"button"==a)return this.va[e]=c,c.onclick=function(a,b,c){return function(){a.O&&a.O.ed();Mj(a,c,!0);Fj(a,c,!0)}}(this,g,Bj[g]),!0;if(void 0!==Cj[b])return this.Bn++,this.va[e]=c,a=function(a,b,c){return function(){Fj(a,c)}}(this,b,Cj[b]),b=function(a,
        b,c){return function(){Nj(a,c)}}(this,b,Cj[b]),"ontouchstart"in window?(c.ontouchstart=a,c.ontouchend=b):(c.onmousedown=a,c.onmouseup=c.onmouseout=b),!0}return!1};function Oj(a,b,c){if(a.Bn){for(var d in zj)if(b==zj[d]){b=+d;(d=yj[d])&&(b=d);break}for(var e in Cj)if((d=Cj[e]==b)||(d=b,97<=d&&122>=d&&(d-=32),d=Cj[e]==d),d){(a=a.va["key-"+e])&&void 0!==c&&(a.style.color=c?"#ffffff":"#000000",a.style.backgroundColor=c?"#000000":"#ffffff");break}}}
        f.Kc=function(a,b,c,d){this.ma=b;this.O=c;this.Y=d;this.ja=xb(a,"ChipSet")};function hj(a,b){a.ab("keyboard reset",65792);a.fc=[170];a.Mh=!0;b&&a.ja&&jj(a.ja,a.fc[0])}function dj(a,b,c){a.kl!==c&&(a.kl=a.pl=c)&&(a.Mh=!0);a.aj!==b&&(a.aj=b)&&!a.pl&&kj(a,!0);a.aj&&a.pl&&(hj(a,!0),a.pl=!1)}function ej(a){var b=0;a.fc.length&&a.Mh&&(b=a.fc[0],a.ja&&jj(a.ja,b));a.qa()&&a.ab("scan code "+k(b)+" available")}
        function kj(a,b){0<a.fc.length&&(a.fc.shift(),(a.Mh=b)&&(a.fc.length&&a.ja?jj(a.ja,a.fc[0]):b=!1),a.qa()&&a.ab("scan codes shifted, notify "+(b?"true":"false")))}f.lc=function(a,b){return!b&&(this.reset(),a&&this.restore&&!this.restore(a))?!1:!0};f.kc=function(a){return a&&this.save?this.save():!0};f.reset=function(){this.mf();this.hc=this.Yd=0;this.fc=[];this.Mh=!0};f.save=function(){var a=new Je(this);a.set(0,this.Ym());return a.data()};f.restore=function(a){return this.mf(a[0])};
        f.mf=function(a){var b=0;void 0===a&&(a=[]);this.kl=this.Mh=a[b++];this.aj=a[b];return!0};f.Ym=function(){var a=0,b=[];b[a++]=this.kl;b[a]=this.aj;return b};
        function Mj(a,b,c,d){if(W[b]){var e=Math.floor(b/1E3)&2;if(b=Aj[b]||0){!e||b&85||(b>>=1);if(b&3584){if(!1===d)return!0;d=null}null==d?d=!((c?a.Yd:a.hc)&b):d||b&255&&(b=255);if(c){a.Yd&=~b;d&&(a.Yd|=b);c=b;var g,l;for(l in Dj)d="led-"+l,e=Dj[l],c&&c!=e||!(g=a.va[d])||(g.style.backgroundColor=a.Yd&e?"#00ff00":"#000000")}else a.hc&=~b,d&&(a.hc|=b);return!0}}return!1}
        function Fj(a,b,c){if(W[b]&&a.O&&a.O.fa.qb){Aj[b]&&a.Vb.length&&0<a.Vb[0].ie&&(a.Vb[0].ie=0);for(var d,e=0;e<a.Vb.length;e++)if(d=a.Vb[e],d.yf==b){if(!c||0<=d.ie){e=-1;break}0<e&&(0<a.Vb[0].ie&&(a.Vb[0].ie=0),a.Vb.splice(e,1));break}0>e||(e==a.Vb.length&&(d={},d.yf=b,d.hc=a.hc,Oj(a,b,!0),e++),0<e&&a.Vb.splice(0,0,d),d.Oh=!0,d.ie=c?-1:Aj[b]?0:1,Pj(a,d))}}
        function Nj(a,b,c){if(!W[b]||!(c||a.O&&a.O.fa.qb))return!1;for(var d=!1,e=0;e<a.Vb.length;e++){var g=a.Vb[e];if(g.yf==b||g.yf==zj[b]){a.Vb.splice(e,1);g.Vo&&clearTimeout(g.Vo);g.Oh&&!c&&Qj(a,g.yf,!1);Oj(a,b,!1);d=!0;break}}!a.Vb.length&&a.rl&&(Mj(a,1020),a.rl=!1);return d}
        function Pj(a,b){if(a.O&&a.O.fa.qb){if(Qj(a,b.yf,b.Oh),b.ie){var c;if(0>b.ie){if(!b.Oh){Nj(a,b.yf);return}b.Oh=!1;c=a.Tq}else c=1==b.ie++?a.Uq:a.Vq;b.Vo=setTimeout(function(a){return function(){Pj(a,b)}}(a),c)}}else Nj(a,b.yf,!0)}function Rj(a,b,c){var d=b;if(65<=b&&90>=b)!(a.hc&515)==c&&(d=b+32);else if(97<=b&&122>=b)!!(a.hc&515)==c&&(d=b-32);else if(!!(a.hc&3)==c){if(a=zj[b])d=a}else if(a=yj[b])d=a;return d}f.kk=function(a){this.bj=a;a||(this.hc&=-256)};
        function Ej(a,b,c){var d=!0,e=!1,g=!1,l=b.keyCode,p=Rj(a,l,!0);a.ll&&p==V["`"]&&(l=p=27);if(W[l+1E3])if(p+=1E3,2==b.location&&(p+=2E3),Mj(a,p,!1,c)){if(20==l||144==l||145==l)a.Bp||(c=e=!0);if(!(c||91!=l&&93!=l))for(var v=0;v<a.Vb.length;v++){var w=a.Vb[v];w.Oh=!1;0<w.ie&&(w.ie=0)}}else 8==l&&8==(a.hc&40)&&(p=4008),d=!1;else if(W[p]&&a.hc&60&&(d=!1),!a.Mn&&d&&c||a.hc&192)g=!0;d||b.preventDefault();g||a.Tn&&d||(c?Fj(a,p,e):Nj(a,p)||(b=Rj(a,l,!1),b!=p&&Nj(a,b)));return d}
        function Qj(a,b,c){Mj(a,b,!0,c);var d=W[b]||W[b+1E3];if(void 0!==d){14==d&&40==(a.hc&40)&&(d=83);var e=[],g=d&255;e.push(g|(c?0:128));for(b=65<=b&&90>=b||97<=b&&122>=b;d>>>=8;){var l=0,p=d&255;224==g||225==g?e.push(g|(c?0:128)):(42==p?a.Yd&3||a.Yd&512&&b||(l=p):29==p?a.Yd&12||(l=p):56==p?a.Yd&48||(l=p):e.push(g|(c?0:128)),l&&(c?e.unshift(l):e.push(l|128)))}for(c=0;c<e.length;c++)d=a,g=e[c],d.fc&&(20>d.fc.length?(d.qa()&&d.ab("scan code "+k(g)+" buffered"),d.fc.push(g),1==d.fc.length&&d.ja&&jj(d.ja,
        g)):(20==d.fc.length&&d.fc.push(255),d.ab("scan code buffer overflow")))}}Pa(function(){for(var a=kb(window.document,"pcjs","keyboard"),b=0;b<a.length;b++){var c=a[b],d=ib(c),d=new xj(d);jb(d,c)}});
        function Y(a,b,c,d,e){Ua.call(this,"Video",a,Y,262144);this.ka=a.model;this.$a=Sj[this.ka]||Tj;this.Zd=a.memory||0;this.Ro=a.switches;this.Pd=a.mode;if(void 0===this.Pd||void 0===Uj[this.Pd])this.Pd=Vj;this.oj=a.charCols;this.Km=a.charRows;if(void 0===this.oj||void 0===this.Km)this.oj=Uj[this.Pd][0],this.Km=Uj[this.Pd][1];this.be=a.screenWidth;this.ue=a.screenHeight;this.Dp=a.scale;this.zp=12<=Math.round(this.be/this.oj);this.Fp=a.touchScreen;this.Jd=b;this.md=c;this.Za=(this.Ms=d)||b||null;this.of=
        null;this.yp=a.autoLock;this.Ya=this.dc=0;this.Ue=[];this.ne=Array(16);this.bj=!1;var g=this;this.Qn=Ia("Gecko/");b=["","moz","webkit","ms"];if(this.Gc=e)if(this.Gc.xg=e.requestFullscreen||e.msRequestFullscreen||e.mozRequestFullScreen||e.webkitRequestFullscreen,this.Gc.xg){for(e=0;e<b.length;e++)if(c=b[e]+"fullscreenchange","on"+c in document){document.addEventListener(c,function(){Wj(g,document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement?
        !0:!1)},!1);break}for(e=0;e<b.length;e++)if(c=b[e]+"fullscreenerror","on"+c in document){document.addEventListener(c,function(){Wj(g,null)},!1);break}}this.Za&&(this.Za.onfocus=function(){return g.kk(!0)},this.Za.onblur=function(){return g.kk(!1)},this.Za.Tf=this.Za.requestPointerLock||this.Za.mozRequestPointerLock||this.Za.webkitRequestPointerLock,this.Za.Wo=this.Za.exitPointerLock||this.Za.mozExitPointerLock||this.Za.webkitExitPointerLock,this.Za.Tf&&(e=function(){g.hi(document.pointerLockElement===
        g.Za||document.mozPointerLockElement===g.Za||document.webkitPointerLockElement===g.Za)},"onpointerlockchange"in document?document.addEventListener("pointerlockchange",e,!1):"onmozpointerlockchange"in document?document.addEventListener("mozpointerlockchange",e,!1):"onwebkitpointerlockchange"in document&&document.addEventListener("webkitpointerlockchange",e,!1)));if(a=a.fontROM)"json"!=ia(a)&&(a=Aa()+"/api/v1/dump?file="+a+"&format=bytes"),za(a,!0,null,this,this.hr)}eb(Y);
        var Tj=1,Sj={mda:1,cga:3,ega:5,vga:7},Vj=7,Xj={2:{tj:15700,sj:208,lk:85,mk:96},3:{tj:18432,sj:364,lk:85,mk:96},4:{tj:21850,sj:364,lk:85,mk:96},7:{tj:16700,sj:480,lk:85,mk:83}},Yj={6:[1,3,!0],7:[2,3,!0],8:[6,3,!0],9:[4,3,!0],10:[3,1,!0],11:[3,2,!0],0:[1,3,!1],1:[2,3,!1],2:[6,3,!1],3:[4,3,!1],4:[3,1,!1],5:[3,2,!1]},Uj=[,[40,25,1,0,3],,[80,25,1,0,3],[320,200,8,192],,[640,200,16,192]];Uj[Vj]=[80,25,1,0,1];Uj[13]=[320,200,16];Uj[14]=[640,200,16];Uj[15]=[640,350,16];Uj[16]=[640,350,16];
        Uj[17]=[640,480,16];Uj[18]=[640,480,16];Uj[19]=[320,200,16];Uj[0]=Uj[1];Uj[2]=Uj[3];Uj[5]=Uj[4];var Zj=Array(5);Zj[0]=[0,0,0,255];Zj[1]=[127,192,127,255];Zj[2]=[127,192,127,255];Zj[3]=[127,255,127,255];Zj[4]=[127,255,127,255];var ak=[0,1,2,2,2,2,2,2,0,3,4,4,4,4,4,4],bk=Array(16);bk[0]=[0,0,0,255];bk[1]=[0,0,170,255];bk[2]=[0,170,0,255];bk[3]=[0,170,170,255];bk[4]=[170,0,0,255];bk[5]=[170,0,170,255];bk[6]=[170,85,0,255];bk[7]=[170,170,170,255];bk[8]=[85,85,85,255];bk[9]=[85,85,255,255];
        bk[10]=[85,255,85,255];bk[11]=[85,255,255,255];bk[12]=[255,85,85,255];bk[13]=[255,85,255,255];bk[14]=[255,255,85,255];bk[15]=[255,255,255,255];var ck=[2,4,6],dk=[3,5,7],ek=[0,1,2,3,4,5,20,7,56,57,58,59,60,61,62,63],fk=[0,255,65280,65535,16711680,16711935,16776960,16777215,-16777216,-16776961,-16711936,-16711681,-65536,-65281,-256,-1],gk=[0];gk[128]=1;gk[32768]=2;gk[32896]=3;gk[8388608]=4;gk[8388736]=5;gk[8421376]=6;gk[8421504]=7;gk[-2147483648]=8;gk[-2147483520]=9;gk[-2147450880]=10;
        gk[-2147450752]=11;gk[-2139095040]=12;gk[-2139094912]=13;gk[-2139062272]=14;gk[-2139062144]=15;
        function hk(a,b,c,d){if(void 0!==b&&(!c||c.length)){this.video=a;var e=ik[b],g=a.Qd||e[5];if(!c||6>c.length)c=[!1,0,null,null,0,Array(5>b?jk:kk)];this.Y=a.Y;this.type=e[0];this.port=e[1];this.$a=b;this.Ya=e[2];this.dc=e[3];this.Zd=d||e[4];65536<=this.Zd&&720896<=this.Ya&&(this.dc=Math.min(this.Zd>>2,32768));this.Yc=c[0];this.cd=c[1];this.$g=c[2];this.wa=c[3];this.uc=c[4]&255;this.ok=c[4]>>8&255;this.Ib=c[5];this.zl=jk;this.Fi=lk;if(5<=b){this.zl=kk;this.Fi=mk;b=c[6];void 0===b&&(b=[!1,0,Array(20),
        0,3==g?0:1,0,0,Array(5),0,0,0,Array(9),0,[this.Ya,this.dc,this.Zd],Array(this.Zd>>2),5144,0,-1,0,-1,0,-1,0,0,0,0,1,255,0,0,0,Array(256)]);this.ce=b[0];this.Ie=b[1];this.He=b[2];this.Ok=nk;this.vk=b[3];this.dh=b[4];this.mi=b[5];this.Ke=b[6];this.fh=b[7];this.Qk=ok;this.Jo=b[8];this.Ko=b[9];this.Je=b[10];this.Zf=b[11];this.Pk=pk;this.yb=b[12];d=b[13];"number"==typeof d&&(d=[this.Ya,this.dc,d]);this.Ya=d[0];this.dc=d[1];d=this.Zd>>2;if((this.Ud=b[14])&&this.Ud.length<d){for(var e=this.Ud,l=0,p=Array(d),
        v=0;v<e.length-1;){for(var w=e[v++],F=e[v++];w--;)p[l]=F,l+=2;l==d&&(l=1)}this.Ud=p}(d=b[15])&&(d=d&8?d&-9:qk[d&65280]|qk[d&255]);this.Bk(d);this.Jm=b[16];this.tb=b[17];this.he=b[18];this.Cb=b[19];this.hk=b[20];this.sf=b[21];this.Wf=b[22];this.Al=b[23];this.Bl=b[24];this.fi=b[25];7==this.$a&&(this.Sm=b[26],this.Pm=b[27],this.vd=b[28],this.vc=b[29],this.rk=b[30],this.li=b[31])}g=Xj[g]||Xj[3];this.Cl=a.O.T.ge/g.tj|0;this.Yq=this.Cl*g.lk/100|0;this.so=this.Cl*g.sj|0;this.$q=this.so*g.mk/100|0;this.uo=
        c[7]||0}}
        var jk=18,kk=25,lk="HORZ_TOTAL HORZ_DISP HORZ_SYNC_POS HORZ_SYNC_WIDTH VERT_TOTAL VERT_TOTAL_ADJ VERT_DISP VERT_SYNC_POS INTERLACE_POS MAX_SCAN_LINE CURSOR_START CURSOR_END START_ADDR_HI START_ADDR_LO CURSOR_ADDR_HI CURSOR_ADDR_LO LIGHT_PEN_HI LIGHT_PEN_LO".split(" "),mk="HORZ_TOTAL HORZ_DISP_END HORZ_BLANK_START HORZ_BLANK_END HORZ_RETRACE_START HORZ_RETRACE_END VERT_TOTAL OVERFLOW PRESET_ROW_SCAN MAX_SCAN_LINE CURSOR_START CURSOR_END START_ADDR_HI START_ADDR_LO CURSOR_ADDR_HI CURSOR_ADDR_LO VERT_RETRACE_START VERT_RETRACE_END VERT_DISP_END OFFSET UNDERLINE VERT_BLANK_START VERT_BLANK_END MODE_CTRL LINE_COMPARE".split(" "),nk=
        "PAL00 PAL01 PAL02 PAL03 PAL04 PAL05 PAL06 PAL07 PAL08 PAL09 PAL0A PAL0B PAL0C PAL0D PAL0E PAL0F MODE OVERSCAN PLANES HORZPAN".split(" "),ok=["RESET","CLOCKING","MAPMASK","CHARMAP","MEMMODE"],pk="SRESET ESRESET COLORCMP DATAROT READMAP MODE MISC COLORDC BITMASK".split(" "),qk=[,,1024,5120];qk[16]=1280;qk[512]=0;qk[1024]=32;qk[1536]=96;qk[2560]=160;qk[3584]=224;qk[768]=16;qk[4096]=1;qk[8192]=2;qk[24576]=98;qk[40960]=162;qk[57344]=226;var rk=[];
        rk[1024]=function(a){a+=this.offset;return(this.Z.yb=this.ea[a])>>this.Z.Jm&255};rk[5120]=function(a){a+=this.offset;var b=this.Z.yb=this.ea[a&-2];return(a&1?b>>8:b)&255};rk[1280]=function(a){a+=this.offset;a=this.Z.yb=this.ea[a];for(var b=this.Z.Bl,c=this.Z.Al&b,d=0,e=128;e;)(a&b)==c&&(d|=e),c>>>=1,b>>>=1,e>>=1;return d};rk[0]=function(a,b){var c=a+this.offset,d;d=this.ea[c]&~this.Z.tb|(b|b<<8|b<<16|b<<24)&this.Z.tb;d=d&this.Z.Cb|this.Z.yb&~this.Z.Cb;this.ea[c]!=d&&(this.ea[c]=d,this.Ta=!0)};
        rk[32]=function(a,b){var c=a+this.offset;b=b>>this.Z.he|b<<8-this.Z.he&255;var d;d=(b|b<<8|b<<16|b<<24)&this.Z.sf|this.Z.Wf;d=d&this.Z.tb|this.ea[c]&~this.Z.tb;d=d&this.Z.Cb|this.Z.yb&~this.Z.Cb;this.ea[c]!=d&&(this.ea[c]=d,this.Ta=!0)};rk[96]=function(a,b){var c=a+this.offset;b=b>>this.Z.he|b<<8-this.Z.he&255;var d;d=(b|b<<8|b<<16|b<<24)&this.Z.sf|this.Z.Wf;d&=this.Z.yb;d=d&this.Z.tb|this.ea[c]&~this.Z.tb;d=d&this.Z.Cb|this.Z.yb&~this.Z.Cb;this.ea[c]!=d&&(this.ea[c]=d,this.Ta=!0)};
        rk[160]=function(a,b){var c=a+this.offset;b=b>>this.Z.he|b<<8-this.Z.he&255;var d;d=(b|b<<8|b<<16|b<<24)&this.Z.sf|this.Z.Wf;d|=this.Z.yb;d=d&this.Z.tb|this.ea[c]&~this.Z.tb;d=d&this.Z.Cb|this.Z.yb&~this.Z.Cb;this.ea[c]!=d&&(this.ea[c]=d,this.Ta=!0)};rk[224]=function(a,b){var c=a+this.offset;b=b>>this.Z.he|b<<8-this.Z.he&255;var d;d=(b|b<<8|b<<16|b<<24)&this.Z.sf|this.Z.Wf;d^=this.Z.yb;d=d&this.Z.tb|this.ea[c]&~this.Z.tb;d=d&this.Z.Cb|this.Z.yb&~this.Z.Cb;this.ea[c]!=d&&(this.ea[c]=d,this.Ta=!0)};
        rk[16]=function(a,b){a+=this.offset;var c,d=a&-2;c=this.Z.tb&(d==a?16711935:-16711936);c=(b|b<<8|b<<16|b<<24)&c|this.ea[d]&~c;c=c&this.Z.Cb|this.Z.yb&~this.Z.Cb;this.ea[d]!=c&&(this.ea[d]=c,this.Ta=!0)};rk[1]=function(a){a+=this.offset;var b=this.ea[a]&~this.Z.tb|this.Z.yb&this.Z.tb;this.ea[a]!=b&&(this.ea[a]=b,this.Ta=!0)};rk[17]=function(a){a+=this.offset;var b=a&-2;a=this.Z.tb&(b==a?16711935:-16711936);a=this.ea[b]&~a|this.Z.yb&a;this.ea[b]!=a&&(this.ea[b]=a,this.Ta=!0)};
        rk[2]=function(a,b){var c=a+this.offset,d=fk[b&15],d=d&this.Z.tb|this.ea[c]&~this.Z.tb,d=d&this.Z.Cb|this.Z.yb&~this.Z.Cb;this.ea[c]!=d&&(this.ea[c]=d,this.Ta=!0)};rk[98]=function(a,b){var c=a+this.offset,d=fk[b&15],d=d&this.Z.yb,d=d&this.Z.tb|this.ea[c]&~this.Z.tb,d=d&this.Z.Cb|this.Z.yb&~this.Z.Cb;this.ea[c]!=d&&(this.ea[c]=d,this.Ta=!0)};
        rk[162]=function(a,b){var c=a+this.offset,d=fk[b&15],d=d|this.Z.yb,d=d&this.Z.tb|this.ea[c]&~this.Z.tb,d=d&this.Z.Cb|this.Z.yb&~this.Z.Cb;this.ea[c]!=d&&(this.ea[c]=d,this.Ta=!0)};rk[226]=function(a,b){var c=a+this.offset,d=fk[b&15],d=d^this.Z.yb,d=d&this.Z.tb|this.ea[c]&~this.Z.tb,d=d&this.Z.Cb|this.Z.yb&~this.Z.Cb;this.ea[c]!=d&&(this.ea[c]=d,this.Ta=!0)};
        function sk(a){var b=[];if(void 0!==a.$a){b[0]=a.Yc;b[1]=a.cd;b[2]=a.$g;b[3]=a.wa;b[4]=a.uc|a.ok<<8;b[5]=a.Ib;if(5<=a.$a){var c=[];c[0]=a.ce;c[1]=a.Ie;c[2]=a.He;c[3]=a.vk;c[4]=a.dh;c[5]=a.mi;c[6]=a.Ke;c[7]=a.fh;c[8]=a.Jo;c[9]=a.Ko;c[10]=a.Je;c[11]=a.Zf;c[12]=a.yb;c[13]=[a.Ya,a.dc,a.Zd];var d;a:if(d=a.Ud){var e=0,g=[];if(void 0!==d[0])for(var l=0;2>l;l++)for(var p=l;p<d.length;){for(var v=d[p],w=p+2;w<d.length&&d[w]===v;)w+=2;g[e++]=w-p>>1;g[e++]=v;p=w}if(g.length<d.length){d=g;break a}}c[14]=d;c[15]=
        a.lj|8;c[16]=a.Jm;c[17]=a.tb;c[18]=a.he;c[19]=a.Cb;c[20]=a.hk;c[21]=a.sf;c[22]=a.Wf;c[23]=a.Al;c[24]=a.Bl;c[25]=a.fi;7==a.$a&&(c[26]=a.Sm,c[27]=a.Pm,c[28]=a.vd,c[29]=a.vc,c[30]=a.rk,c[31]=a.li);b[6]=c}b[7]=a.uo}return b}function tk(a,b,c,d,e){if(d){var g,l="";for(g=0;g<e.length;g++)l&&(l+="\n"),l+=b+"["+k(g)+"]: "+ma(e[g],19)+k(d[g])+(g===c?"*":"");a.Y.R(l)}else a.Y.R(b+": "+k(c))}hk.prototype.$n=function(a){return[this.Ud,a-this.Ya]};hk.prototype.ul=function(){return this.Ei};
        hk.prototype.Bk=function(a){if(null!=a&&a!=this.lj){var b=a&65280,c=rk[b];c||b&4096&&(c=rk[4096]);var b=a&247,d=rk[b];d||b&16&&(d=rk[16]);this.Ei||(this.Ei=Array(6));this.Ei[0]=c;this.Ei[3]=d;this.lj=a}};var ik=[];ik[Tj]=["MDA",948,720896,4096,0,3];ik[3]=["CGA",980,753664,16384,0,2];ik[5]=["EGA",980,753664,16384,65536,4];ik[7]=["VGA",980,753664,16384,262144,7];f=Y.prototype;
        f.Kc=function(a,b,c,d){this.ma=b;this.O=c;this.Y=d;3!=Sj[this.ka]&&(oc(b,this,uk),sc(b,this,vk));Sj[this.ka]!=Tj&&(oc(b,this,wk),sc(b,this,xk));5<=this.$a&&(oc(b,this,yk),sc(b,this,zk));7==this.$a&&(oc(b,this,Ak),sc(b,this,Bk));if(d){var e=this;hi(d,262144,function(a){if(e.Va)if(a){var b=e.Va;if(b.Ud){a=fa(a);a=void 0!==a?a-b.Ya:b.ms||0;0>a&&(a=0);for(var c="",d=0;8>d;d++){for(var g=h(b.Ya+a)+":",K=0;8>K&&a<b.Ud.length;K++)var J=b.Ud[a++],g=g+(" "+h(J));c&&(c+="\n");c+=g}c&&b.Y.R(c);b.ms=a}else b.Y.R("no buffer")}else e.Y.R("BIOSMODE: "+
        k(e.Fe)),b=e.Va,tk(b,"CRTC",b.uc,b.Ib,b.Fi),5<=b.$a&&(tk(b," GRC",b.Je,b.Zf,b.Pk),tk(b," SEQ",b.Ke,b.fh,b.Qk),tk(b," ATC",b.Ie,b.He,b.Ok),b.Y.R("   ATCDATA: "+b.ce),tk(b,"      FEAT",b.mi),tk(b,"      MISC",b.dh),tk(b,"   STATUS0",b.vk)),tk(b,"   STATUS1",b.wa),b.$a!=Tj&&3!=b.$a||tk(b,"   MODEREG",b.cd),3==b.$a&&tk(b,"     COLOR",b.$g),5<=b.$a&&(b.Y.R("   LATCHES: 0x"+h(b.yb)),b.Y.R("    ACCESS: "+ga(b.lj)),b.Y.R("Use 'dump video [addr]' to dump video memory"));else e.Y.R("no active video card")})}if((this.Ja=
        xb(a,"Keyboard"))&&this.Jd){for(var g in this.va)0<g.indexOf("lock")&&this.Ja.Nb("led",g,this.va[g]);this.Ja.Nb(this.Ms?"textarea":"canvas","kbd",this.Za)}this.Ji=9;(this.ja=xb(a,"ChipSet"))&&this.Ro&&5==this.$a&&(this.Ji=Vh(this.Ro,this.Ji));this.Ja&&this.Fp&&Ck(this)};
        f.Nb=function(a,b,c){var d=this;if(!this.va[b])switch(this.va[b]=c,b){case "fullScreen":return this.Gc&&this.Gc.xg?c.onclick=function(){d.xg()}:c.parentNode.removeChild(c),!0;case "lockPointer":return this.Js=c.textContent,this.Za&&this.Za.Tf?c.onclick=function(){d.Tf(!0)}:c.parentNode.removeChild(c),!0;case "refresh":return c.onclick=function(){ed(d,!0)},!0}return!1};f.ed=function(){this.Za&&this.Za.focus()};
        f.xg=function(){var a=!1;if(this.Gc){if(this.Gc.xg){a="100%";if(screen&&screen.width&&screen.height){var b=screen.width/screen.height,c=this.be/this.ue;b>c&&(a=Math.round(c/b*100)+"%")}this.Qn?(this.Jd.style.width=a,this.Jd.style.width=a,this.Jd.style.display="block",this.Jd.style.margin="auto"):(this.Gc.style.width=a,this.Gc.style.height="auto");this.Gc.style.backgroundColor="black";this.Gc.xg();a=!0}this.ed()}return a};
        function Wj(a,b){!b&&a.Gc&&(a.Qn?a.Jd.style.width=a.Jd.style.height="":a.Gc.style.width=a.Gc.style.height="");a.ab("notifyFullScreen("+b+")",!0);a.Ja&&(a.Ja.ll=b)}f.Tf=function(a){var b=!1;this.Za&&(a?this.Za.Tf&&(this.Za.Tf(),this.of.hi(!0),b=!0):this.Za.Wo&&(this.Za.Wo(),this.of.hi(!1),b=!0),this.ed());return b};f.hi=function(a){this.of&&(this.of.hi(a),this.Ja&&(this.Ja.ll=a));var b=this.va.lockPointer;b&&(b.textContent=a?"Press Esc to Unlock Pointer":this.Js)};
        function Ck(a){var b=a.Za;b&&!a.Nh&&(b.addEventListener("touchstart",function(b){Dk(a,b)},!1),b.addEventListener("touchmove",function(b){Dk(a,b)},!0),b.addEventListener("touchend",function(){},!1),a.Nh=!0)}f.kk=function(a){this.bj=a;this.Ja&&this.Ja.kk(a)};
        function Dk(a,b){a.bj&&b.preventDefault();var c=0,d=0,e=a.Jd;do isNaN(e.offsetLeft)||(c+=e.offsetLeft,d+=e.offsetTop);while(e=e.offsetParent);var g=a.be/a.Jd.offsetWidth,e=a.ue/a.Jd.offsetHeight,l,p;b.targetTouches?(l=b.targetTouches[0].pageX,p=b.targetTouches[0].pageY):(l=b.pageX,p=b.pageY);c=(l-c)*g/(a.be/3)|0;d=(p-d)*e/(a.ue/3)|0;1!=d?d?Fj(a.Ja,1040,!0):Fj(a.Ja,1038,!0):1!=c&&(c?Fj(a.Ja,1039,!0):Fj(a.Ja,1037,!0))}
        f.lc=function(a,b){if(!b)if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};f.kc=function(a){return a&&this.save?this.save():!0};
        f.reset=function(){var a=!0,b=0;this.ja&&(b=pi(this.ja));this.ka||(this.$a=3==b?Tj:3);this.Pd=3;switch(this.$a){case 7:b=7;break;case 5:var c=Yj[this.Ji];c&&(b=c[0]);b||(b=4);break;case Tj:b=3;this.Pd=Vj;break;default:b=2}this.Qd!==b&&(this.Qd=b,a=!0);this.Va=null;this.Kd=this.Yk=new hk(this,Tj);this.ic=this.Si=new hk(this,3);5>this.$a?this.W=new hk:(this.W=new hk(this,this.$a,null,this.Zd),Ek(this));Fk(this);this.Fe=null;this.Hf=this.pd=-1;this.Gf=0;Gk(this,this.Pd);if(this.Va.Ya&&a){a=this.Va.Ya+
        this.Zk;for(b=this.Va.Ya;b<a;b+=2){var d=65536*Math.random()|0;4==this.Qd||7==this.Qd?(c=b>>1&255,d=d>>8&-129,d>>4==(d&15)&&(d^=15)):(c=d&255,d=(d&256?7:112)|8&d>>8);lc(this.ma,b,c|d<<8)}ed(this,!0)}};function Ek(a){a.W.dh&1?(a.Kd=a.Yk,a.ic=a.W):(a.Kd=a.W,a.ic=a.Si)}f.save=function(){var a=new Je(this);a.set(0,sk(this.Yk));a.set(1,sk(this.Si));a.set(2,[this.Qd,this.Pd,this.Fe]);a.set(3,sk(this.W));return a.data()};
        f.restore=function(a){var b=a[2];this.Qd=b[0];this.Pd=b[1];this.Fe=b[2];this.Va=null;this.Kd=this.Yk=new hk(this,Tj,a[0]);this.ic=this.Si=new hk(this,3,a[1]);this.W=new hk(this,this.$a,a[3],this.Zd);this.W.Yc&&Ek(this);Fk(this);if(!Hk(this))return!1;Ik(this);return!0};
        f.hr=function(a,b,c){if(c)this.Da("Unable to load font ROM image (error "+c+")");else{try{var d=eval("("+b+")");if(!d.length){Ba("Empty font ROM image: "+a);return}if(1==d.length){Ba(d[0]);return}if(8192==d.length)oj(this,d,[6144,0]);else{this.Da("Unrecognized font data length ("+d.length+")");return}}catch(e){this.Da("Font ROM data error: "+e.message);return}(this.md||this.Y)&&ob(this)}};
        function Jk(a,b){if(1==b)return a.ne[0]=bk[0],a.ne[1]=bk[7],a.ne;if(2==b){var c=a.Va.$g;if(a.Va===a.W){var d=a.W.He[0],c=d&7;d&16&&(c|=8);18!=a.W.He[1]&&(c|=32)}a.ne[0]=bk[c&15];c=c&32?dk:ck;for(d=0;d<c.length;d++)a.ne[d+1]=bk[c[d]];return a.ne}if(a.ic===a.Si)return bk;c=null!=a.W.He[15]?a.W.He:ek;for(d=0;d<a.ne.length;d++){var e=c[d]||0;a.ne[d]=[(e&4?170:0)|(e&32?85:0),(e&2?170:0)|(e&16?85:0),(e&1?170:0)|(e&8?85:0),255]}return a.ne}function oj(a,b,c,d){a.Bi=b;a.Jk=c;a.Mf=d}
        function Fk(a){var b=!1;if(window&&a.Bi){var c=Jk(a),d,e=a.Mf?a.Mf:8;Kk(a,3,a.Jk[0],0,e,8,a.Bi,c)&&(b=!0);d=a.Mf?0:2048;e=a.Mf?a.Mf:9;Kk(a,1,a.Jk[1],d,e,14,a.Bi,Zj,ak)&&(b=!0);a.Mf&&Kk(a,a.$a,a.Jk[1],0,a.Mf,14,a.Bi,c)&&(b=!0)}return b}function Kk(a,b,c,d,e,g,l,p,v){var w=!1;null!=c&&(Lk(a,b,c,d,e,g,l,p,v)&&(w=!0),a.zp&&Lk(a,b<<1,c,d,e,g,l,p,v)&&(w=!0));return w}
        function Lk(a,b,c,d,e,g,l,p,v){var w=!1,F=b&1?0:1,K=a.Ue[b];K||(K={Hc:e<<F,Ic:g<<F,mg:Array(p.length),mn:p.slice(),qh:v,Hk:Array(p.length)});for(v=0;v<p.length;v++){var J=p[v],I=K.mg[v]?K.mn[v]:[];if(J[0]!==I[0]||J[1]!==I[1]||J[2]!==I[2]){var w=K,I=v,T=F,Z=c,S=d,X=e,xa=g,qa=l,Sa=[0,0,0,0],Fb=window.document.createElement("canvas");Fb.width=w.Hc<<4;Fb.height=w.Ic<<4;for(var Va=Fb.getContext("2d"),ca=void 0,ta=void 0,da=void 0,sb=8>xa||!S?xa:8,Gb=Va.createImageData(w.Hc,w.Ic),ca=0;256>ca;ca++){for(da=
        0;da<xa;da++)for(var Za=w.qh&&I&1&&da>=xa-2,$a=qa[da<sb?Z+ca*sb+da:S+ca*sb+da-sb],Ha=0;Ha<=T;Ha++)for(ta=0;ta<X;ta++){var Ad=ta<<T,bd=(da<<T)+Ha,Kc=Za||$a&128>>(8<=ta&&192<=ca&&223>=ca?7:ta)?J:Sa;Mk(Gb,Ad,bd,Kc);T&&Mk(Gb,Ad+1,bd,Kc)}Va.putImageData(Gb,(ca&15)*w.Hc,(ca>>4)*w.Ic)}w.mg[I]="#"+h(J[0],2)+h(J[1],2)+h(J[2],2);w.mn[I]=J;w.Hk[I]=Fb;w=!0}}a.Ue[b]=K;return w}function Nk(a){0<a.Gf||0<=a.pd?0>a.Hf&&(a.Hf=0):a.Hf=-1}
        function Ik(a){if(a.ac){for(var b=10;15>=b;b++)if(null==a.Va.Ib[b])return;var c=a.Va.Ib[10],b=c&31,d=a.Va.Ib[11]&31,e=a.Va.Ib[9]&31,g=!1;a.Va===a.W&&(g=!0,7!=e||4!=b||d||(d=7));if(c&32||b>d&&!g||b>e)Ok(a);else{c=a.Va.Ib[15]+((a.Va.Ib[14]&63)<<8);a.pd!=c&&(Ok(a),a.pd=c);d=d-b+1;if(a.ap!=b||a.In!=d)a.ap=b,a.In=d;a.gf=e+1;Nk(a)}}}
        function Ok(a){if(0<=a.pd){if(void 0!==a.Nc){var b=a.Nc[a.pd];if(b&131072){var b=b&-131073,c=a.pd%a.sb,d=a.pd/a.sb|0;a.ac&&a.Ue[a.ac]&&(a.wg&&Pk(a,c,d,b,a.wg),Pk(a,c,d,b));a.Nc[a.pd]=b}}a.pd=-1}}
        function Qk(a){var b;a=a.Va;var c=a.Zf[5];if(null!=c){b=1024;var d=0,e=a.Zf[3]&31;switch(c&3){case 0:if(e){d=32;switch(e&24){case 8:d=96;break;case 16:d=160;break;case 24:d=224}a.he=e&7}break;case 1:d=1;break;case 2:switch(e&24){default:d=2;break;case 8:d=98;break;case 16:d=162;break;case 24:d=226}}c&8&&(b=1280);a=a.fh[4];null==a||a&4||(b|=4096,d|=16);b|=d}return b}f.Sd=function(a){var b=this.Va;b&&null!=a&&a!=b.lj&&(b.Bk(a),this.ma.Bk(b.Ya,b.dc,b.ul()))};
        function Hk(a,b){var c,d=a.Fe,e=a.Va;if(e)if(e.$a==Tj)d=Vj;else if(5<=e.$a){var d=null,g=e.Zd>>2,l=32768<g?32768:g,p=e.Zf[6];if(null!=p){switch(p&12){case 0:e.Ya=655360;e.dc=g;d=255;break;case 4:e.Ya=655360;e.dc=g;d=3==a.Qd?15:16;break;case 8:e.Ya=720896;e.dc=l;d=Vj;break;case 12:e.Ya=753664,e.dc=l,d=3==a.Qd?2:3}c=e.fh[1]&8;g=e.Ib[6];g|=e.Ib[7]&1?256:0;7==e.$a&&(g|=e.Ib[7]&32?512:0);255!=d&&(p&1?753664==e.Ya?d=c?7-d:6:500>g?350>g&&(d=c?13:14):d=3==a.Qd?17:18:c&&(d-=2));c=Qk(a)}}else e.cd&8&&(e.cd&
        2?(d=e.cd&16?6:5,e.cd&4||--d):(d=e.cd&1?3:1,e.cd&4&&--d));else a.Fe=null,null==d&&(d=a.Pd);if(!Gk(a,d,b))return!1;a.Sd(c);return!0}
        function Gk(a,b,c){if(null!=b&&(b!=a.Fe||c)){a.gp=0;a.Fe=b;b=a.Va||(b==Vj?a.Kd:a.ic);if(b!=a.Va||b.Ya!=a.Ya||b.dc!=a.dc){Ok(a);if(a.Ya){if(!jc(a.ma,a.Ya,a.dc))return!1;a.Va&&(a.Va.Yc=!1)}a.Va=b;b.Yc=!0;a.Ya=b.Ya;a.dc=b.dc;if(!ec(a.ma,b.Ya,b.dc,3,b===a.W?b:null))return!1}a.ac=0;a.sb=a.oj;a.Dc=a.Km;a.pj=a.sb;a.nj=Uj[Vj][2];a.Eh=0;if(b=Uj[a.Fe])a.sb=b[0],a.Dc=b[1],a.nj=b[2],a.Eh=b[3]||0,a.ac=b[4],4!=a.Qd&&7!=a.Qd||a.Va!==a.W||3!=a.ac||(7==a.W.Ib[9]?a.Dc=43:a.ac=a.$a);a.po=a.sb*a.Dc|0;a.mj=a.po/a.nj|
        0;a.Zk=(a.mj<<1)+a.Eh|0;a.Dn=a.Eh?a.Zk+a.Eh>>1:0;13<=a.Fe&&(a.mj<<=1);if(a.Ue.length){a.te=a.be/a.sb|0;a.ve=a.ue/a.Dc|0;if(a.ac){b=a.Ue[a.ac];var d=a.Ue[a.ac<<1];a.Dp&&80==a.sb?d&&a.te>=3*d.Hc>>2&&(a.ac<<=1,b=d):(d&&a.te>=d.Hc&&(a.ac<<=1,b=d),b&&(a.te=b.Hc,a.ve=b.Ic));a.Jh=a.Kh=0;b&&(a.Jh=a.sb*b.Hc,a.Kh=a.Dc*b.Ic)}else a.te=a.ve=1,a.Jh=a.sb,a.Kh=a.Dc;a.ij=a.md.createImageData(a.Jh,a.Kh);a.tg=window.document.createElement("canvas");a.tg.width=a.Jh;a.tg.height=a.Kh;a.wg=a.tg.getContext("2d");a.bn=a.cn=
        0;a.dl=a.be;a.el=a.ue;b=a.be-a.sb*a.te;d=a.ue-a.Dc*a.ve;0<b&&(a.bn=b>>1,a.dl-=b);0<d&&(a.cn=d>>1,a.el-=d);if(b||d)a.md.fillStyle=a.Jd.style.backgroundColor,a.md.fillRect(0,0,a.be,a.ue)}!1!==c?ed(a,!0):Rk(a,!0)}return!0}function Mk(a,b,c,d){b=(b+c*a.width)*d.length;a.data[b]=d[0];a.data[b+1]=d[1];a.data[b+2]=d[2];a.data[b+3]=d[3]}function Rk(a,b){a.Gf=-1;a.Qf=!1;if(b){var c=a.mj;if(void 0===a.Nc||a.Nc.length!=c){a.Nc=Array(c);for(var d=0;d<c;d++)a.Nc[d]=-1}}}
        function Pk(a,b,c,d,e){var g=d&255,l=d>>8;d=l&15;var p=a.Ue[a.ac];p.qh&&(d=p.qh[d]);var v=l>>4&15;p.qh&&(v=p.qh[v]);e?(b*=p.Hc,c*=p.Ic,e.fillStyle=p.mg[v],e.fillRect(b,c,p.Hc,p.Ic)):(b=b*a.te+a.bn,c=c*a.ve+a.cn,a.md.fillStyle=p.mg[v],a.md.fillRect(b,c,a.te,a.ve));l&256&&(v=(g&15)*p.Hc,g=(g>>4)*p.Ic,e?e.drawImage(p.Hk[d],v,g,p.Hc,p.Ic,b,c,p.Hc,p.Ic):a.md.drawImage(p.Hk[d],v,g,p.Hc,p.Ic,b,c,a.te,a.ve));l&512&&(g=a.ap,l=a.In,e?(a.gf&&a.gf!==p.Ic&&(g=g*p.Ic/a.gf|0,l=l*p.Ic/a.gf|0),e.fillStyle=p.mg[d],
        e.fillRect(b,c+g,p.Hc,l)):(a.gf&&a.gf!==a.ve&&(g=g*a.ve/a.gf|0,l=l*a.ve/a.gf|0),a.md.fillStyle=p.mg[d],a.md.fillRect(b,c+g,a.te,l)))}
        function ed(a,b){if(a.fa.jc){var c=!1,d=a.Va;d&&(d!==a.W?d.cd&8&&(c=!0):d.Ie&32&&(c=!0));if(c||b){if(b)Rk(a,!0);else if(void 0===a.Nc)return;var e=!1;!(b||++a.gp&15)&&0<=a.Hf&&(a.Hf++,e=!0);var g=0,l=a.po,c=d.Ya,p=c+d.dc;Sk(a,d)&8&&(d.fi=(d.Ib[12]<<8)+d.Ib[13]|0);var v=d.fi;a.ac&&(v<<=1);c+=v;v=a.Zk;5<=a.$a&&d.Ib[19]&&(a.pj=d.Ib[19]<<(a.ac?1:4),v=((a.pj*(a.Dc-1)+a.sb)/a.nj<<1)+a.Eh|0);c+v>p&&(v=p-c,0>v&&(v=0));p=c+v;if(d=!b){for(var d=a.ma,w=!0,F=c>>>d.Ca;0<v&&F<d.na.length;)d.na[F].Ta&&(d.na[F].Ta=
        w=!1,d.na[F].On=!0),v-=d.nb,F++;d=w}if(d){if(!e)return;if(!a.Gf){if(0>a.pd)return;g=a.pd;l=g+1}}if(a.ac){if(a.Ue[a.ac]){e=0;d=a.Gf=0;v=1048575;a.Va.cd&32&&(d=32768,v&=~d,a.Hf&2||(v&=-65537));for(c+=g<<1;c<p&&g<l;)w=kc(a.ma,c),w|=65536,w&d&&(a.Gf++,w&=v),g==a.pd&&(w|=a.Hf&1?131072:0),a.Qf&&w===a.Nc[g]||(Pk(a,g%a.sb,g/a.sb|0,w,a.wg),a.Nc[g]=w,e++),c+=2,g++;a.Qf=!0;e&&a.wg&&a.md.drawImage(a.tg,0,0,a.Jh,a.Kh,a.bn,a.cn,a.dl,a.el);Nk(a)}}else if(a.Dn){for(var l=p,K,g=c,p=a.Gf=0,e=a.nj,d=16==e?65536:196608,
        v=16==e?1:2,w=Jk(a,v),J=F=0,I=a.sb,T=0,Z=a.Dc,S=0;g<l;){K=kc(a.ma,g);if(a.Qf&&K===a.Nc[p])F+=e;else{a.Nc[p]=K;K=K>>8|(K&255)<<8;var X=d,xa=16;F<I&&(I=F);for(var qa=0;qa<e;qa++){var Sa=(K&(X>>=v))>>(xa-=v);Mk(a.ij,F++,J,w[Sa])}F>T&&(T=F);J<Z&&(Z=J);J>=S&&(S=J+1)}g+=2;p++;if(F>=a.sb){F=0;J+=2;if(J>a.Dc)break;J==a.Dc&&(J=1,g=c+a.Dn)}}a.Qf=!0;I<a.sb&&(a.wg.putImageData(a.ij,0,0,I,Z,T-I,S-Z),a.md.drawImage(a.tg,0,0,a.sb,a.Dc,0,0,a.be,a.ue))}else{l=p;g=a.Gf=0;p=Jk(a);e=a.Va.Ud;v=d=0;w=a.sb;F=0;J=a.Dc;I=
        0;T=a.Va.He[19]&15;for(Z=a.pj>a.sb?a.pj-a.sb-T>>3:0;c<l;){S=c++-a.Ya;S=e[S];X=8;T?d?(K=a.sb-d,X>K&&(X=K)):(S<<=T,X-=T,a.Qf=!1):(a.Qf&&S===a.Nc[g]?(d+=X,X=0):a.Nc[g]=S,g++);if(X){d<w&&(w=d);for(K=0;K<X;K++)xa=gk[S&-2139062144]||0,Mk(a.ij,d++,v,p[xa]),S<<=1;d>F&&(F=d);v<J&&(J=v);v>=I&&(I=v+1)}if(d>=a.sb){d=0;if(++v>a.Dc)break;c+=Z}}T||(a.Qf=!0);w<a.sb&&(a.wg.putImageData(a.ij,0,0,w,J,F-w,I-J),a.md.drawImage(a.tg,0,0,a.sb,a.Dc,0,0,a.be,a.ue))}}}}
        function Sk(a,b){var c=0,d=cd(a.O)-b.uo;0>d&&(d=0);d%b.Cl>b.Yq&&(c|=1);d%b.so>b.$q&&(c|=9);return c}f.qq=function(a,b){return Tk(this,this.Kd,a,b)};f.Tr=function(a,b,c){var d=this.Kd;d.ok=d.uc;d.uc=b&31;m(this,a,b,c,"CRTC.INDX")};f.pq=function(a,b){return Uk(this,this.Kd,a,b)};f.Sr=function(a,b,c){Vk(this,this.Kd,a,b,c)};f.rq=function(a,b){return Wk(this,this.Kd,b)};f.Ur=function(a,b,c){a=this.Kd;m(this,a.port+4,b,c,"MODE");a.cd=b;Hk(this,!1)};f.sq=function(a,b){return Xk(this,this.Kd,b)};
        f.Co=function(a,b,c){this.W.mi=this.W.mi&-4|b&3;m(this,a,b,c,"FEAT")};f.ho=function(a,b){var c=this.W.ce?this.W.He[this.W.Ie&31]:this.W.Ie;b&&!this.qa()||m(this,960,null,b,"ATC."+(this.W.ce?this.W.Ok[this.W.Ie&31]:"INDX"),c);this.W.ce=!this.W.ce;return c};
        f.Bo=function(a,b,c){var d=this.W.Ie&32;if(this.W.ce){var e=this.W.Ie&31;if(16<=e||!d)c&&!this.qa()||m(this,a,b,c,"ATC."+this.W.Ok[e]),this.W.He[e]=b;this.W.ce=!1}else this.W.Ie=b,m(this,a,b,c,"ATC.INDX"),this.W.ce=!0,b&32&&!d&&Fk(this)&&ed(this,!0),this.W.fi=(this.W.Ib[12]<<8)+this.W.Ib[13]|0};
        f.Cq=function(a,b){var c=0;if(5==this.$a)c=3-((this.W.dh&12)>>2),c=(this.Ji&1<<c)<<4-c;else{var d=this.W.li[0];45!=(d&63)&&2880!=(d&4032)&&184320!=(d&258048)&&(c|=16)}c|=this.W.vk&-17;this.W.vk=c;m(this,962,null,b,"STATUS0",c);return c};f.Vr=function(a,b,c){this.W.dh=b;Ek(this);m(this,962,b,c,"MISC")};f.Dq=function(a,b){var c=this.W.Sm;m(this,963,null,b,"VGA_ENABLE",c);return c};f.fs=function(a,b,c){this.W.Sm=b;m(this,963,b,c,"VGA_ENABLE")};
        f.Bq=function(a,b){var c=this.W.Ke;m(this,964,null,b,"SEQ.INDX",c);return c};f.ds=function(a,b,c){this.W.Ke=b;m(this,964,b,c,"SEQ.INDX")};f.Aq=function(a,b){var c=this.W.fh[this.W.Ke];b&&!this.qa()||m(this,965,null,b,"SEQ"+this.W.Qk[this.W.Ke],c);return c};f.cs=function(a,b,c){c&&!this.qa()||m(this,965,b,c,"SEQ."+this.W.Qk[this.W.Ke]);this.W.fh[this.W.Ke]=b;switch(this.W.Ke){case 2:this.W.tb=fk[b&15];break;case 4:this.Sd(Qk(this))}};
        f.dq=function(a,b){var c=this.W.Pm;b&&!this.qa()||m(this,966,null,b,"DAC.MASK",c);return c};f.Fr=function(a,b,c){c&&!this.qa()||m(this,966,b,c,"DAC.MASK");this.W.Pm=b};f.eq=function(a,b){var c=this.W.rk;b&&!this.qa()||m(this,967,null,b,"DAC.STATE",c);return c};f.Gr=function(a,b,c){c&&!this.qa()||m(this,967,b,c,"DAC.READ");this.W.vd=b;this.W.rk=3;this.W.vc=0};f.Hr=function(a,b,c){c&&!this.qa()||m(this,968,b,c,"DAC.WRITE");this.W.vd=b;this.W.rk=0;this.W.vc=0};
        f.cq=function(a,b){var c=this.W.li[this.W.vd]>>this.W.vc&63;b&&!this.qa()||m(this,969,null,b,"DAC.DATA["+k(this.W.vd)+"]["+k(this.W.vc)+"]",c);this.W.vc+=6;12<this.W.vc&&(this.W.vc=0,this.W.vd=this.W.vd+1&255);return c};f.Er=function(a,b,c){a=this.W.li[this.W.vd];c&&!this.qa()||m(this,969,b,c,"DAC.DATA["+k(this.W.vd)+"]["+k(this.W.vc)+"]");this.W.li[this.W.vd]=a&~(63<<this.W.vc)|(b&63)<<this.W.vc;this.W.vc+=6;12<this.W.vc&&(this.W.vc=0,this.W.vd=this.W.vd+1&255)};
        f.Eq=function(a,b){var c=this.W.mi;m(this,970,null,b,"FEAT",c);return c};f.Or=function(a,b,c){this.W.Ko=b;m(this,970,b,c,"GRC2")};f.Fq=function(a,b){var c=this.W.dh;m(this,972,null,b,"MISC",c);return c};f.Nr=function(a,b,c){this.W.Jo=b;m(this,972,b,c,"GRC1")};f.jq=function(a,b){var c=this.W.Je;m(this,974,null,b,"GRC.INDX",c);return c};f.Mr=function(a,b,c){this.W.Je=b;m(this,974,b,c,"GRC.INDX")};
        f.iq=function(a,b){var c=this.W.Zf[this.W.Je];b&&!this.qa()||m(this,975,null,b,"GRC."+this.W.Pk[this.W.Je],c);return c};
        f.Lr=function(a,b,c){c&&!this.qa()||m(this,975,b,c,"GRC."+this.W.Pk[this.W.Je]);this.W.Zf[this.W.Je]=b;switch(this.W.Je){case 0:this.W.hk=fk[b&15];this.W.Wf=this.W.hk&~this.W.sf;break;case 1:this.W.sf=~fk[b&15];this.W.Wf=this.W.hk&~this.W.sf;break;case 2:this.W.Al=fk[b&15]&-2139062144;break;case 3:case 5:this.Sd(Qk(this));break;case 4:this.W.Jm=(b&3)<<3;break;case 6:Hk(this,!1);break;case 7:this.W.Bl=fk[b&15]&-2139062144;break;case 8:this.W.Cb=b|b<<8|b<<16|b<<24}};
        f.Yp=function(a,b){return Tk(this,this.ic,a,b)};f.yr=function(a,b,c){var d=this.ic;d.ok=d.uc;d.uc=b&31;m(this,a,b,c,"CRTC.INDX")};f.Xp=function(a,b){return Uk(this,this.ic,a,b)};f.xr=function(a,b,c){Vk(this,this.ic,a,b,c)};f.Zp=function(a,b){return Wk(this,this.ic,b)};f.zr=function(a,b,c){a=this.ic;m(this,a.port+4,b,c,"MODE");a.cd=b;Hk(this,!1)};f.Wp=function(a,b){var c=this.ic.$g;b&&!this.qa()||m(this,a,null,b,this.ic.type+".COLOR",c);return c};
        f.wr=function(a,b,c){c&&!this.qa()||m(this,a,b,c,this.ic.type+".COLOR");this.ic.$g!==b&&(this.ic.$g=b,Rk(this))};f.$p=function(a,b){return Xk(this,this.ic,b)};function Tk(a,b,c,d){var e;b.Yc&&(e=b.uc);m(a,c,null,d,"CRTC.INDX",e);return e}function Uk(a,b,c,d){var e;b.Yc&&b.uc<b.zl&&(e=b.Ib[b.uc]);d&&!a.qa()||m(a,c,null,d,"CRTC."+b.Fi[b.uc],e);return e}
        function Vk(a,b,c,d,e){b.uc<b.zl&&(e&&!a.qa()||m(a,c,d,e,"CRTC."+b.Fi[b.uc]),b.Ib[b.uc]=d,(12==b.uc||13==b.uc)&&Sk(a,b)&1&&(b.fi=(b.Ib[12]<<8)+b.Ib[13]|0),9==b.uc&&8!=b.ok&&Hk(a,!0),Ik(a))}function Wk(a,b,c){var d=b.cd;m(a,b.port+4,null,c,"MODE",d);return d}function Xk(a,b,c){var d=Sk(a,b);b===a.W?(d|=b.wa&48^48,b.ce=!1):d=(b.wa^=9)|240;b.wa=d;m(a,b.port+6,null,c,b===a.W?"STATUS1":"STATUS",d);return d}
        var uk={948:Y.prototype.qq,949:Y.prototype.pq,952:Y.prototype.rq,954:Y.prototype.sq},vk={948:Y.prototype.Tr,949:Y.prototype.Sr,952:Y.prototype.Ur},wk={980:Y.prototype.Yp,981:Y.prototype.Xp,984:Y.prototype.Zp,985:Y.prototype.Wp,986:Y.prototype.$p},xk={980:Y.prototype.yr,981:Y.prototype.xr,984:Y.prototype.zr,985:Y.prototype.wr},yk={960:Y.prototype.ho,961:Y.prototype.ho,962:Y.prototype.Cq,964:Y.prototype.Bq,965:Y.prototype.Aq,974:Y.prototype.jq,975:Y.prototype.iq},zk={954:Y.prototype.Co,960:Y.prototype.Bo,
        961:Y.prototype.Bo,962:Y.prototype.Vr,964:Y.prototype.ds,965:Y.prototype.cs,970:Y.prototype.Or,972:Y.prototype.Nr,974:Y.prototype.Mr,975:Y.prototype.Lr,986:Y.prototype.Co},Ak={963:Y.prototype.Dq,966:Y.prototype.dq,967:Y.prototype.eq,969:Y.prototype.cq,970:Y.prototype.Eq,972:Y.prototype.Fq},Bk={963:Y.prototype.fs,966:Y.prototype.Fr,967:Y.prototype.Gr,968:Y.prototype.Hr,969:Y.prototype.Er};
        Pa(function(){for(var a=kb(window.document,"pcjs","video"),b=0;b<a.length;b++){var c=a[b],d=ib(c),e=window.document.createElement("canvas");if(void 0===e||!e.getContext){c.innerHTML="<br/>Missing &lt;canvas&gt; support. Please try a newer web browser.";break}e.setAttribute("class","pcjs-canvas");e.setAttribute("width",d.screenWidth);e.setAttribute("height",d.screenHeight);e.style.backgroundColor=d.screenColor;e.style.height="auto";0<=(window?window.navigator.userAgent:"").indexOf("MSIE")&&(c.onresize=
        function(a,b,c,d){return function(){b.style.height=(a.clientWidth*d/c|0)+"px"}}(c,e,d.screenWidth,d.screenHeight),c.onresize());c.appendChild(e);var g=window.document.createElement("textarea");Ia("iOS")&&(g.setAttribute("autocapitalize","off"),g.setAttribute("autocorrect","off"));c.appendChild(g);var l=e.getContext("2d"),d=new Y(d,e,l,g,c);jb(d,c)}});
        function Yk(a){this.co=a.adapter;switch(this.co){case 1:this.Mm=1016;this.ci=4;break;case 2:this.Mm=760;this.ci=3;break;default:Ba("Unrecognized serial adapter #"+this.co);return}this.ef=null;Ua.call(this,"SerialPort",a,Yk,4194304);var b=a.binding,c;a=Zk;b&&(void 0===c&&(c="Panel"),(c=hb(c,this.id))&&(b=c.va[b])&&this.Nb(null,a,b))}eb(Yk);var Zk="buffer";f=Yk.prototype;f.qn=function(a,b){return a==this.Lg?(this.of=b,this):null};
        f.Nb=function(a,b,c){var d=this;switch(b){case Zk:return this.va[b]=this.ef=c,c.onkeydown=function(a){a=a||window.event;var b=a.keyCode;8===b&&(a.preventDefault&&a.preventDefault(),$k(d,[b]))},c.onkeypress=function(a){a=a||window.event;$k(d,[a.which||a.keyCode])},!0}return!1};f.Kc=function(a,b,c,d){this.ma=b;this.O=c;this.Y=d;this.ja=xb(a,"ChipSet");oc(b,this,al,this.Mm);sc(b,this,bl,this.Mm);ob(this)};f.lc=function(a,b){if(!b)if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};
        f.kc=function(a){return a&&this.save?this.save():!0};f.reset=function(){this.mf()};f.save=function(){var a=new Je(this),b=0,c=[];c[b++]=this.Vk;c[b++]=this.wn;c[b++]=this.hg;c[b++]=this.Ki;c[b++]=this.$e;c[b++]=this.Id;c[b++]=this.Xd;c[b++]=this.jd;c[b++]=this.tn;c[b]=this.uh;a.set(0,c);return a.data()};f.restore=function(a){return this.mf(a[0])};
        f.mf=function(a){var b=0;void 0===a&&(a=[0,0,384,0,1,0,0,96,48,[]]);this.Vk=a[b++];this.wn=a[b++];this.hg=a[b++];this.Ki=a[b++];this.$e=a[b++];this.Id=a[b++];this.Xd=a[b++];this.jd=a[b++];this.tn=a[b++];this.uh=a[b];return!0};function $k(a,b){a.uh=a.uh.concat(b);cl(a)}function cl(a){0<a.uh.length&&!(a.jd&1)&&(a.Vk=a.uh.shift(),a.jd|=1);var b=-1;a.jd&1&&a.Ki&1&&(b=4);0<=b?(a.$e&=-8,a.$e|=b,a.ja&&a.ci&&Xi(a.ja,a.ci,100)):(a.$e|=1,a.ja&&a.ci&&Yi(a.ja,a.ci))}
        f.zq=function(a,b){var c=this.Id&128?this.hg&255:this.Vk;m(this,a,null,b,this.Id&128?"DLL":"RBR",c);this.jd&=-2;cl(this);return c};f.kq=function(a,b){var c=this.Id&128?this.hg>>8:this.Ki;m(this,a,null,b,this.Id&128?"DLM":"IER",c);return c};f.lq=function(a,b){var c=this.$e;m(this,a,null,b,"IIR",c);return c};f.mq=function(a,b){var c=this.Id;m(this,a,null,b,"LCR",c);return c};f.oq=function(a,b){var c=this.Xd;m(this,a,null,b,"MCR",c);return c};
        f.nq=function(a,b){var c=this.jd;m(this,a,null,b,"LSR",c);return c};f.tq=function(a,b){var c=this.tn;m(this,a,null,b,"MSR",c);return c};f.es=function(a,b,c){m(this,a,b,c,this.Id&128?"DLL":"THR");this.Id&128?this.hg=this.hg&-256|b:(this.wn=b,this.jd&=-97,this.ef?(13!=b&&(8==b?this.ef.value=this.ef.value.slice(0,-1):(this.ef.value+=String.fromCharCode(b),this.ef.scrollTop=this.ef.scrollHeight)),a=!0):a=!1,a&&(this.jd|=96))};
        f.Pr=function(a,b,c){m(this,a,b,c,this.Id&128?"DLM":"IER");this.Id&128?this.hg=this.hg&255|b<<8:this.Ki=b};f.Qr=function(a,b,c){m(this,a,b,c,"LCR");this.Id=b};
        f.Rr=function(a,b,c){var d=this.Xd;m(this,a,b,c,"MCR");this.Xd=b;this.of&&(d^b)&3&&(a=this.of,b=this.Xd,(c=3==(b&3))?a.Yc||(d=!1,a.Xd&2||(a.reset(),a.ab("serial mouse reset"),d=!0),a.Xd&1||(a.ab("serial mouse ID requested"),d=!0),d&&($k(a.Fh,[77,77]),a.ab("serial mouse ID sent")),dl(a),a.setActive(c)):a.Yc&&(a.ab("serial mouse inactive"),el(a),a.setActive(c)),a.Xd=b)};
        var al={0:Yk.prototype.zq,1:Yk.prototype.kq,2:Yk.prototype.lq,3:Yk.prototype.mq,4:Yk.prototype.oq,5:Yk.prototype.nq,6:Yk.prototype.tq},bl={0:Yk.prototype.es,1:Yk.prototype.Pr,3:Yk.prototype.Qr,4:Yk.prototype.Rr};Pa(function(){for(var a=kb(window.document,"pcjs","serial"),b=0;b<a.length;b++){var c=a[b],d=ib(c),d=new Yk(d);jb(d,c)}});function fl(a){Ua.call(this,"Mouse",a,fl,33554432);if(this.vl=a.serial)this.Tm="SerialPort";this.setActive(!1);this.Nh=this.cj=!1;this.Cd=[];this.ng=[];ob(this)}eb(fl);
        f=fl.prototype;f.Kc=function(a,b,c,d){this.Fa=a;this.ma=b;this.O=c;this.Y=d;for(b=null;b=xb(a,"Video",b);)this.Cd.push(b)};f.setActive=function(a){this.Yc=a};
        f.lc=function(a,b){if(!b){if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;if(this.Tm&&!this.Fh){for(var c=null;(c=xb(this.Fa,this.Tm,c))&&(!c.qn||!(this.Fh=c.qn(this.vl,this))););if(this.Fh)for(this.ng=[],c=0;c<this.Cd.length;c++){var d;d=this.Cd[c];d.of=this;(d=d.Za)&&this.ng.push(d)}else Ba(this.id+": "+this.Tm+" "+this.vl+" unavailable")}this.Yc?dl(this):el(this)}return!0};f.kc=function(a){return a&&this.save?this.save():!0};f.reset=function(){this.mf()};
        f.save=function(){var a=new Je(this);a.set(0,this.Ym());return a.data()};f.restore=function(a){return this.mf(a[0])};f.mf=function(a){var b=0;void 0===a&&(a=[!1,-1,-1,0,0,!1,!1,0]);this.setActive(a[b++]);this.Pe=a[b++];this.Qe=a[b++];this.ig=a[b++];this.jg=a[b++];this.Zi=a[b++];this.$i=a[b++];this.Xd=a[b];return!0};f.Ym=function(){var a=0,b=[];b[a++]=this.Yc;b[a++]=this.Pe;b[a++]=this.Qe;b[a++]=this.ig;b[a++]=this.jg;b[a++]=this.Zi;b[a++]=this.$i;b[a]=this.Xd;return b};f.hi=function(a){this.cj=a};
        function dl(a){if(!a.Nh)for(var b=0;b<a.ng.length;b++)gl(a,a.ng[b])&&(a.Nh=!0)}function el(a){if(a.Nh)for(var b=0;b<a.ng.length;b++){var c=a.ng[b];c&&(c.style.cursor="auto")}}function gl(a,b){return b?(b.addEventListener("mousemove",function(b){a.lo(b)},!1),b.addEventListener("mousedown",function(b){a.bl(b.button,!0)},!1),b.addEventListener("mouseup",function(b){a.bl(b.button,!1)},!1),b.style.cursor="none",!0):!1}
        f.lo=function(a){if(this.Yc&&this.O&&this.O.fa.qb){if(0>this.Pe||0>this.Qe)this.Pe=a.clientX,this.Qe=a.clientY;this.cj?(this.ig=a.movementX||a.mozMovementX||a.webkitMovementX||0,this.jg=a.movementY||a.mozMovementY||a.webkitMovementY||0):(this.ig=a.clientX-this.Pe,this.jg=a.clientY-this.Qe);(this.ig||this.jg)&&hl(this,null,a.clientX,a.clientY);this.Pe=a.clientX;this.Qe=a.clientY}};
        f.bl=function(a,b){if(this.Yc&&this.O&&this.O.fa.qb){var c;!(c=!1!==this.cj)&&(c=this.Cd.length)&&(c=this.Cd[0],c=c.yp?c.Tf(!0):!1);c||(this.cj=null);c="mouse button"+a+" "+(b?"dn":"up");switch(a){case 0:this.Zi!=b&&(this.Zi=b,hl(this,c));break;case 2:this.$i!=b&&(this.$i=b,hl(this,c))}}};
        function hl(a,b,c,d){var e=64|(a.Zi?32:0)|(a.$i?16:0)|(a.jg&192)>>4|(a.ig&192)>>6,g=a.ig&63,l=a.jg&63;a.qa(4194304)&&a.ab((b?b+": ":"")+(void 0!==d?"mouse ("+c+","+d+"): ":"")+"serial packet ["+k(e)+","+k(g)+","+k(l)+"]",0,!0);$k(a.Fh,[e,g,l]);a.ig=a.jg=0}Pa(function(){for(var a=kb(window.document,"pcjs","mouse"),b=0;b<a.length;b++){var c=a[b],d=ib(c),d=new fl(d);jb(d,c)}});
        function il(a,b,c){Ua.call(this,"Disk",{id:a.fo+".disk"+ ++jl},il,2097152);this.Z=a;this.Fa=a.Fa;this.Y=a.Y;this.Sa=b;this.ke=b.name;this.Eg=b.Eg;this.dj=this.xe=!1;this.create(c,b.Eb,b.Fb,b.Mb,b.xb);this.Bf=[];this.yi=[];this.Me=null;this.no=0;this.sl=!1;ob(this)}var jl=0;eb(il);f=il.prototype;f.Kc=function(a,b,c,d){this.Y=d};f.lc=function(a,b){b||!this.dj||this.xe||(ob(this,!1),this.load(this.ke,this.bg,null,this.vp,this));return!0};f.vp=function(){ob(this,!0)};
        f.kc=function(a,b){if(this.xe){var c,d=0;if(this.sl&&!Ca("Disk writes are still in progress, shut down anyway?"))return!1;for(;c=kl(this,!1);)if(d=c[0]){this.Z.Da('Unable to save "'+this.ke+'" (error '+d+")");break}b&&this.xe&&(c="action=close&volume="+this.bg,c+="&machine="+this.Z.Hg(),c+="&user="+this.Z.kf(),za(Aa()+"/api/v1/disk?"+c,!0),this.xe=!1);!d&&a&&this.Z.Da(this.ke+" saved")}return!0};
        f.create=function(a,b,c,d,e){this.mode=a;this.Eb=b;this.Fb=c;this.Mb=d;this.xb=e;this.jb=[];if("preload"!=this.mode){a=Array(this.Eb);for(b=0;b<a.length;b++){c=Array(this.Fb);for(d=0;d<c.length;d++){e=Array(this.Mb);for(var g=1;g<=e.length;g++)e[g-1]=ll(null,b,d,g,this.xb,"local"==this.mode?0:null);c[d]=e}a[b]=c}this.jb=a}this.yg=null};
        f.load=function(a,b,c,d,e){var g=b;if(!this.Sf)if(this.ke=a,this.bg=b,this.Sf=d,this.pp=e||this.Z,c){var l=this,p=new FileReader;p.onload=function(){var a=p.result,b,c=a?a.byteLength:0,d=ea[c];if(d){l.Eb=d[0];l.Fb=d[1];l.Mb=d[2];l.xb=512;b=l.xb>>2;var e=d=0,a=new DataView(a,0,c);l.jb=Array(l.Eb);for(c=0;c<l.jb.length;c++)for(var g=l.jb[c]=Array(l.Fb),T=0;T<g.length;T++)for(var Z=g[T]=Array(l.Mb),S=0;S<Z.length;S++){for(var X=ll(null,c,T,S+1,l.xb,0),xa=X.data,qa=0;qa<b;qa++,e+=4)var Sa=xa[qa]=a.getInt32(e,
        !0),d=d+Sa&-1;X.Vc=b;Z[S]=X}l.yg=d;b=l}else l.Da("Unrecognized diskette format ("+c+" bytes)");l.Sf&&(l.Sf.call(l.Z,l.Sa,b,l.ke,l.bg),l.Sf=null)};p.readAsArrayBuffer(c)}else 0>b.indexOf("/api/v1/dump")&&(a=ia(b),"json"==a?g=encodeURI(b):"demandrw"==this.mode||"demandro"==this.mode?(g=ml(this,b),this.dj=!0):(c="path",d="&mbhd=10",!b.indexOf("http:")||!b.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(a)?(c="disk",d="&mbhd=0"):-1!==b.indexOf("/",b.length-1)&&(c="dir"),g=Aa()+"/api/v1/dump?"+
        c+"="+encodeURIComponent(b)+(this.Eg?"":d)+"&format=json")),za(g,!0,null,this,this.tp,b)};
        f.tp=function(a,b,c,d){var e=null;this.Gg=!1;var g=0>c&&this.Fa&&!this.Fa.fa.jc;if(this.dj)c?this.Z.Da('Unable to connect to disk "'+d+'" (error '+c+": "+b+")",g):(this.xe=!0,e=this);else if(c)this.Z.Da('Unable to load disk "'+this.ke+'" (error '+c+")",g);else try{if(0<ha(a,!0).toLowerCase().indexOf("-readonly"))this.Gg=!0;else{var l=b.indexOf("\n");0<l&&1024>l&&0<b.substring(0,l).indexOf("write-protected")&&(this.Gg=!0)}var p;p="<"==b.substr(0,1)?["Missing disk image: "+this.ke]:0>b.indexOf("0x")&&
        '["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");if(p.length)if(1==p.length)Ba(p[0]);else{this.Eb=p.length;this.Fb=p[0].length;this.Mb=p[0][0].length;var v=p[0][0][0];this.xb=v&&v.length||512;for(b=a=0;b<this.Eb;b++)for(c=0;c<this.Fb;c++)for(d=0;d<this.Mb;d++)if(v=p[b][c][d]){var w=v.length;void 0===w&&(w=v.length=512);var w=w>>2,F=v.pattern;void 0===F&&(F=v.pattern=0);var K=v.data;if(void 0===K){var J=v.bytes;if(void 0!==J&&J.length){for(var g=
        w<<2,I=J.length;I<g;I++)J[I]=F;this.fill(v,J,0)}else K=[],F=v.pattern=F|F<<8|F<<16|F<<24,v.data=K;delete v.bytes}ll(v,b,c);for(g=0;g<K.length;g++)a=a+K[g]&-1}this.jb=p;this.yg=a;e=this}else Ba("Empty disk image: "+this.ke)}catch(T){Ba("Disk image error: "+T.message)}this.Sf&&(this.Sf.call(this.pp,this.Sa,e,this.ke,this.bg),this.Sf=null)};function ll(a,b,c,d,e,g){a||(a={sector:d,length:e,data:[],pattern:g});a.Ip=b;a.Kp=c;a.Md=a.Vc=0;a.Ta=!1;return a}
        function ml(a,b){var c;c="action=open&volume="+b+("&mode="+a.mode);c+="&chs="+a.Eb+":"+a.Fb+":"+a.Mb+":"+a.xb;c+="&machine="+a.Z.Hg();c+="&user="+a.Z.kf();return Aa()+"/api/v1/disk?"+c}function nl(a,b,c,d,e,g,l){if(a.xe){var p;p="action=read&volume="+a.bg;p+="&chs="+a.Eb+":"+a.Fb+":"+a.Mb+":"+a.xb;p=p+("&addr="+b+":"+c+":"+d+":"+e)+("&machine="+a.Z.Hg());p+="&user="+a.Z.kf();za(Aa()+"/api/v1/disk?"+p,g,null,a,a.wp,[b,c,d,e,g,l])}else l&&l(-1,!1)}
        f.wp=function(a,b,c,d){var e=!1;a=d[0];var g=d[1],l=d[2],p=d[3];if(!c){b=JSON.parse(b);for(e=0;p--;){var v=this.seek(a,g,l,!0);if(!v)break;this.fill(v,b,e);e+=v.length;l++}e=d[4]}(d=d[5])&&d(c,e)};f.xp=function(a,b,c,d){a=d[0];b=d[1];var e=d[2],g=d[3];d=d[4];this.sl=!1;if(0<=a&&a<this.jb.length&&0<=b&&b<this.jb[a].length)for(--e;0<g--&&0<=e&&e<this.jb[a][b].length;e++){var l=this.jb[a][b][e];c?ol(this,l,!1):l.Ta||(l.Md=l.Vc=0)}d&&pl(this)};
        function ol(a,b,c){b.Ta=!0;var d=a.Bf.indexOf(b);0<=d&&(a.Bf.splice(d,1),a.yi.splice(d,1));a.Bf.push(b);a.yi.push(ra());c&&pl(a)}function pl(a){if(a.Bf.length){var b=a.yi[0]+2E3;a.Me&&a.no<b&&(clearTimeout(a.Me),a.Me=null);if(!a.Me){var c=ra(),b=b-c;0>b&&(b=0);2E3<b&&(b=2E3);a.Me=setTimeout(function(){kl(a,!0)},b);a.no=c+b}}else a.Me&&(clearTimeout(a.Me),a.Me=null)}
        function kl(a,b){b&&(a.Me=null);var c=a.Bf[0];if(c){for(var d=c.Ip,e=c.Kp,c=c.sector,g=0,l=[],p=c-1;p<a.jb[d][e].length;p++){var v=a.jb[d][e][p];if(!v.Ta)break;var w=a.Bf.indexOf(v);a.Bf.splice(w,1);a.yi.splice(w,1);l=l.concat(ql(v));v.Ta=!1;g++}a.xe?(p={},a.sl=!0,p.action="write",p.volume=a.bg,p.chs=a.Eb+":"+a.Fb+":"+a.Mb+":"+a.xb,p.addr=d+":"+e+":"+c+":"+g,p.machine=a.Z.Hg(),p.user=a.Z.kf(),p.data=JSON.stringify(l),d=za(Aa()+"/api/v1/disk",b,p,a,a.xp,[d,e,c,g,b])):d=!1;return b||d}return!1}
        f.info=function(){return this.jb.length?[this.jb.length,this.jb[0].length,this.jb[0][0].length,this.jb[0][0][0].length]:[0,0,0,0]};
        f.seek=function(a,b,c,d,e){var g=null,l=this.Sa,p=this.jb[a];if(p){var v=p[b];if(!v&&l.Sk&&b<l.Fb)for(v=p[b]=Array(l.af),p=0;p<v.length;p++)v[p]=ll(null,a,b,p+1,l.ob,0);if(v){for(p=0;p<v.length;p++)if(v[p]&&v[p].sector==c){g=v[p];if(null===g.pattern)if(d)g.pattern=0;else{for(d=1;++p<v.length;)null===v[p].pattern&&d++;nl(this,a,b,c,d,null!=e,function(a,b){a&&(g=null);e&&e(g,b)});return e?null:g}break}!g&&l.Sk&&9==l.eb&&(g=v[p]=ll(null,a,b,l.eb,l.ob,0))}}e&&e(g,!1);return g};
        f.fill=function(a,b,c){for(var d=a.length>>2,e=Array(d),g=0;g<d;g++)e[g]=b[c]|b[c+1]<<8|b[c+2]<<16|b[c+3]<<24,c+=4;a.data=e};function ql(a){var b=a.length,c=Array(b),d=0,b=b>>2,e=a.data;a=a.pattern;for(var g=0;g<b;g++){var l=g<e.length?e[g]:a;c[d++]=l&255;c[d++]=l>>8&255;c[d++]=l>>16&255;c[d++]=l>>24&255}return c}function rl(a,b){var c=-1;if(a&&b<a.length)var c=a.data,d=b>>2,c=(d<c.length?c[d]:a.pattern)>>((b&3)<<3)&255;return c}
        f.write=function(a,b,c){if(this.Gg)return!1;if(b<a.length){if(c!=rl(a,b)){var d=a.data,e=a.pattern,g=b>>2;b=(b&3)<<3;for(var l=d.length;l<=g;l++)d[l]=e;a.Vc?g<a.Md?(a.Vc+=a.Md-g,a.Md=g):g>=a.Md+a.Vc&&(a.Vc+=g-(a.Md+a.Vc)+1):(a.Md=g,a.Vc=1);d[g]=d[g]&~(255<<b)|c<<b;this.xe&&ol(this,a,!0)}return!0}return null};
        f.save=function(){var a=0,b=[];b[a++]=[this.bg,this.yg,this.Eb,this.Fb,this.Mb,this.xb];if(!this.xe&&!this.Gg)for(var c=this.jb,d=0;d<c.length;d++)for(var e=0;e<c[d].length;e++)for(var g=0;g<c[d][e].length;g++){var l=c[d][e][g];if(l&&l.Vc){for(var p=[],v=0,w=l.Md,F=l.Md+l.Vc;w<F;)p[v++]=l.data[w++];b[a++]=[d,e,g,l.Md,p]}}return b};
        f.restore=function(a){var b=0,c="unsupported restore format";if(a&&0<a.length){var d=0,e=a[d++];e&&2<=e.length&&(!this.jb.length&&6<=e.length?this.create("local",e[2],e[3],e[4],e[5]):null!=e[1]&&null!=this.yg&&e[1]!=this.yg&&(c="original checksum ("+e[1]+") differs from current checksum ("+this.yg+")",b=-2));for(this.jb.length||(b=-1);d<a.length&&0<=b;){var g=0,l=a[d++],p=l[g++],v=l[g++],w=l[g++];if(p>=this.jb.length||v>=this.jb[p].length||w>=this.jb[p][v].length){c="sector (CHS="+p+":"+v+":"+w+") out of range ("+
        b+" changes applied)";b=-1;break}if(this.Gg){c="unable to modify write-protected disk";b=-1;break}e=l[g++];g=l[g++];l=e+g.length;if(p=this.jb[p][v][w]){for(v=p.data.length;v<e;)p.data[v++]=p.pattern;v=0;p.Md=e;for(p.Vc=g.length;e<l;)p.data[e++]=g[v++];b++}}}0>b&&-2!=b&&this.Z.Da("Unable to restore disk '"+this.ke+": "+c);return b};
        f.toJSON=function(){var a=JSON.stringify(this.jb),a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,""),a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:"),a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");return a=a.replace(/(sector|length|data|pattern):/gm,'"$1":')};
        function sl(a){Ua.call(this,"FDC",a,sl,524288);this.dmaRead=this.fl;this.dmaWrite=this.gl;this.dmaFormat=this.qp;this.Jf=null;if(a.autoMount&&(this.Jf=a.autoMount,"string"==typeof this.Jf))try{this.Jf=eval("("+a.autoMount+")")}catch(b){Ba("FDC auto-mount error: "+b.message+" ("+a.autoMount+")"),this.Jf=null}this.Oc=[];this.Sn=!Ia("Mobi")&&window&&"FileReader"in window}eb(sl);ba={};aa={};
        var tl={3:{se:3,df:0,name:aa.Kt},4:{se:2,df:1,name:aa.It},5:{se:9,df:7,name:aa.Wt},6:{se:9,df:7,name:aa.Ct},7:{se:2,df:0,name:aa.Et},8:{se:1,df:2,name:aa.Jt},10:{se:2,df:7,name:aa.Dt},13:{se:6,df:7,name:aa.ot},15:{se:3,df:0,name:aa.Ht}};f=sl.prototype;
        f.Nb=function(a,b,c){var d=this;switch(b){case "listDisks":return this.va[b]=c,c.onchange=function(){var a=d.va.descDisk,b=c.options[c.selectedIndex];if(a&&b){var l={};if(b=b.getAttribute("data-value"))try{l=eval("({"+b+"})")}catch(p){Ba("FDC option error: "+p.message)}b=l.desc;void 0===b&&(b="");l=l.href;void 0!==l&&(b='<a href="'+l+'" target="_blank">'+b+"</a>");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.va[b]=c,c.onchange=function(){var a=fa(c.value,10);null!=a&&ul(d,a)},
        !0;case "loadDrive":return this.va[b]=c,c.onclick=function(){var a=d.va.listDisks;a&&vl(d,a.options[a.selectedIndex].text,a.value)},!0;case "mountDrive":return this.Sn?(this.va[b]=c,c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length}),c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;vl(d,ha(b,!0),b,a)}return!1}):c.parentNode.removeChild(c),!0}return!1};
        f.Kc=function(a,b,c,d){this.ma=b;this.O=c;this.Y=d;this.Fa=a;this.ja=xb(a,"ChipSet");this.ye();oc(b,this,wl);sc(b,this,xl);this.Sn&&yl(this,"Local Disk","?");yl(this,"Remote Disk","??");this.xh()||ob(this)};
        f.lc=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.Fa.ol){this.Oc=[];for(var c=0;c<this.Ea.length;c++)zl(this,c,!0);this.xh(!0)}}else if(!this.restore(a))return!1;if(c=this.va.listDrives){for(;c.firstChild;)c.removeChild(c.firstChild);c.textContent="";for(var d=0;d<this.Fl;d++){var e=window.document.createElement("option");e.value=d;e.textContent=String.fromCharCode(65+d)+":";c.appendChild(e)}0<this.Fl&&(c.value="0",ul(this,0))}}return!0};
        f.kc=function(a){return a&&this.save?this.save():!0};f.reset=function(){this.ye()};f.save=function(){var a=new Je(this);a.set(0,this.Vm());return a.data()};f.restore=function(a){return this.ye(a[0])};
        f.ye=function(a){var b=0,c,d=!0;void 0===a&&(a=[0,0,128,Array(9),0,0,0,[]]);this.rb=a[b++];b++;this.wa=a[b++];this.wc=a[b++];this.Jb=a[b++];this.pb=a[b++];this.eh=a[b++];var e=a[b++];c=a[b++];null!=c&&(this.Oc=c);void 0===this.Ea&&(this.Fl=4,this.ja&&(this.Fl=Ai(this.ja)),this.Ea=Array(4));for(c=0;c<this.Ea.length;c++){var g=this.Ea[c];if(void 0===g){var g=this.Ea[c]={},l;if(this.ja)a:{l=this.ja;if(c<Ai(l)){if(!l.Te){l=360;break a}if(c<l.Te.length){l=l.Te[c];break a}}l=0}else l=0;switch(l){case 160:case 180:g.Fb=
        1;default:g.Eb=40;g.Mb=9;break;case 720:g.Eb=80;g.Mb=9;break;case 1200:g.Eb=80;g.Mb=15;break;case 1440:g.Eb=80,g.Mb=18}}this.wl(g,c,e[c])||(d=!1)}this.wf=a[b++]||0;this.Io=a[b]||0;return d};f.Vm=function(){var a=0,b=[];b[a++]=this.rb;b[a++]=0;b[a++]=this.wa;b[a++]=this.wc;b[a++]=this.Jb;b[a++]=this.pb;b[a++]=this.eh;b[a++]=this.Xm();for(var c=a++,d=0;d<this.Ea.length;d++){var e=this.Ea[d];e.xa&&Al(this,e.cg,e.xa)}b[c]=this.Oc;b[a++]=this.wf;b[a]=this.Io;return b};
        f.wl=function(a,b,c){var d=0,e=!0;a.rb=b;a.$c=a.Cg=!1;void 0===c&&(c=[192,!0,0,2,0]);"boolean"==typeof c[1]&&(c[1]=["Floppy Drive",a.Eb||40,a.Fb||c[3],a.Mb||9,a.xb||512,c[1],a.qj,a.ai,a.bi]);a.ib=c[d++];var g=c[d++];a.name=g[0];a.Eb=g[1];a.Fb=g[2];a.Mb=g[3];a.xb=g[4];a.Eg=g[5];(a.qj=g[6])?(a.ai=g[7],a.bi=g[8]):(a.qj=a.Eb,a.ai=a.Fb,a.bi=a.Mb);a.Ra=c[d++];a.Ze=c[d++];a.Ab=c[d++];a.Ze=100<=a.Ze?a.Ze-100:a.Ze-a.Ab;a.eb=c[d++];a.af=c[d++];a.ob=c[d++];a.Ua=c[d++];a.Xa=null;a.xa||(a.cg="");var l=c[d++];
        102==l&&(l=!1);"boolean"==typeof l?(g=c[d++],c=c[d],l?(d=this.Ea[b],zl(this,b,!0,!0),d.Cg=!0,b=new il(this,d,"preload"),this.Kn(d,b,g,c,!0)):Bl(this,b,g,c,!0)?a.xa&&c&&Cl(this,g,c,a.xa):ob(this,!1)):void 0!==l&&a.xa&&0>a.xa.restore(l)&&(e=!1);e&&a.xa&&void 0!==a.Ua&&(a.Xa=a.xa.seek(a.Ab,a.Ra,a.eb));return e};f.Xm=function(){for(var a=0,b=[],c=0;c<this.Ea.length;c++)b[a++]=this.Wm(this.Ea[c]);return b};
        f.Wm=function(a){var b=0,c=[];c[b++]=a.ib;c[b++]=[a.name,a.Eb,a.Fb,a.Mb,a.xb,a.Eg,a.qj,a.ai,a.bi];c[b++]=a.Ra;c[b++]=a.Ze+100;c[b++]=a.Ab;c[b++]=a.eb;c[b++]=a.af;c[b++]=a.ob;c[b++]=a.Ua;c[b++]=a.Cg;c[b++]=a.Po;c[b]=a.cg;return c};f.Hn=function(a){var b;a=this.Ea[a];if(void 0!==a){b={};for(var c in a)b[c]=a[c]}return b};f.So=function(a,b,c){if(a.xa){var d=a.xa.info(),e=d[2],g=d[1]*e;if(b+c<=d[0]*g)return a.Ab=Math.floor(b/g),b%=g,a.Ra=Math.floor(b/e),a.eb=b%e+1,a.ob=c*d[3],a.ib=0,!0}return!1};
        f.xh=function(a){a||(this.Ff=0);if(this.Jf)for(var b in this.Jf){var c=this.Jf[b];if(c.name&&c.path){var d=b.charCodeAt(0)-65;if(0<=d&&d<this.Ea.length){!Bl(this,d,c.name,c.path,!0)&&a&&ob(this,!1);continue}}this.Da("Unrecognized auto-mount specification for drive "+b)}return!!this.Ff};
        function vl(a,b,c,d){var e,g=a.va.listDrives;if(g&&!isNaN(e=fa(g.value,10))&&0<=e&&e<a.Ea.length)if(c)if("?"==c)a.Da('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=ha(c);a.R("Attempting to load "+c+' as "'+b+'"')}for(a.R("loading disk "+c+"...");Bl(a,e,b,c,!1,d)&&window.confirm("Click OK to reload the original disk.\n(WARNING: All disk changes will be discarded)");){for(var g=a,l=c,p=
        void 0,p=0;p<g.Oc.length;p++)if(g.Oc[p][1]==l){g.Oc.splice(p,1);break}zl(a,e,!1,!0)}}else zl(a,e);else a.Da("Nothing to load")}function Bl(a,b,c,d,e,g){var l=a.Ea[b];if(d&&l.cg!=d){zl(a,b,e,!0);if(l.$c)return a.Da("Drive "+b+" busy"),!0;l.$c=!0;e&&(l.Pf=!0,a.Ff++,a.qa()&&a.ab("loading diskette '"+c+"'"));l.Cg=!!g;(new il(a,l,"preload")).load(c,d,g,a.Kn);return!1}return!0}
        f.Kn=function(a,b,c,d,e){var g;a.$c=!1;b&&(g=b.info(),b&&g[0]>a.Eb||g[1]>a.Fb)&&(this.Da('Diskette "'+c+'" too large for drive '+String.fromCharCode(65+a.rb)),b=null);b?(a.xa=b,a.Po=c,a.cg=d,Cl(this,c,d,b),g=b.info(),this.wf|=128,this.Da('Mounted diskette "'+c+'" in drive '+String.fromCharCode(65+a.rb),a.Pf||e),a.qj=g[0],a.ai=g[1],a.bi=g[2]):a.Cg=!1;a.Pf&&(a.Pf=!1,--this.Ff||ob(this));ul(this,a.rb)};
        function yl(a,b,c){if(a=a.va.listDisks){for(var d=0;d<a.options.length;d++)if(a.options[d].value==c)return;d=window.document.createElement("option");d.value=c;d.textContent=b;a.appendChild(d)}}function ul(a,b){if(0<=b&&b<a.Ea.length){var c=a.Ea[b],d=a.va.listDisks,e=a.va.listDrives;if(d&&e&&(e=fa(e.value,10),c=c.Cg?"?":c.cg,!isNaN(e)&&e==b)){for(e=0;e<d.options.length;e++)if(d.options[e].value==c){d.selectedIndex!=e&&(d.selectedIndex=e);break}e==d.options.length&&(d.selectedIndex=0)}}}
        function zl(a,b,c,d){var e=a.Ea[b];e.xa&&(Al(a,e.cg,e.xa),e.Po="",e.cg="",e.xa=null,e.Cg=!1,a.wf|=128,d||a.Da("Drive "+String.fromCharCode(65+b)+" unloaded",c),c||d||ul(a,b))}function Cl(a,b,c,d){var e;for(e=0;e<a.Oc.length;e++)if(a.Oc[e][1]==c){d.restore(a.Oc[e][2]);return}a.Oc[e]=[b,c,[]]}function Al(a,b,c){var d;for(d=0;d<a.Oc.length;d++)if(a.Oc[d][1]==b){a.Oc[d][2]=c.save();break}}f.Kr=function(a,b,c){m(this,a,b,c,"OUTPUT");b&4?this.eh&4||this.eh&8&&this.ja&&Xi(this.ja,6):this.ye();this.eh=b};
        f.hq=function(a,b){m(this,a,null,b,"STATUS",this.wa);return this.wa};f.fq=function(a,b){var c=0;this.Jb<this.pb&&(c=this.wc[this.Jb]);this.eh&8&&this.ja&&Yi(this.ja,6);this.qa()&&m(this,a,null,b,"DATA["+this.Jb+"]",c);++this.Jb>=this.pb&&(this.wa&=-81,this.Jb=this.pb=0);return c};
        f.Jr=function(a,b,c){this.qa()&&m(this,a,b,c,"DATA["+this.pb+"]");this.pb<this.wc.length&&(this.wc[this.pb++]=b);a=this.wc[0]&31;if(void 0!==tl[a]&&this.pb>=tl[a].se){b=!1;this.Jb=0;a=this.Wa();var d,e,g,l,p=a&31;switch(p){case 3:this.Wa(ba.Lt);this.Wa(ba.rt);this.gc();break;case 4:c=this.Wa(ba.mh);this.rb=c&3;d=this.Ea[this.rb];this.gc();this.sc((d.ib&-16777216)>>>24,ba.Ot);break;case 5:case 6:c=this.Wa(ba.mh);b=c>>2&1;this.rb=c&3;d=this.Ea[this.rb];d.Ra=b;c=d.Ab=this.Wa(ba.dn);e=this.Wa(ba.en);
        g=d.eb=this.Wa(ba.gn);l=this.Wa(ba.Fk);d.ob=128<<l;d.af=this.Wa(ba.mt);this.Wa(ba.cp);this.Wa(ba.lt);6==p?(p=d,p.ib=72,p.xa&&(p.Xa=null,p.ib=0,this.ja&&(Qi(this.ja,2,this,"dmaRead",p),Ji(this.ja,2)))):(p=d,p.ib=72,p.xa&&(p.xa.Gg?p.ib=576:(p.Xa=null,p.ib=0,this.ja&&(Qi(this.ja,2,this,"dmaWrite",p),Ji(this.ja,2)))));Dl(this,d,a,b,c,e,g,l);b=!0;break;case 7:c=this.Wa(ba.mh);this.rb=c&3;d=this.Ea[this.rb];d.Ab=d.Ze=0;d.ib=268435488;this.gc();b=!0;break;case 8:d=this.Ea[this.rb];d.Ra=0;this.gc();this.sc(d.rb|
        d.Ra<<2|d.ib&255,ba.ep);this.sc(d.Ab,ba.At);this.rb=this.rb+1&3;break;case 10:c=this.Wa(ba.mh);b=c>>2&1;this.rb=c&3;d=this.Ea[this.rb];c=d.Ab;e=d.Ra=b;g=d.eb=1;l=0;d.ib=0;d.xa&&(d.Xa=d.xa.seek(d.Ab,d.Ra,d.eb))?l=d.Xa.length:d.ib=72;Dl(this,d,a,b,c,e,g,l);b=!0;break;case 13:c=this.Wa(ba.mh);b=c>>2&1;this.rb=c&3;d=this.Ea[this.rb];c=d.Ab;e=d.Ra=b;g=1;l=this.Wa(ba.Fk);d.ob=128<<l;d.af=this.Wa(ba.Gt);this.Wa(ba.cp);d.sn=this.Wa(ba.bp);p=d;p.ib=72;p.xa&&(p.Xa=null,p.ib=0,this.ja&&(p.ug=0,p.hd=Array(4),
        p.Sk=!0,p.Ri=0,Qi(this.ja,2,this,"dmaFormat",p),Ji(this.ja,2),p.Sk=!1));Dl(this,d,a,b,c,e,g,l);b=!0;break;case 15:c=this.Wa(ba.mh),this.rb=c&3,d=this.Ea[this.rb],d.Ra=c>>2&1,c=this.Wa(ba.xt),d.Ab+=c-d.Ze,0>d.Ab&&(d.Ab=0),d.Ab>=d.Eb&&(d.Ab=d.Eb-1),d.Ze=c,d.ib=32,d.Ab||(d.ib|=268435456),this.gc(),b=!0}0<this.pb&&(this.wa|=80);this.eh&8&&(!d||d.ib&8||!b||this.ja&&Xi(this.ja,6))}};f.gq=function(a,b){var c=this.wf;this.wf&=-129;m(this,a,null,b,"INPUT",c);return c};
        f.Ir=function(a,b,c){m(this,a,b,c,"CONTROL");this.Io=b};function Dl(a,b,c,d,e,g,l,p){a.gc();a.sc(b.rb|b.Ra<<2|b.ib&255,ba.ep);a.sc((b.ib&65280)>>>8,ba.Mt);a.sc((b.ib&16711680)>>>16,ba.Nt);var v=0;if(e!=b.Ab||g!=b.Ra)v=l=1;c&128&&(g^=v,d||(v=0));a.sc(e+v,ba.dn);a.sc(g,ba.en);a.sc(l,ba.gn);a.sc(p,ba.Fk)}f.Wa=function(){var a=this.wc[this.Jb];this.Jb++;return a};f.gc=function(){this.Jb=this.pb=0};f.sc=function(a){this.wc[this.pb++]=a};f.fl=function(a,b,c){void 0===b||0>b?this.Zg(a,c):c(-1,!1)};
        f.gl=function(a,b){return void 0!==b&&0<=b?this.lh(a,b):-1};f.qp=function(a,b){return void 0!==b&&0<=b?this.$m(a,b):-1};f.Zg=function(a,b){var c=-1,d=null,e=0;if(!a.ib&&a.xa){do{if(a.Xa&&(e=a.Ua,0<=(c=rl(a.Xa,a.Ua++)))){d=a.Xa;break}a.Xa=a.xa.seek(a.Ab,a.Ra,a.eb);if(!a.Xa){a.ib=1088;break}a.Ua=0;this.wh(a)}while(1)}b(c,!1,d,e)};
        f.lh=function(a,b){if(a.ib||!a.xa)return-1;do{if(a.Xa&&a.xa.write(a.Xa,a.Ua++,b))break;a.Xa=a.xa.seek(a.Ab,a.Ra,a.eb);if(!a.Xa){a.ib=8256;b=-1;break}a.Ua=0;this.wh(a)}while(1);return b};f.wh=function(a){a.eb++;a.eb>=a.bi+1&&(a.eb=1,a.Ra++,a.Ra>=a.ai&&(a.Ra=0,a.Ab++))};f.$m=function(a,b){if(a.ib)return-1;a.hd[a.ug++]=b;if(a.ug==a.hd.length){a.Ab=a.hd[0];a.Ra=a.hd[1];a.eb=a.hd[2];a.ob=128<<a.hd[3];for(var c=a.ug=0;c<a.ob;c++)if(0>this.lh(a,a.sn))return-1;a.Ri++}a.Ri>=a.af&&(b=-1);return b};
        var wl={1012:sl.prototype.hq,1013:sl.prototype.fq,1015:sl.prototype.gq},xl={1010:sl.prototype.Kr,1013:sl.prototype.Jr,1015:sl.prototype.Ir};Pa(function(){for(var a=kb(window.document,"pcjs","fdc"),b=0;b<a.length;b++){var c=a[b],d=ib(c),d=new sl(d);jb(d,c)}});
        function El(a){Ua.call(this,"HDC",a,El,1048576);this.dmaRead=this.fl;this.dmaWrite=this.gl;this.dmaWriteBuffer=this.rp;this.dmaWriteFormat=this.sp;this.Ik=[];if(a.drives)try{this.Ik=eval("("+a.drives+")")}catch(b){Ba("HDC drive configuration error: "+b.message+" ("+a.drives+")")}this.Sh=(this.Of="at"==a.type)?1:0;this.Jp=this.Of?2:3}eb(El);
        var Fl=[{0:[306,2],1:[375,8],2:[306,6],3:[306,4]},{1:[306,4],2:[615,4],3:[615,6],4:[940,8],5:[940,6],6:[615,4],7:[462,8],8:[733,5],9:[900,15],10:[820,3],11:[855,5],12:[855,7],13:[306,8],14:[733,7]}];f=El.prototype;f.Nb=function(){return!1};f.Kc=function(a,b,c,d){this.ma=b;this.O=c;this.Y=d;this.Fa=a;this.ja=xb(a,"ChipSet");oc(b,this,this.Of?Gl:Hl);sc(b,this,this.Of?Il:Jl);Ce(c,19,this,this.Kq);Ce(c,64,this,this.Lq);this.reset();this.xh()||ob(this)};
        f.lc=function(a,b){if(!b)if(!a||!this.restore)this.ye(),this.Fa.ol&&this.xh(!0);else if(!this.restore(a))return!1;return!0};f.kc=function(a){return a&&this.save?this.save():!0};f.Hg=function(){return this.Fa?this.Fa.Hg():""};f.kf=function(){return this.Fa?this.Fa.kf():""};f.reset=function(){this.ye(null,!0)};f.save=function(){var a=new Je(this);a.set(0,this.Vm());return a.data()};f.restore=function(a){return this.ye(a[0])};
        f.ye=function(a,b){var c=0,d=!0;if(this.Of)null==a&&(a=[0,0,0,0,0,0,0,0,64,0]),this.vf=a[c++],this.Oo=a[c++],this.xf=a[c++],this.uk=a[c++],this.qk=a[c++],this.pk=a[c++],this.bh=a[c++],this.wa=a[c++],this.Om=a[c++],this.sk=a[c++];else{null==a&&(a=[0,0,Array(14),0,0]);this.ah=a[c++];this.wa=a[c++];this.wc=a[c++];this.Jb=a[c++];this.pb=a[c++];this.No=a[c++];this.Mo=a[c++];this.Lo=a[c++];var e=a[c++];void 0!==e?this.Jg=e:void 0===this.Jg&&(this.Jg=-1)}void 0===this.Ea&&(this.Ea=Array(this.Ik.length));
        c=a[c];void 0===c&&(c=[]);for(e=0;e<this.Ea.length;e++){void 0===this.Ea[e]&&(this.Ea[e]={});var g=this.Ea[e];this.wl(e,g,this.Ik[e],c[e],b)||(d=!1);null!=this.ah&&1>=e&&(this.ah|=(g.type&3)<<(1-e<<1))}return d};
        f.Vm=function(){var a=0,b=[];this.Of?(b[a++]=this.vf,b[a++]=this.Oo,b[a++]=this.xf,b[a++]=this.uk,b[a++]=this.qk,b[a++]=this.pk,b[a++]=this.bh,b[a++]=this.wa,b[a++]=this.Om,b[a++]=this.sk):(b[a++]=this.ah,b[a++]=this.wa,b[a++]=this.wc,b[a++]=this.Jb,b[a++]=this.pb,b[a++]=this.No,b[a++]=this.Mo,b[a++]=this.Lo,b[a++]=this.Jg);b[a]=this.Xm();return b};
        f.wl=function(a,b,c,d,e){var g=0,l=!0;void 0===d&&(d=[0,0,!1,Array(8)]);b.rb=a;b.errorCode=d[g++];b.Uo=d[g++];b.Eg=d[g++];b.qg=d[g++];b.rg=d[g++];b.Ra=d[g++];b.Fb=d[g++];b.Ne=d[g++];b.eb=d[g++];b.af=d[g++];b.ob=d[g++];b.Pi=this.Of?0:1;b.name=c.name;void 0===b.name&&(b.name="Hard Drive");b.path=c.path;b.mode=c.mode||(b.path?"preload":"local");"demandro"!=b.mode&&"demandrw"!=b.mode||this.kf()||(b.mode="local");b.type=c.type;if(void 0===b.type||void 0===Fl[this.Sh][b.type])b.type=this.Jp;c=Fl[this.Sh][b.type];
        b.Mb=c[2]||17;b.xb=c[3]||512;if(e&&this.ja&&(e=this.ja,c=b.type,e.ga)){var p=e.ga[18],p=a?p&240|c:p&15|c<<4;e.ga&&(e.ga[18]=p,si(e))}void 0===b.xa&&(b.xa=null,this.Da("Type "+b.type+' "'+b.name+'" is fixed disk '+a,!0));Kl(this,b);b.Ua=d[g++];b.Xa=null;b.xa&&(a=d[g],void 0!==a&&0>b.xa.restore(a)&&(l=!1),l&&void 0!==b.Ua&&(b.Xa=b.xa.seek(b.Ne,b.Ra,b.eb+b.Pi)));return l};f.Xm=function(){for(var a=0,b=[],c=0;c<this.Ea.length;c++)b[a++]=this.Wm(this.Ea[c]);return b};
        f.Wm=function(a){var b=0,c=[];c[b++]=a.errorCode;c[b++]=a.Uo;c[b++]=a.Eg;c[b++]=a.qg;c[b++]=a.rg;c[b++]=a.Ra;c[b++]=a.Fb;c[b++]=a.Ne;c[b++]=a.eb;c[b++]=a.af;c[b++]=a.ob;c[b++]=a.Ua;c[b]=a.xa?a.xa.save():null;return c};f.Hn=function(a){var b;a=this.Ea[a];if(void 0!==a){b={};for(var c in a)b[c]=a[c]}return b};
        function Kl(a,b,c){if(b){var d=0,e=0;null==c&&((d=b.qg[2])?e=b.qg[0]<<8|b.qg[1]:c=b.type);null==c||d||(d=Fl[a.Sh][c][1],e=Fl[a.Sh][c][0]);d&&((c=Fl[a.Sh][b.type])&&e!=c[0]&&d!=c[1]&&a.Da("Warning: drive parameters ("+e+","+d+") do not match drive type "+b.type+" ("+c[0]+","+c[1]+")"),b.Eb=e,b.Fb=d,null==b.xa&&(b.xa=new il(a,b,b.mode)))}}
        f.So=function(a,b,c){if(a.xa){var d=a.xa.info(),e=d[0];if(e){var g=d[2],l=d[1]*g;if(b+c<=e*l)return a.Ne=Math.floor(b/l),b%=l,a.Ra=Math.floor(b/g),a.eb=b%g,a.ob=c*d[3],a.errorCode=0,!0}}return!1};
        f.xh=function(a){a||(this.Ff=0);for(var b=0;b<this.Ea.length;b++){var c=this.Ea[b];if(c.name&&c.path){if(!(a&&c.xa&&c.xa.dj)){var d;d=c.name;var c=c.path,e=this.Ea[b];e.$c?(this.Da("Drive "+b+" busy"),d=!0):(e.$c=!0,e.Pf=!0,this.Ff++,this.qa()&&this.ab("loading "+d),(e.xa||new il(this,e,e.mode)).load(d,c,null,this.up),d=!1);!d&&a&&ob(this,!1)}}else a&&void 0!==c.type&&(c.xa=null,Kl(this,c,c.type))}return!!this.Ff};
        f.up=function(a,b,c){a.$c=!1;(a.xa=b)&&this.Da('Mounted disk "'+c+'" in drive '+String.fromCharCode(67+a.rb),a.Pf);a.Pf&&(a.Pf=!1,--this.Ff||ob(this))};f.Hq=function(a,b){var c=0;this.Jb<this.pb&&(c=this.wc[this.Jb]);this.ja&&Yi(this.ja,5);this.wa&=-33;m(this,a,null,b,"DATA["+this.Jb+"]",c);++this.Jb>=this.pb&&(this.Jb=this.pb=0,this.wa&=-15);return c};
        f.gs=function(a,b,c){m(this,a,b,c,"DATA["+this.pb+"]");this.pb<this.wc.length&&(this.wc[this.pb++]=b);a=12!=this.wc[0]?6:this.wc.length;6==this.pb&&(this.wa&=-2);this.pb>=a&&(this.wa|=2,this.wa&=-2,Ll(this))};f.Iq=function(a,b){var c=this.wa;m(this,a,null,b,"STATUS",c);this.Jb<this.pb&&(this.wa|=1);return c};f.ks=function(a,b,c){m(this,a,b,c,"RESET");this.No=b;this.ja&&Yi(this.ja,5);this.ye()};f.Gq=function(a,b){m(this,a,null,b,"CONFIG",this.ah);return this.ah};
        f.js=function(a,b,c){m(this,a,b,c,"PULSE");this.Mo=b;this.wa=13};f.hs=function(a,b,c){m(this,a,b,c,"PATTERN");this.Lo=b};f.Lm=function(a,b,c){m(this,a,b,c,"NOISE")};
        f.Qp=function(a,b){var c=-1;if(this.Sa){var d=this,c=this.Zg(this.Sa,function(){});1==this.Sa.Ua?this.qa(1048832)&&m(this,a,null,b,"DATA["+this.Sa.Ua+"]",c):this.Sa.Ua==this.Sa.xb&&(this.Sa.ob-=this.Sa.xb,this.xf=this.xf-1&255,this.Sa.ob>=this.Sa.xb?(d.wa=136,this.Zg(this.Sa,function(a){0<=a?(Ml(d),d.wa=80):(d.wa=1,d.vf=16)},!1)):this.wa=80)}return c};
        f.qr=function(a,b,c){this.Sa&&this.Sa.ob>=this.Sa.xb&&(0>this.lh(this.Sa,b)?(this.wa=1,this.vf=16):1==this.Sa.Ua?this.qa(1048832)&&m(this,a,b,c,"DATA["+this.Sa.Ua+"]"):this.Sa.Ua==this.Sa.xb&&(this.Sa.ob-=this.Sa.xb,this.xf=this.xf-1&255,Ml(this),this.wa=80,this.Sa.ob>=this.Sa.xb&&(this.wa|=8)))};f.Sp=function(a,b){var c=this.vf;m(this,a,null,b,"ERROR",c);return c};f.vr=function(a,b,c){m(this,a,b,c,"WPREC");this.Oo=b};f.Tp=function(a,b){var c=this.xf;m(this,a,null,b,"SECCNT",c);return c};
        f.tr=function(a,b,c){m(this,a,b,c,"SECCNT");this.xf=b};f.Up=function(a,b){var c=this.uk;m(this,a,null,b,"SECNUM",c);return c};f.ur=function(a,b,c){m(this,a,b,c,"SECNUM");this.uk=b};f.Pp=function(a,b){var c=this.qk;m(this,a,null,b,"CYLLO",c);return c};f.pr=function(a,b,c){m(this,a,b,c,"CYLLO");this.qk=b};f.Op=function(a,b){var c=this.pk;m(this,a,null,b,"CYLHI",c);return c};f.or=function(a,b,c){m(this,a,b,c,"CYLHI");this.pk=b};f.Rp=function(a,b){var c=this.bh;m(this,a,null,b,"DRVHD",c);return c};
        f.rr=function(a,b,c){m(this,a,b,c,"DRVHD");this.bh=b;this.wa=this.Ea[this.bh&16?1:0]?this.wa|64:this.wa&-65};f.Vp=function(a,b){var c=this.wa;m(this,a,null,b,"STATUS",c);return c};f.nr=function(a,b,c){m(this,a,b,c,"COMMAND");this.Om=b;this.ja&&Yi(this.ja,14);Nl(this)};f.sr=function(a,b,c){m(this,a,b,c,"FDR");this.sk&4&&!(b&4)&&(this.vf=1);this.sk=b};
        function Nl(a){var b=!1,c=a.Om,d=a.bh&16?1:0,e=a.bh&15,g=a.qk|(a.pk&3)<<8,l=a.uk,p=a.xf||256;a.Sa=null;a.vf=0;a.wa=80;(d=a.Ea[d])?(d.Ne=g,d.Ra=e,d.eb=l,d.ob=p*d.xb,c=144<=c?c:c&240,d.Xa=null,d.Ua=0,d.errorCode=0,a.Sa=d):c=-1;switch(c&240){case 32:a.wa=136;a.Zg(d,function(b){0<=b&&a.ja?(Ml(a),a.wa=80):(a.wa=1,a.vf=16)},!1);break;case 48:a.wa=8;break;case 16:b=!0;break;case 64:b=!0;break;case 144:a.vf=1;b=!0;break;case 145:d.Fb=e+1,d.Mb=p,b=!0}b&&Ml(a)}
        function Ml(a){!a.ja||a.sk&2||Xi(a.ja,14,120)}
        function Ll(a){a.Jb=0;var b=a.Wa(),c=a.Wa(),d=c&32,e=d>>5,g=c&31,l=a.Wa(),p=a.Wa(),v=l<<2&768|p,w=l&63,F=a.Wa(),K=a.Wa(),J=a.Ea[e];J&&(J.Ne=v,J.Ra=g,J.eb=w,J.ob=F*J.xb);switch(b){case 3:a.gc(J?J.errorCode:4);a.sc(c);a.sc(l);a.sc(p);a.sc(0|d);b=-1;break;case 12:for(c=0;0<=(b=a.Wa());)J&&c<J.qg.length&&(J.qg[c++]=b);J&&Kl(a,J);b=0;J||a.Jg!=e||(a.Jg=-1,b=2);a.gc(b|d);b=-1;break;case 224:case 228:a.gc(0|d),b=-1}if(0<=b)switch(void 0===J?b=-1:(J.errorCode=0,J.Uo=0),b){case 0:a.gc(0|d);break;case 1:J.bu=
        K;a.gc(0|d);break;case 5:a.gc(0|d);break;case 8:Ol(a,J,function(b){a.gc(b|d)});break;case 10:Pl(a,J,function(b){a.gc(b|d)});break;case 15:Ql(a,J,function(b){a.gc(b|d)});break;default:a.gc(2|d)}}f.Wa=function(){var a=-1;this.Jb<this.pb&&(a=this.wc[this.Jb++]);return a};f.gc=function(a){this.Jb=this.pb=0;void 0!==a&&this.sc(a);this.ja&&Xi(this.ja,5);this.wa|=32};f.sc=function(a){this.wc[this.pb++]=a};f.fl=function(a,b,c){void 0===b||0>b?this.Zg(a,c):c(-1,!1)};
        f.gl=function(a,b){return void 0!==b&&0<=b?this.lh(a,b):-1};f.rp=function(a,b){var c;void 0!==b&&0<=b?(c=b,a.Ua<a.rg.length?a.rg[a.Ua++]=c:(a.errorCode=20,c=-1)):c=-1;return c};f.sp=function(a,b){return void 0!==b&&0<=b?this.$m(a,b):-1};function Ol(a,b,c){b.errorCode=4;if(b.xa&&(b.Xa=null,a.ja)){b.errorCode=0;Qi(a.ja,3,a,"dmaRead",b);Ji(a.ja,3,function(a){a||0!=b.errorCode||(b.errorCode=4);c(b.errorCode?2:0)});return}c(b.errorCode?2:0)}
        function Pl(a,b,c){b.errorCode=4;if(b.xa&&(b.Xa=null,a.ja)){b.errorCode=0;Qi(a.ja,3,a,"dmaWrite",b);Ji(a.ja,3,function(a){a||(0==b.errorCode&&(b.errorCode=4),20==b.errorCode&&(b.errorCode=0));c(b.errorCode?2:0)});return}c(b.errorCode?2:0)}function Ql(a,b,c){b.errorCode=4;b.rg&&b.rg.length==b.ob||(b.rg=Array(b.ob));b.Ua=0;a.ja?(b.errorCode=0,Qi(a.ja,3,a,"dmaWriteBuffer",b),Ji(a.ja,3,function(a){a||0!=b.errorCode||(b.errorCode=4);c(b.errorCode?2:0)})):c(b.errorCode?2:0)}
        f.Zg=function(a,b,c){var d=-1,e=null,g=0;if(a.errorCode)return b&&b(d,!1,e,g),d;var l=!1!==c?1:0;if(a.Xa&&(g=a.Ua,d=rl(a.Xa,a.Ua),a.Ua+=l,0<=d))return e=a.Xa,b&&b(d,!1,e,g),d;if(b){var p=this;if(a.xa)return a.xa.seek(a.Ne,a.Ra,a.eb+a.Pi,!1,function(c,w){(a.Xa=c)?(e=c,g=a.Ua=0,p.wh(a),d=rl(a.Xa,a.Ua),a.Ua+=l):a.errorCode=20;b(d,w,e,g)}),d;a.errorCode=20;b(d,!1,e,g)}return d};
        f.lh=function(a,b){if(a.errorCode)return-1;do{if(a.Xa&&a.xa.write(a.Xa,a.Ua++,b))break;a.xa&&a.xa.seek(a.Ne,a.Ra,a.eb+a.Pi,!0,function(b){a.Xa=b});if(!a.Xa){a.errorCode=20;b=-1;break}a.Ua=0;this.wh(a)}while(1);return b};f.wh=function(a){a.eb++;var b=1-a.Pi;a.eb>=a.Mb+b&&(a.eb=b,a.Ra++,a.Ra>=a.Fb&&(a.Ra=0,a.Ne++))};
        f.$m=function(a,b){if(a.errorCode)return-1;a.hd[a.ug++]=b;if(a.ug==a.hd.length){a.Ne=a.hd[0];a.Ra=a.hd[1];a.eb=a.hd[2];a.ob=128<<a.hd[3];for(var c=a.ug=0;c<a.ob;c++)if(0>this.lh(a,a.sn))return-1;a.Ri++}a.Ri>=a.af&&(b=-1);return b};f.Kq=function(){var a=this.O.H&255;!(this.O.F>>8)&&128<a&&(this.Jg=a-128);return!0};f.Lq=function(){var a;(a=this.O.F>>8||!this.ja)||(a=!(this.ja.ec[0].Wd&64));return a?!0:!1};
        var Hl={800:El.prototype.Hq,801:El.prototype.Iq,802:El.prototype.Gq},Gl={496:El.prototype.Qp,497:El.prototype.Sp,498:El.prototype.Tp,499:El.prototype.Up,500:El.prototype.Pp,501:El.prototype.Op,502:El.prototype.Rp,503:El.prototype.Vp},Jl={800:El.prototype.gs,801:El.prototype.ks,802:El.prototype.js,803:El.prototype.hs,807:El.prototype.Lm,811:El.prototype.Lm,815:El.prototype.Lm},Il={496:El.prototype.qr,497:El.prototype.vr,498:El.prototype.tr,499:El.prototype.ur,500:El.prototype.pr,501:El.prototype.or,
        502:El.prototype.rr,503:El.prototype.nr,1014:El.prototype.sr};Pa(function(){for(var a=kb(window.document,"pcjs","hdc"),b=0;b<a.length;b++){var c=a[b],d=ib(c),d=new El(d);jb(d,c)}});
        function Rl(a){Ua.call(this,"Debugger",a,Rl);this.Ah=this.Nd=-1;this.vg=4;this.ko=65535;this.If=5;this.jo=1048575;this.od=Sl(this);this.Jn=Sl(this);this.sd=-1;this.gd=[];this.zg=!1;this.Nf=Sl(this);this.Sc=[];Tl(this);Ul(this);Vl(this,a.messages);this.Um=a.commands;var b=this;window?void 0===window.$&&(window.$=function(a){return Wl(b,a)}):void 0===global.$&&(global.$=function(a){return Wl(b,a)})}eb(Rl);
        var Xl={16:262144,19:524288,21:32768,22:65536,28:2048,33:134217728,51:33554432},Yl={"?":"help","a [#]":"assemble","b [#]":"breakpoint",c:"clear output","d [#]":"dump memory","e [#]":"edit memory",f:"frequencies","g [#]":"go [to #]","h [#]":"halt/history","i [#]":"input port #",k:"stack trace",l:"load sector(s)",m:"messages","o [#]":"output port #",p:"step over",r:"dump/edit registers","t [#]":"step instruction(s)","u [#]":"unassemble",x:"execution options",reset:"reset computer",ver:"display version"},
        Zl="INVALID AAA AAD AAM AAS ADC ADD AND ARPL AS: BOUND BSF BSR BT BTC BTR BTS CALL CBW CLC CLD CLI CLTS CMC CMP CMPSB CMPSW CS: CWD DAA DAS DEC DIV DS: ENTER ES: ESC FADD FBLD FBSTP FCOM FCOMP FDIV FDIVR FIADD FICOM FICOMP FIDIV FIDIVR FILD FIMUL FIST FISTP FISUB FISUBR FLD FLDCW FLDENV FMUL FNSAVE FNSTCW FNSTENV FNSTSW FRSTOR FS: FST FSTP FSUB FSUBR GS: HLT IDIV IMUL IN INC INS INT INT3 INTO IRET JBE JC JCXZ JG JGE JL JLE JMP JA JNC JNO JNP JNS JNZ JO JP JS JZ LAHF LAR LDS LEA LEAVE LES LFS LGDT LGS LIDT LLDT LMSW LOADALL LOCK LODSB LODSW LOOP LOOPNZ LOOPZ LSL LSS LTR MOV MOVSB MOVSW MOVSX MOVZX MUL NEG NOP NOT OR OS: OUT OUTS POP POPA POPF PUSH PUSHA PUSHF RCL RCR REPNZ REPZ RET RETF ROL ROR SAHF SALC SAR SBB SCASB SCASW SETBE SETC SETG SETGE SETL SETLE SETNBE SETNC SETNO SETNP SETNS SETNZ SETO SETP SETS SETZ SGDT SHL SHLD SHR SHRD SIDT SLDT SMSW SS: STC STD STI STOSB STOSW STR SUB TEST VERR VERW WAIT XCHG XLAT XOR".split(" "),
        $l=[8086,80186,80286,80386],am="AL CL DL BL AH CH DH BH AX CX DX BX SP BP SI DI ES CS SS DS FS GS IP PS EAX ECX EDX EBX ESP EBP ESI EDI CR0 CR1 CR2 CR3".split(" "),bm="BX+SI BX+DI BP+SI BP+DI SI DI BP BX EAX ECX EDX EBX ESP EBP ESI EDI".split(" "),cm={cpu:1,seg:2,desc:4,tss:8,"int":16,fault:32,bus:64,mem:128,port:256,dma:512,pic:1024,timer:2048,cmos:4096,rtc:8192,8042:16384,chipset:32768,keyboard:65536,key:131072,video:262144,fdc:524288,hdc:1048576,disk:2097152,serial:4194304,speaker:8388608,state:16777216,
        mouse:33554432,computer:67108864,dos:134217728,data:268435456,log:536870912,warn:1073741824,halt:-2147483648},dm=[0,0],em=[205,12291],fm=[[6,12417,4257],[6,12420,4260],[6,12449,4225],[6,12452,4228],[6,12385,4097],[6,14436,4100],[136,4211],[133,8307],[129,12417,4257],[129,12420,4260],[129,12449,4225],[129,12452,4228],[129,12385,4097],[129,14436,4100],[136,4467],[133,8563],[5,12417,4257],[5,12420,4260],[5,12449,4225],[5,12452,4228],[5,12385,4097],[5,14436,4100],[136,4723],[133,8819],[150,12417,4257],
        [150,12420,4260],[150,12449,4225],[150,12452,4228],[150,12385,4097],[150,14436,4100],[136,4979],[133,9075],[7,12417,4257],[7,12420,4260],[7,12449,4225],[7,12452,4228],[7,12385,4097],[7,14436,4100],[35,15],[29],[184,12417,4257],[184,12420,4260],[184,12449,4225],[184,12452,4228],[184,12385,4097],[184,14436,4100],[27,15],[30],[191,12417,4257],[191,12420,4260],[191,12449,4225],[191,12452,4228],[191,12385,4097],[191,14436,4100],[177,15],[1],[24,4225,4257],[24,4228,4260],[24,4257,4225],[24,4260,4228],[24,
        4193,4097],[24,6244,4100],[33,15],[4],[74,14436],[74,14692],[74,14948],[74,15204],[74,15460],[74,15716],[74,15972],[74,16228],[31,14436],[31,14692],[31,14948],[31,15204],[31,15460],[31,15716],[31,15972],[31,16228],[136,6244],[136,6500],[136,6756],[136,7012],[136,7268],[136,7524],[136,7780],[136,8036],[133,10340],[133,10596],[133,10852],[133,11108],[133,11364],[133,11620],[133,11876],[133,12132],[137,32768],[134,32768],[10,37028,4232],[8,8323,4259],[64,49167],[69,49167],[130,49167],[9,49167],[136,
        36868],[72,45219,4235],[136,36866],[72,45219,4234],[75,41041,6756],[75,41044,6756],[132,39524,4161],[132,39524,4164],[94,4145],[90,4145],[81,4145],[89,4145],[97,4145],[93,4145],[80,4145],[88,4145],[96,4145],[92,4145],[95,4145],[91,4145],[85,4145],[84,4145],[86,4145],[83,4145],[192,12417,4097],[193,12420,4100],[192,12417,4097],[194,12420,4097],[185,4225,4257],[185,4228,4260],[189,12449,12417],[189,12452,12420],[120,8321,4257],[120,8324,4260],[120,8353,4225],[120,8356,4228],[120,8324,4275],[101,8356,
        148],[120,8371,4228],[133,8324],[127],[189,14436,14692],[189,14436,14948],[189,14436,15204],[189,14436,15460],[189,14436,15716],[189,14436,15972],[189,14436,16228],[18],[28],[17,4103],[188],[138],[135],[147],[98],[120,8289,4129],[120,10340,4132],[120,8225,4193],[120,8228,6244],[121,8273,4161],[122,8276,4164],[25,4177,4161],[26,4180,4164],[185,4193,4097],[185,6244,4100],[181,8273,4193],[182,8276,6244],[112,8289,4161],[113,10340,4164],[151,4193,4177],[152,6244,4180],[120,8289,4097],[120,8545,4097],
        [120,8801,4097],[120,9057,4097],[120,9313,4097],[120,9569,4097],[120,9825,4097],[120,10081,4097],[120,10340,4100],[120,10596,4100],[120,10852,4100],[120,11108,4100],[120,11364,4100],[120,11620,4100],[120,11876,4100],[120,12132,4100],[195,28801,4097],[196,28804,4097],[143,4099],[143],[103,8356,4246],[100,8356,4246],[120,8321,4097],[120,8324,4100],[34,36867,4097],[102,32768],[144,4099],[144],[77],[76,4097],[78],[79],[197,12417,4113],[198,12420,4113],[199,12417,4449],[200,12420,4449],[3,1],[2,1],[148],
        [190],[36,4228],[36,4228],[36,4228],[36,4228],[36,4228],[36,4228],[36,4228],[36,4228],[115,4145],[116,4145],[114,4145],[82,4145],[73,8289,4097],[73,10340,4097],[131,4097,4193],[131,4097,6244],[17,4148],[87,4148],[87,4103],[87,4145],[73,8289,6756],[73,10340,6756],[131,6756,4193],[131,6756,6244],[111,15],[0],[141,15],[142,15],[70],[23],[201,12417],[202,12420],[19],[178],[21],[180],[20],[179],[203,12417],[204,12420]],gm={0:[206,12419],1:[207,12419],2:[99,41123,4243],3:[117,41123,4243],5:[110,32768],
        6:[22,32768],32:[120,57509,4309],34:[120,57557,4261],128:[94,53300],129:[90,53300],130:[81,53300],131:[89,53300],132:[97,53300],133:[93,53300],134:[80,53300],135:[88,53300],136:[96,53300],137:[92,53300],138:[95,53300],139:[91,53300],140:[85,53300],141:[84,53300],142:[86,53300],143:[83,53300],144:[165,57473],145:[161,57473],146:[154,57473],147:[160,57473],148:[168,57473],149:[164,57473],150:[153,57473],151:[159,57473],152:[167,57473],153:[163,57473],154:[166,57473],155:[162,57473],156:[157,57473],
        157:[156,57473],158:[158,57473],159:[155,57473],160:[136,54387],161:[133,58483],163:[13,53380,4260],164:[171,57476,4260,4097],165:[171,57476,4260,4449],168:[136,54643],169:[133,58739],171:[16,57476,4260],172:[173,57476,4260,4097],173:[173,57476,4260,4449],175:[72,61572,4260],178:[118,8356,4246],179:[15,57476,4260],180:[104,8356,4246],181:[106,8356,4246],182:[124,57508,4225],183:[124,57509,4227],186:[208,61572,4097],187:[14,57476,4260],188:[11,57508,4228],189:[12,57508,4228],190:[123,57508,4225],191:[123,
        57509,4227]},hm=[[[6,12417,4097],[129,12417,4097],[5,12417,4097],[150,12417,4097],[7,12417,4097],[184,12417,4097],[191,12417,4097],[24,4225,4097]],[[6,12420,4100],[129,12420,4100],[5,12420,4100],[150,12420,4100],[7,12420,4100],[184,12420,4100],[191,12420,4100],[24,4228,4100]],[[6,12420,4098],[129,12420,4098],[5,12420,4098],[150,12420,4098],[7,12420,4098],[184,12420,4098],[191,12420,4098],[24,4228,4098]],[[145,45185,4097],[146,45185,4097],[139,45185,4097],[140,45185,4097],[170,45185,4097],[172,45185,
        4097],dm,[149,45185,4097]],[[145,45188,4097],[146,45188,4097],[139,45188,4097],[140,45188,4097],[170,45188,4097],[172,45188,4097],dm,[149,45188,4097]],[[145,12417,4113],[146,12417,4113],[139,12417,4113],[140,12417,4113],[170,12417,4113],[172,12417,4113],dm,[149,12417,4113]],[[145,12420,4113],[146,12420,4113],[139,12420,4113],[140,12420,4113],[170,12420,4113],[172,12420,4113],dm,[149,12420,4113]],[[145,12417,4449],[146,12417,4449],[139,12417,4449],[140,12417,4449],[170,12417,4449],[172,12417,4449],
        dm,[149,12417,4449]],[[145,12420,4449],[146,12420,4449],[139,12420,4449],[140,12420,4449],[170,12420,4449],[172,12420,4449],dm,[149,12420,4449]],[[185,4225,4097],dm,[128,12417],[126,12417],[125,4225],[72,12417],[32,4225],[71,12417]],[[185,4228,4100],dm,[128,12420],[126,12420],[125,4228],[72,12420],[32,4228],[71,12420]],[[74,12417],[31,12417],dm,dm,dm,dm,dm,dm],[[74,12420],[31,12420],[17,4228],[17,4231],[87,4228],[87,4231],[136,4228],dm],[],[[175,41091],[183,41091],[108,36995],[119,36995],[186,36995],
        [187,36995],dm,dm],[[169,41091],[174,41091],[105,36995],[107,36995],[176,41091],dm,[109,36995],dm],[dm,dm,dm,dm,[13,53380,4097],[16,57476,4097],[15,57476,4097],[14,57476,4097]]],im={19:{0:"disk reset",1:"get status",2:"read drive DL (CH:DH:CL,AL) into ES:BX",3:"write drive DL (CH:DH:CL,AL) from ES:BX",4:"verify drive DL (CH:DH:CL,AL)",5:"format drive DL using ES:BX",8:"read drive DL parameters into ES:DI",21:"get drive DL DASD type",22:"get drive DL change line status",23:"set drive DL DASD type",
        24:"set drive DL media type"},21:{128:"open device",129:"close device",130:"program termination",131:"wait CX:DXus for event",132:"joystick support",133:"SYSREQ pressed",134:"wait CX:DXus",135:"move block (CX words)",136:"get extended memory size",137:"processor to virtual mode",144:"device busy loop",145:"interrupt complete flag set"},33:{0:"terminate program",1:"read character (al) from stdin with echo",2:"write character DL to stdout",3:"read character (al) from stdaux",4:"write character DL to stdaux",
        5:"write character DL to stdprn",6:"direct console output (input if DL=FF)",7:"direct console input without echo",8:"read character (al) from stdin without echo",9:"write $-terminated string DS:DX to stdout",10:"buffered input (ds:dx)",11:"get stdin status",12:"flush buffer and read stdin",13:"disk reset",14:"select default drive DL",15:"open file using fcb DS:DX",16:"close file using fcb DS:DX",17:"find first matching file using fcb DS:DX",18:"find next matching file using fcb DS:DX",19:"delete file using fcb DS:DX",
        20:"sequential read from file using fcb DS:DX",21:"sequential write to file using fcb DS:DX",22:"create or truncate file using fcb DS:DX",23:"rename file using fcb DS:DX",25:"get current default drive (al)",26:"set disk transfer area (dta) DS:DX",27:"get allocation information for default drive",28:"get allocation information for specific drive DL",31:"get drive parameter block for default drive",33:"read random record from file using fcb DS:DX",34:"write random record to file using fcb DS:DX",35:"get file size using fcb DS:DX",
        36:"set random record number for fcb DS:DX",37:"set address DS:DX of interrupt vector AL",38:"create new program segment prefix (psp) at segment DX",39:"random block read from file using fcb DS:DX",40:"random block write to file using fcb DS:DX",41:"parse filename DS:SI into fcb ES:DI using AL",42:"get system date (year=cx, mon=dh, day=dl)",43:"set system date (year=CX, mon=DH, day=DL)",44:"get system time (hour=ch, min=cl, sec=dh, 100ths=dl)",45:"set system time (hour=CH, min=CL, sec=DH, 100ths=DL)",
        46:"set verify flag AL",47:"get disk transfer area address (es:bx)",48:"get DOS version (al=major, ah=minor)",49:"terminate and stay resident",50:"get drive parameter block (dpb=ds:bx) for drive DL",51:"extended break check",52:"get address (es:bx) of InDOS flag",53:"get address (es:bx) of interrupt vector AL",54:"get free disk space of drive DL",55:"get(0)/set(1) switch character DL (AL)",56:"get country-specific information",57:"create subdirectory DS:DX",58:"remove subdirectory DS:DX",59:"set current directory DS:DX",
        60:"create or truncate file DS:DX with attributes CX",61:"open existing file DS:DX with mode AL",62:"close file BX",63:"read CX bytes from file BX into buffer DS:DX",64:"write CX bytes to file BX from buffer DS:DX",65:"delete file DS:DX",66:"set position CX:DX of file BX relative to AL",67:"get(0)/set(1) attributes CX of file DS:DX (AL)",68:"get device information (IOCTL)",69:"duplicate file handle BX",70:"force file handle CX to duplicate file handle BX",71:"get current directory (ds:si) for drive DL",
        72:"allocate memory segment with BX paragraphs",73:"free memory segment ES",74:"resize memory segment ES to BX paragraphs",75:"load program DS:DX using parameter block ES:BX",76:"terminate with return code AL",77:"get return code (al)",78:"find first matching file DS:DX with attributes CX",79:"find next matching file",80:"set current psp BX",81:"get current psp (bx)",82:"get system variables (es:bx)",83:"translate bpb DS:SI to dpb (es:bp)",84:"get verify flag (al)",85:"create child psp at segment DX",
        86:"rename file DS:DX to name ES:DI",87:"get(0)/set(1) file date DX and time CX (AL)",88:"get(0)/set(1) memory allocation strategy (AL)",89:"get extended error information",90:"create temporary file DS:DX with attributes CX",91:"create file DS:DX with attributes CX",92:"lock(0)/unlock(1) file BX region CX:DX length SI:DI (AL)"}};f=Rl.prototype;
        f.Kc=function(a,b,c,d){this.ma=b;this.O=c;this.Fa=a;this.Gp=xb(a,"FDC");this.ao=xb(a,"HDC");this.If=b.Be>>2;this.jo=b.Vh;this.th=fm;80186<=this.O.ka&&(this.th=fm.slice(),this.th[15]=dm,80286<=this.O.ka&&(this.th[15]=em,this.O.ka>=Lb&&(this.vg=8,this.ko=-1)));hi(this,64,function(){d.R("id       physaddr   blkaddr   used    size    type");d.R("-------- ---------  --------  ------  ------  ----");for(var a=0;a<d.O.na.length;a++){var b=d.O.Se[a];b.type!==zc&&d.R(h(b.id)+" %"+h(a<<d.O.Ca)+": "+h(b.Ba)+
        "  "+ga(b.gg)+"  "+ga(b.size)+"  "+Fc[b.type])}});hi(this,4,function(a){if(a){var b=jm(d,a);if(void 0===b)d.R("invalid selector: "+a);else if(a=km(d,b),d.R("dumpDesc("+ga(a?a.ia:b)+"): %"+h(a?a.Ed:null,d.If)),a){var c,b=!1;if(a.type&4096)a.type&2048?(c="code"+(a.type&512?",readable":",execonly"),a.type&1024&&(c+=",conforming")):(c="data"+(a.type&512?",writable":",readonly"),a.type&1024&&(c+=",expdown")),a.type&256&&(c+=",accessed");else switch(a.type){case 256:c="tss";break;case 512:c="ldt";break;
        case 768:c="busy tss";break;case 1024:c="call gate";b=!0;break;case 1280:c="task gate";b=!0;break;case 1536:c="int gate";b=!0;break;case 1792:c="trap gate",b=!0}!c||a.Rb&32768||(c+=",not present");d.R((b?"seg="+ga(a.ya&65535)+" off="+ga(a.gb):"base="+h(a.ya,d.If)+" limit="+h(a.gb,a.gb&-65536?8:4))+" type="+k(a.type>>8)+" ("+c+") ext="+ga(a.Lh&-65296)+" dpl="+k(a.Bc))}}else d.R("no selector")});hi(this,8,function(a){a:{if(a){var b=jm(d,a);if(void 0===b){d.R("invalid task selector: "+a);break a}a=km(d,
        b)}else a=d.O.cb;d.R("dumpTSS("+ga(a?a.ia:b)+"): %"+h(a?a.ya:null,d.If));if(a){var b="",c;for(c in lm){var p=lm[c],v=8>c.length?" ":"",w=a.ya+p,w=jf(d.O,w)|jf(d.O,w+1)<<8;b&&(b+="\n");b+=ga(p)+" "+c+": "+v+ga(w)}d.R(b)}}});hi(this,134217728,function(a){if(a)for(d.R("dumpDOS("+a+")"),a=jm(d,a);a;){var b=Sl(d,0,a),c=d.Qa(b,1),p=d.ra(b,2),v=d.ra(b,5);if(77!=c&&90!=c)break;d.R(jh(0,a)+": '"+String.fromCharCode(c)+"' PID="+ga(p)+" LEN="+ga(v)+' "'+mm(d,b)+'"');a+=1+v}else d.R("no MCB")});ob(this)};
        f.Nb=function(a,b,c){var d=this;switch(b){case "debugInput":return this.Hh=this.va[b]=c,c.onkeydown=function(a){var b;if(13==a.keyCode){b=c.value;c.value="";var l=nm(d,b,!0),p;for(p in l)Wl(d,l[p])}else 27==a.keyCode?c.value=b="":(38==a.keyCode?d.sd<d.gd.length-1&&(b=d.gd[++d.sd]):40==a.keyCode&&(0<d.sd?b=d.gd[--d.sd]:(b="",d.sd=-1)),null!=b&&(l=b.length,c.value=b,c.setSelectionRange(l,l)));null!=b&&a.preventDefault&&a.preventDefault()},!0;case "debugEnter":return this.va[b]=c,Ka(c,function(){if(d.Hh){var a=
        d.Hh.value;d.Hh.value="";var a=nm(d,a,!0),b;for(b in a)Wl(d,a[b]);return!0}return!1}),!0;case "step":return this.va[b]=c,Ka(c,function(a){var b=!1;nb(d,!0)||(mb(d,!0),b=d.kh(a?1:0),mb(d,!1));return b}),!0}return!1};f.ed=function(){this.Hh&&this.Hh.focus()};
        function km(a,b){if(b===Mb(a.O))return a.O.ta;if(b===a.O.bb.ia)return a.O.bb;if(b===a.O.Ma.ia)return a.O.Ma;if(b===a.O.ua.ia)return a.O.ua;if(a.O.ka>=Lb){if(b===a.O.xc.ia)return a.O.xc;if(b===a.O.yc.ia)return a.O.yc}if(a.yl)return null;var c=new qd(a.O,7,"DBG");c.load(b,!0);return c}f.$b=function(a,b,c){var d=a.Ba;if(null==d){var d=n,e=km(this,a.ia);e&&(d=b?e.oc(a.za,c||1,!0):e.Ac(a.za,c||1,!0),a.Ba=d)}return d};
        f.Qa=function(a,b){var c=255,d=this.$b(a,!1,1);d!==n&&(c=jf(this.O,d)|0,b&&om(this,a,b));return c};f.qc=function(a,b){return a.ad?this.fe(a,b?4:0):this.ra(a,b?2:0)};f.ra=function(a,b){var c=65535,d=this.$b(a,!1,2);d!==n&&(c=jf(this.O,d)|jf(this.O,d+1)<<8,b&&om(this,a,b));return c};f.fe=function(a,b){var c=-1,d=this.$b(a,!1,4);d!==n&&(c=jf(this.O,d)|jf(this.O,d+1)<<8|jf(this.O,d+2)<<16|jf(this.O,d+3)<<24,b&&om(this,a,b));return c};
        f.dd=function(a,b,c){var d=this.$b(a,!0,1);d!==n&&(this.O.dd(d,b),c&&om(this,a,c),Zc(this.O))};f.Kb=function(a,b,c){var d=this.$b(a,!0,2);d!==n&&(this.O.Kb(d,b),c&&om(this,a,c),Zc(this.O))};function Sl(a,b,c,d,e,g){void 0===e&&(e=a.O&&4==a.O.ta.pa);void 0===g&&(g=a.O&&4==a.O.ta.Hd);return{za:b||0,ia:c,Ba:d,Fg:!1,ad:e||!1,Zc:g||!1}}function pm(a){return[a.za,a.ia,a.Ba,a.Fg,a.ad,a.Zc,a.nl,a.we]}function qm(a){return{za:a[0],ia:a[1],Ba:a[2],Fg:a[3],ad:a[4],Zc:a[5],nl:a[6],we:a[7]}}
        function rm(a,b){if(null!=b.ia){var c=km(a,b.ia);if(!c||b.za>c.gb)b.za=0,b.Ba=null}}function om(a,b,c){c=c||1;null!=b.Ba&&(b.Ba+=c);null!=b.ia&&(b.za+=c,rm(a,b))}function jh(a,b,c){return null!=b?h(b,4)+":"+h(a,a&-65536||c?8:4):h(a)}function sm(a){return null==a.ia?"%"+h(a.Ba):jh(a.za,a.ia,a.Zc)}function mm(a,b){var c,d="";for(c=8;d.length<c;){var e=a.Qa(b,1);if(!e)break;d+=32<=e&&128>e?String.fromCharCode(e):"."}return d}
        var lm={PREV_TSS:0,CPL0_SP:2,CPL0_SS:4,CPL1_SP:6,CPL1_SS:8,CPL2_SP:10,CPL2_SS:12,TASK_IP:14,TASK_PS:16,TASK_AX:18,TASK_CX:20,TASK_DX:22,TASK_BX:24,TASK_SP:26,TASK_BP:28,TASK_SI:30,TASK_DI:32,TASK_ES:34,TASK_CS:36,TASK_SS:38,TASK_DS:40,TASK_LDT:42};
        function tm(a,b){var c="",d=10,e=a.Kg,g=a.We;if(g.length){var l=void 0===b?a.zo:+b;isNaN(l)?l=d:c="more ";l>g.length&&(a.R("note: only "+g.length+" available"),l=g.length);e-=l;0>e&&(null!=g[g.length-1][1]?e+=g.length:(l=e+l,e=0));for(void 0!==b&&a.R(l+" instructions earlier:");d&&e!=a.Kg;){var p=g[e++];if(null==p.ia)break;p=Sl(a,p.za,p.ia,p.Ba);a.R(um(a,p,"history",l--));p.nl&&(e++,l--);e>=g.length&&(e=0);a.zo=l;d--}}10==d&&(a.R("no "+c+"history available"),a.zo=void 0)}
        function Vl(a,b){a.Y=a;a.Yb=a.fp=1073741824;a.xk=null;a.Nk=[];var c=nm(a,b.replace("keys","key").replace("kbd","keyboard"));if(c.length)for(var d in cm)0<=ya(c,d)&&(a.Yb|=cm[d],a.R(d+" messages enabled"))}function hi(a,b,c){for(var d in cm)if(b==cm[d]){a.Nk[d]=c;break}}
        function vm(a,b){var c="??";if(0<=b){var d,e,g=a.O;switch(b){case 0:d=g.F;e=2;break;case 1:d=g.G;e=2;break;case 2:d=g.H;e=2;break;case 3:d=g.D;e=2;break;case 4:d=g.F>>8;e=2;break;case 5:d=g.G>>8;e=2;break;case 6:d=g.H>>8;e=2;break;case 7:d=g.D>>8;e=2;break;case 8:d=g.F;e=4;break;case 9:d=g.G;e=4;break;case 10:d=g.H;e=4;break;case 11:d=g.D;e=4;break;case 12:d=r(g);e=4;break;case 13:d=g.L;e=4;break;case 14:d=g.K;e=4;break;case 15:d=g.J;e=4;break;case 22:d=q(g);e=a.vg;break;case 23:d=Nb(g);e=a.vg;break;
        case 16:d=g.Ma.ia;e=4;break;case 17:d=Mb(g);e=4;break;case 18:d=g.ua.ia;e=4;break;case 19:d=g.bb.ia,e=4}if(!e)if(80286==a.O.ka)32==b&&(d=g.hb,e=4);else if(a.O.ka>=Lb)switch(b){case 24:d=g.F;e=8;break;case 25:d=g.G;e=8;break;case 26:d=g.H;e=8;break;case 27:d=g.D;e=8;break;case 28:d=r(g);e=8;break;case 29:d=g.L;e=8;break;case 30:d=g.K;e=8;break;case 31:d=g.J;e=8;break;case 32:d=g.hb;e=8;break;case 33:d=g.ki;e=8;break;case 34:d=g.Yf;e=8;break;case 35:d=g.uf;e=8;break;case 20:d=g.xc.ia;e=4;break;case 21:d=
        g.yc.ia,e=4}e&&(c=h(d,e))}return c}f=Rl.prototype;f.message=function(a,b){b&&(a+=" @"+jh(q(this.O),Mb(this.O)));if(!this.xk||a!=this.xk)if(this.R(a),this.xk=a,this.O){this.Yb&-2147483648&&this.zb();var c=this.O;c.T.Qg=0;c.ud-=c.A;c.A=0;Zc(c)}};
        function Ee(a,b,c){var d,e=!1,g=Xl[b];g&&(d=a.O.F>>8,e=a.qa(g)?!0:524288==g&&a.qa(g=1048576));if(e){var l=a.O.H&255;if(33==b&&11==d||524288==g&&128<=l||1048576==g&&128>l)e=!1}if(e){if(g=(g=im[b])&&g[d]||""){for(var p=g,g=0;g<am.length;g++)if(l=am[g],0<=p.indexOf(l)){var v=vm(a,g),w={};w[l]=v;p=la(w,p)}g=" "+p}a.message("INT "+k(b)+": AH="+k(d)+" @"+jh(c-2-a.O.ta.ya,Mb(a.O))+g)}return e}
        function Ge(a,b,c,d,e){a.message("INT "+k(b)+": C="+(Re(a.O)?1:0)+(e||"")+" (cycles="+d+(c?",level="+(c+1):"")+")")}function lb(a,b,c,d,e,g,l,p){p|=256;if(null==e||(a.Yb&p)==p)p=null,null!=e&&(p=Mb(a.O),e-=a.O.ta.ya),a.message(b.Lg+"."+(null!=d?"outPort":"inPort")+"("+ga(c)+","+(g?g:"unknown")+(null!=d?","+k(d):"")+")"+(null!=l?": "+k(l):"")+(null!=e?" @"+jh(e,p):""))}
        f.Jq=function(){this.R("Type ? for list of debugger commands");this.zd();if(this.Um){var a=nm(this,this.Um);delete this.Um;for(var b in a)Wl(this,a[b])}};function Ul(a){var b;if(rf(a)){if(!a.We||!a.We.length){a.We=Array(1E4);for(b=0;b<a.We.length;b++)a.We[b]=Sl(a);a.Kg=0}if(!a.Dd||!a.Dd.length)for(a.Dd=Array(256),b=0;b<a.Dd.length;b++)a.Dd[b]=[b,0]}else a.Kg=0,a.We=[],a.Dd=[]}f.ag=function(a){if(!wm(this))return!1;this.O.ag(a);return!0};
        f.kh=function(a,b,c){if(!wm(this))return!1;this.Nd=0;do{a||rf(this)&&vf(this,this.O.sa,0);try{var d=this.O.kh(a);0<d&&(this.Nd+=d,id(this.O,d,!0),ad(this.O,d),this.Ah++)}catch(e){this.Nd=0,qb(this.O,e.stack||e.message)}}while(this.O.S&12528);!1!==c&&Zc(this.O);this.zd(b||!1,!1);return 0<this.Nd};f.zb=function(a){this.O&&this.O.zb(a)};f.zd=function(a,b){void 0===a&&(a=!0);void 0===b&&(b=!0);this.od=Sl(this,q(this.O),Mb(this.O));a&&1!=this.Jc?xm(this,null,b):ym(this)};
        function wm(a){var b;if(b=a.O&&pb(a.O))b=a.O,b.fa.jc?b=!0:(b.R(b.toString()+" not powered"),b=!1);b&&!nb(a.O)?(a=a.O,a.fa.Ld?(a.R(a.toString()+" error"),a=!0):a=!1,a=!a):a=!1;return a}f.lc=function(a,b){return!b&&(this.reset(!0),a&&this.restore&&!this.restore(a))?!1:!0};f.kc=function(a,b){b&&this.R(a?"suspending":"shutting down");return a&&this.save?this.save():!0};
        f.reset=function(a){Ul(this);this.Ah=0;this.xk=null;this.Nd=0;this.od=Sl(this,q(this.O),Mb(this.O));void 0===this.fa.qb||a||this.R("reset");this.fa.qb=!1;zm(this);a||this.zd()};f.save=function(){var a=new Je(this);a.set(0,pm(this.od));a.set(1,pm(this.Nf));a.set(2,[this.gd,this.zg,this.Yb]);return a.data()};f.restore=function(a){var b=0;void 0!==a[2]&&(this.od=qm(a[b++]),this.Nf=qm(a[b++]),this.gd=a[b][0],"string"==typeof this.gd&&(this.gd=[this.gd]),this.zg=a[b][1],this.Yb||(this.Yb=a[b][2]));return!0};
        f.start=function(a,b){this.Jc||this.R("running");this.fa.qb=!0;this.Wq=a;this.Od=b};f.stop=function(a,b){if(this.fa.qb){this.fa.qb=!1;this.Nd=b-this.Od;if(!this.Jc){var c="stopped";if(this.Nd){var d=a-this.Wq,e=0<d?Math.round(1E3*this.Nd/d):0,c=c+" (";rf(this)&&(c+=this.Ah+" ops, ",this.Ah=0);c+=this.Nd+" cycles, "+d+" ms, "+e+" hz)"}this.R(c)}this.zd(!0,2!=this.Jc);this.ed();zm(this,this.O.sa)}};function rf(a){return 1<a.Mc.length||a.qa(16)}
        function vf(a,b,c){if(0<c&&(Am(a,b,a.Mc)||3==a.O.ta.Pa&&!(a.O.aa&Qb)))return!0;0<=c&&a.Dd.length&&(a.Ah++,c=jf(a.O,b),null!=c&&(a.Dd[c][1]++,c=a.We[a.Kg],c.za=q(a.O),c.ia=Mb(a.O),c.Ba=b,++a.Kg==a.We.length&&(a.Kg=0)));return!1}function Pc(a,b){return Am(a,b,a.Re)?(a.zb(!0),!0):!1}function Qc(a,b){return Am(a,b,a.Bd)?(a.zb(!0),!0):!1}function qc(a,b,c){a.R("break on input from port "+ga(b)+": "+k(c));a.zb(!0)}function uc(a,b,c){a.R("break on output to port "+ga(b)+": "+k(c));a.zb(!0)}
        function Tl(a){var b;a.Mc=["exec"];if(void 0!==a.Re)for(b=1;b<a.Re.length;b++){var c=a.ma,d=a.$b(a.Re[b]);Sc(c.na[d>>>c.Ca],!1)}a.Re=["read"];if(void 0!==a.Bd)for(b=1;b<a.Bd.length;b++)c=a.ma,d=a.$b(a.Bd[b]),Sc(c.na[d>>>c.Ca],!0);a.Bd=["write"];a.yl=0}f.Xe=function(a,b,c){if(!Bm(this,a,b)){b.Fg=c;a.push(b);if(a!=this.Mc){var d=this.ma,e=this.$b(b);d.na[e>>>d.Ca].Xe(e&d.Ga,a==this.Bd)}c?b.ia=null:this.R("breakpoint enabled: "+sm(b)+" ("+a[0]+")");Ul(this);return!0}return!1};
        function Bm(a,b,c,d){var e=!1;c=Cm(a,a.$b(c));for(var g=1;g<b.length;g++){var l=b[g];if(c==Cm(a,a.$b(l))){e=!0;if(d){b.splice(g,1);b!=a.Mc&&(d=a.ma,Sc(d.na[c>>>d.Ca],b==a.Bd));l.Fg||a.R("breakpoint cleared: "+sm(l)+" ("+b[0]+")");Ul(a);break}a.R("breakpoint exists: "+sm(l)+" ("+b[0]+")");break}}return e}function Dm(a,b){for(var c=1;c<b.length;c++)a.R("breakpoint enabled: "+sm(b[c])+" ("+b[0]+")");return b.length-1}
        function Vc(a,b,c,d){if(void 0===d)Vc(a,b,c,a.Re),Vc(a,b,c,a.Bd);else for(var e=1;e<d.length;e++){var g=a.$b(d[e]);if(g>=b&&g<b+c){var l=a.ma;l.na[g>>>l.Ca].Xe(g&l.Ga,d==a.Bd)}}}function zm(a,b){if(void 0!==b)Am(a,b,a.Mc,!0),a.Jc=0;else for(var c=1;c<a.Mc.length;c++){var d=a.Mc[c];if(d.Fg){if(!Bm(a,a.Mc,d,!0))break;c=0}}}function Cm(a,b){var c=a.jo&-65536;(b&c)==c&&(b&=1048575);return b}
        function Am(a,b,c,d){var e=!1;if(!a.yl++){b=Cm(a,b);a.qa(-2147483632)&&204==jf(a.O,b)&&(e=!0);for(var g=1;!e&&g<c.length;g++){var l=c[g];null!=l.ia&&(l.Ba=null);b==Cm(a,a.$b(l))&&(l.Fg?Bm(a,c,l,!0):d||a.R("breakpoint hit: "+sm(l)+" ("+c[0]+")"),e=!0)}}a.yl--;return e}
        function um(a,b,c,d){for(var e=Sl(a,b.za,b.ia,b.Ba),g=a.Qa(b,1),l=2;(102==g||103==g)&&l--;)102==g?b.ad=!b.ad:b.Zc=!b.Zc,g=a.Qa(b,1);var l=a.th[g],p=l[0],v=-1;205==p&&(p=a.Qa(b,1),l=gm[p]||dm,g|=p<<8,p=l[0]);p>=Zl.length&&(v=a.Qa(b,1),l=hm[p-Zl.length][v>>3&7]);var p=Zl[l[0]],w=l.length-1,F="";if(164<=g&&167>=g||170<=g&&175>=g)w=0,b.ad&&"W"==p.slice(-1)&&(p=p.slice(0,-1)+"D");for(var g=null,K=!0,J=1;J<=w;J++){var I,T;I="";T=l[J];if(void 0!==T){null==g&&(g=T>>14);var Z=T&15;if(0!=Z)if(15==Z)K=!1;else{var S=
        T&240;if(128<=S)if(0>v&&(v=a.Qa(b,1)),160<=S)I=Em(a,v>>3&7,T,b);else{I=a;var Z=b,X="",S=v>>6,xa=v&7;if(3>S){var qa=void 0;if(!S&&(!Z.Zc&&6==xa||Z.Zc&&5==xa))S=2;else{if(Z.Zc)if(4!=xa)xa+=8;else{var X=S,Sa=I.Qa(Z,1),qa=Sa>>6,Fb=Sa>>3&7,Sa=Sa&7,Va="";if(X||5!=Sa)Va=bm[Sa+8];4!=Fb&&(Va&&(Va+="+"),Va+=bm[Fb+8],qa&&(Va+="*"+(1<<qa)));X=Va}X||(X=bm[xa])}1==S?(qa=I.Qa(Z,1),qa&128?(qa=qa<<24>>24,X+="-"+h(-qa,2)):X+="+"+h(qa,2)):2==S&&(X&&(X+="+"),Z.Zc?(qa=I.fe(Z,4),X+=h(qa)):(qa=I.ra(Z,2),X+=h(qa,4)));X=
        "["+X+"]";7==(T&15)&&(X="FAR "+X)}else X=Em(I,xa,T,Z);I=X}else if(16==S)I="1";else if(0==S){I=a;Z=b;S=" ";switch(T&15){case 1:T&12288&&(S=h(I.Qa(Z,1),2));break;case 2:S=h(I.Qa(Z,1)<<24>>24,4);break;case 4:case 8:if(Z.ad){S=h(I.fe(Z,4));break}case 3:S=h(I.ra(Z,2),4);break;case 7:S=sm(Sl(I,I.qc(Z,!0),I.ra(Z,2),null,Z.ad,Z.Zc));break;default:S="imm("+ga(T)+")"}I=S}else 32==S?(b.Zc?(T=8,I=a.fe(b,4)):(T=4,I=a.ra(b,2)),I="["+h(I,T)+"]"):48==S?(I=1==Z?a.Qa(b,1)<<24>>24:a.qc(b,!0),I=b.za+I&(b.ad?-1:65535),
        I=Fm(a,Sl(a,I,b.ia))[0]||h(I,b.ad?8:4)):96==S?I=Em(a,(T&3840)>>8,T,b):112==S?I=Em(a,(T&3840)>>8,176,b):64==S?I="DS:[SI]":80==S&&(I="ES:[DI]");if(!I||!I.length){F="INVALID";break}0<F.length&&(F+=",");F+=I}}}l=sm(e)+" ";v="";do v+=h(a.Qa(e,1),2);while(e.Ba!=b.Ba);l+=ma(v,16);l+=ma(p,8);F&&(l+=" "+F);a.O.ka<$l[g]&&(c=$l[g]+" CPU only");c&&K&&(l=ma(l,56)+";"+c,l=a.O.fa.Ag?l+("cycles="+cd(a.O).toString()+" cs="+h(a.O.T.Wh)):l+(null!=d?"="+d.toString():""));Gm(a,b,K);return l}
        function Em(a,b,c,d){var e=c&240;if(176==e){if(5<b||4<=b&&a.O.ka<Lb)return"??";b+=16}else if(208==e)b+=32;else if(a=c&15,3<=a&&(8>b&&(b+=8),5==a||4==a&&d.ad))b+=16;return am[b]}function Hm(a,b){var c;switch(b){case "V":c=We(a.O);break;case "D":c=a.O.aa&Pb;break;case "I":c=a.O.aa&Qb;break;case "T":c=a.O.aa&Rb;break;case "S":c=Ve(a.O);break;case "Z":c=Ue(a.O);break;case "A":c=Te(a.O);break;case "P":c=Se(a.O);break;case "C":c=Re(a.O);break;default:c=0}return b+(c?"1":"0")+" "}
        function Im(a,b){8<=b&&15>=b&&4<a.vg&&(b+=16);var c=am[b];32==b&&80286==a.O.ka&&(c="MS");return c+"="+vm(a,b)+" "}function Jm(a,b,c){return b.qi+"="+h(b.ia,4)+(c?"["+h(b.ya,a.If)+","+h(b.gb,b.gb&-65536?8:4)+"]":"")}function Km(a,b,c,d,e){return b+"="+(null!=c?h(c,4):"")+"["+h(d,a.If)+","+h(e-d,4)+"]"}
        function Lm(a,b){var c;void 0===b&&(b=!!(a.O.hb&1));c=Im(a,8)+Im(a,11)+Im(a,9)+Im(a,10)+(4<a.vg?"\n":"")+Im(a,12)+Im(a,13)+Im(a,14)+Im(a,15)+"\n"+Jm(a,a.O.ua,b)+" "+Jm(a,a.O.bb,b)+" "+Jm(a,a.O.Ma,b)+" ";if(b){var d="TR="+h(a.O.cb.ia,4),e=a.ma,e="A20="+(e.lg||e.Vh!=e.Db?"OFF ":"ON ");a.O.ka<Lb&&(d="\n"+d,c+=e,e="");c+="\n"+Jm(a,a.O.ta,b)+" ";a.O.ka>=Lb&&(e+="\n",c+=Jm(a,a.O.xc,b)+" "+Jm(a,a.O.yc,b)+"\n");c+=Km(a,"LD",a.O.yd.ia,a.O.yd.ya,a.O.yd.ya+a.O.yd.gb)+" "+Km(a,"GD",null,a.O.Fd,a.O.Cf)+" "+Km(a,
        "ID",null,a.O.Gd,a.O.Ye)+" ";c=c+(d+" "+e)+Im(a,32);a.O.ka>=Lb&&(c+=Im(a,34)+Im(a,35))}else a.O.ka>=Lb&&(c+=Jm(a,a.O.xc,b)+" "+Jm(a,a.O.yc,b)+" ");return c+=Im(a,23)+Hm(a,"V")+Hm(a,"D")+Hm(a,"I")+Hm(a,"T")+Hm(a,"S")+Hm(a,"Z")+Hm(a,"A")+Hm(a,"P")+Hm(a,"C")}
        function Mm(a,b,c){var d;d=2==c?a.Jn:a.od;c=d.za;var e=d.ia;d=d.Ba;if(void 0!==b){"%"==b.charAt(0)&&(b=b.substr(1),c=0,e=null);var g=b;d=null;if(g.match(/^[a-z_][a-z0-9_]*$/i)){d={};for(var l=g.toUpperCase(),p=0;p<a.Sc.length;p++){var g=a.Sc[p][0],v=a.Sc[p][2][l];if(void 0!==v){l=v.o;void 0!==l&&(p=v.s,void 0===p&&(p=g>>>4),d.za=l,d.ia=p,void 0!==v.p&&(d.Ba=v.p));break}}}if(d&&null!=d.za)return d;d=b.indexOf(":");0>d?null!=e?(c=jm(a,b),d=null):d=jm(a,b):(e=jm(a,b.substring(0,d)),c=jm(a,b.substring(d+
        1)),d=null)}d=Sl(a,c,e,d);rm(a,d);return d}function jm(a,b,c){var d;void 0!==b?(d=ya(am,b.toUpperCase()),0<=d&&(b=vm(a,d)),d=fa(b),void 0===d&&a.R("invalid "+(c?c:"value")+": "+b)):a.R("missing "+(c||"value"));return d}
        function nj(a,b,c,d){function e(a,b){return a[0]>b[0]?1:a[0]<b[0]?-1:0}var g={},l=[],p;for(p in d){var v=d[p];"number"==typeof v&&(d[p]=v={o:v});var w=v.o,F=v.s,K=v.a;void 0!==w&&(void 0!==F&&(g.za=w,g.ia=F,g.Ba=null,a.$b(g),(g.Ba&-65536)==(a.ma.Vh&-65536)&&(g.Ba&=1048575),v.p=g.Ba),pa(l,[w,p],e));K&&(v.a=K.replace(/''/g,'"'))}a.Sc.push([b,c,d,l])}
        function Fm(a,b,c){for(var d=[],e=a.$b(b),g=0;g<a.Sc.length;g++){var l=a.Sc[g][0],p=a.Sc[g][1];if(e>=l&&e<l+p){b=oa(a.Sc[g][3],[b.za],function(a,b){return a[0]>b[0]?1:a[0]<b[0]?-1:0});0<=b?Nm(a,g,b,d):c&&(b=~b,Nm(a,g,b-1,d),Nm(a,g,b,d));break}}return d}function Nm(a,b,c,d){var e={},g=a.Sc[b][3],l=0,p=null;0<=c&&c<g.length&&(l=g[c][0],p=g[c][1]);p&&(e=a.Sc[b][2][p],p="."==p.charAt(0)?null:e.l||p);d.push(p);d.push(l);d.push(e.a);d.push(e.c)}
        function Om(a,b){if("?"==b)a.R("\nfrequency commands:"),a.R("\tclear\tclear all frequency counts");else{var c,d=0;if(a.Dd)if("clear"==b){for(c=0;c<a.Dd.length;c++)a.Dd[c]=[c,0];a.R("frequency data cleared");d++}else if(void 0!==b)a.R("unknown frequency command: "+b),d++;else{var e=a.Dd.slice();e.sort(function(a,b){return b[1]-a[1]});for(c=0;c<e.length;c++){var g=e[c][0],l=e[c][1];l&&(a.R((Zl[a.th[g][0]]+"  ").substr(0,5)+" ("+k(g)+"): "+l+" times"),d++)}}d||a.R("no frequency data available")}}
        function Pm(a,b){var c=Mm(a,b,1);if(null!=c.za||null!=c.Ba){var d=a.$b(c);a.R((b?b+": ":"")+sm(c)+" (%"+h(d,a.If)+")");d=Fm(a,c,!0);if(d.length){var e,g;d[0]&&(g="",(e=c.za-d[1])&&(g=" + "+ga(e)),a.R(d[0]+" ("+jh(d[1],c.ia)+")"+g));4<d.length&&d[4]&&(g="",(e=d[5]-c.za)&&(g=" - "+ga(e)),a.R(d[4]+" ("+jh(d[5],c.ia)+")"+g))}else a.R("no symbols")}}
        function Qm(a,b){if("l"==b[0]&&void 0===b[1]||"?"==b[1])a.R("\nlist/load commands:"),a.R("\tl [address] [drive #] [sector #] [# sectors]"),a.R("\tln [address] lists symbol(s) nearest to address");else if("ln"==b[0])Pm(a,b[1]);else{var c="json"==b[1],d,e=0,g=0,l=c?{}:Mm(a,b[1],2);d=jm(a,b[2],"drive #");if(void 0!==d){if(!c){e=jm(a,b[3],"sector #");if(void 0===e)return;g=jm(a,b[4],"# of sectors");void 0===g&&(g=1)}var p=a.Gp;2<=d&&a.ao&&(d-=2,p=a.ao);if(p){var v=p.Hn(d);if(v)if(v.xa)if(c)a.R(v.xa.toJSON());
        else if(p.So(v,e,g)){for(var w=0,F=!1,c=sm(l);!F&&0<v.ob--;)(function(a,b){p.tc(v,function(c){0>c?(a.R("out of data at address "+sm(b)),F=!0):(a.dd(b,c,1),w++)})})(a,l);a.R(w+" bytes read at "+c)}else a.R("sector "+e+" request out of range");else a.R("drive "+d+" not loaded");else a.R("invalid drive: "+d)}else a.R("disk controller not present")}}}
        function xm(a,b,c){if(b&&"?"==b[1])a.R("\nregister commands:"),a.R("\tr\t\tdisplay all registers"),a.R("\tr [target=#]\tmodify target register"),a.R("supported targets:"),a.R("\tall registers and flags V,D,I,S,Z,A,P,C");else{var d;if(null!=b&&1<b.length){var e=b[1];if("p"==e)d=80286<=a.O.ka;else{c=null;var g=e.indexOf("=");if(0<g)c=e.substr(g+1),e=e.substr(0,g);else if(2<b.length)c=b[2];else{a.R("missing value for "+b[1]);return}b=!1;g=fa(c,16);if(!isNaN(g)){b=!0;var l=e.toUpperCase();"E"==l.charAt(0)&&
        4>=a.vg&&(l=null);switch(l){case "AL":a.O.F=a.O.F&-256|g&255;break;case "AH":a.O.F=a.O.F&-65281|g<<8&255;break;case "AX":a.O.F=a.O.F&-65536|g&65535;break;case "BL":a.O.D=a.O.D&-256|g&255;break;case "BH":a.O.D=a.O.D&-65281|g<<8&255;break;case "BX":a.O.D=a.O.D&-65536|g&65535;break;case "CL":a.O.G=a.O.G&-256|g&255;break;case "CH":a.O.G=a.O.G&-65281|g<<8&255;break;case "CX":a.O.G=a.O.G&-65536|g&65535;break;case "DL":a.O.H=a.O.H&-256|g&255;break;case "DH":a.O.H=a.O.H&-65281|g<<8&255;break;case "DX":a.O.H=
        a.O.H&-65536|g&65535;break;case "SP":u(a.O,r(a.O)&-65536|g&65535);break;case "BP":a.O.L=a.O.L&-65536|g&65535;break;case "SI":a.O.K=a.O.K&-65536|g&65535;break;case "DI":a.O.J=a.O.J&-65536|g&65535;break;case "DS":Me(a.O,g);break;case "ES":Ne(a.O,g);break;case "SS":wd(a.O,g);break;case "CS":Le(a.O,g);a.od=Sl(a,q(a.O),Mb(a.O));break;case "IP":C(a.O,g);a.od=Sl(a,q(a.O),Mb(a.O));break;case "PC":case "PS":Bd(a.O,g);break;case "C":g?Ye(a.O):Ze(a.O);break;case "P":g?(e=a.O,e.resultType&=-3,e.aa|=Vb):(e=a.O,
        e.resultType&=-3,e.aa&=~Vb);break;case "A":g?ff(a.O):df(a.O);break;case "Z":g?gf(a.O):ef(a.O);break;case "S":g?(e=a.O,e.resultType&=-17,e.aa|=Sb):(e=a.O,e.resultType&=-17,e.aa&=~Sb);break;case "I":g?(e=a.O,e.aa|=Qb):(e=a.O,e.aa&=~Qb);break;case "D":g?(e=a.O,e.aa|=Pb):(e=a.O,e.aa&=~Pb);break;case "V":g?$e(a.O):af(a.O);break;default:var p=!0;if(80286<=a.O.ka)switch(p=!1,l){case "MS":hf(a.O,g);break;case "TR":a.O.cb.load(g,!0)===n&&(b=!1);break;default:if(p=!0,a.O.ka>=Lb)switch(p=!1,l){case "EAX":a.O.F=
        g;break;case "EBX":a.O.D=g;break;case "ECX":a.O.G=g;break;case "EDX":a.O.H=g;break;case "ESP":u(a.O,g);break;case "EBP":a.O.L=g;break;case "ESI":a.O.K=g;break;case "EDI":a.O.J=g;break;case "FS":a.O.xc.load(g);break;case "GS":a.O.yc.load(g);break;case "CR0":a.O.hb=g;break;case "CR2":a.O.Yf=g;break;case "CR3":a.O.uf=g;break;default:p=!0}}if(p){a.R("unknown register: "+e);return}}}if(!b){a.R("invalid value: "+c);return}Zc(a.O);a.R("\nupdated registers:");c=!0}}a.R((c?"":"\n")+Lm(a,d));a.od=Sl(a,q(a.O),
        Mb(a.O));ym(a,sm(a.od))}}function Rm(a,b,c){for(var d=null,e=b.za,g=e,l=1;6>=l;l++){if(2<l){b.za=e;b.Ba=null;var p=um(a,b);if(0<p.indexOf("CALL")||c&&0<p.indexOf("INT")){d=p;break}}if(!--e)break}b.za=g;return d}function Sm(a,b,c){var d="tr"==b;b=null!=c?+c:1;var e=1==b?0:1;Ja(b,function(){return mb(a,!0)&&a.kh(e,d,!1)},function(){Zc(a.O);mb(a,!1)})}function Gm(a,b,c){b.nl=b.ad||b.Zc;c&&(b.ad=4==a.O.ta.pa,b.Zc=4==a.O.ta.Hd);b.we=c}
        function ym(a,b,c,d){b=Mm(a,b,1);if(null!=b.za){void 0===d&&(d=1);var e=Sl(a,a.ko,b.ia,a.ma.Vh),e=256;if(void 0!==c){e=Mm(a,c,1);if(null==e.za||e.za<b.za)return;e=e.za-b.za;if(256<e){a.R("range too large");return}d=-1}var g=b.za!=a.od.za;c=0;for(Gm(a,b,!0);0<e&&d--;){a.Qa(b);var l=b.Ba,p=nb(a,!1)||a.Jc?a.Nd:null,v=null!=p?"cycles":null,w=Fm(a,b);if(w[0]){var F=w[0]+":",g=!1;w[2]&&(F+=" "+w[2]);a.R(F)}g&&a.R();w[3]&&(v=w[3],p=null);g=um(a,b,v,p);b.we||d||d++;a.R(g);a.od=b;e-=b.Ba-l;g=!1;c++}}}
        function nm(a,b,c){if(c)if(b){0>a.sd&&a.gd.length&&(a.sd=0);if(0>a.sd||b!=a.gd[a.sd])a.gd.splice(0,0,b),a.sd=0;a.sd--}else b=a.gd[a.sd+1];a=b?b.split(0<=b.indexOf("|")?"|":";"):[""];for(var d in a)a[d]=na(a[d]);return a}
        function Wl(a,b){var c=!0;try{if(b.length||(a.zg?(a.R("ended assemble @"+sm(a.Nf)),a.od=a.Nf,a.zg=!1):b="?"),b=b.toLowerCase(),pb(a)&&0<b.length){if(a.zg)b="a "+sm(a.Nf)+" "+b;else{var d,e,g;switch(b){case "reset":return a.Fa&&a.Fa.reset(),!0;case "ver":return a.R("PCjs version 1.18.3 ("+a.O.ka+",RELEASE,NOPREFETCH"+(rb?",TYPEDARRAYS":",LONGARRAYS")+",NOBACKTRACK)"),!0;default:for(e=b.charAt(0),g=1;g<b.length;g++){d=b.charAt(g);if(" "==d)break;if("r"==e||"a">d||"z"<d){b=b.substring(0,g)+" "+b.substring(g);
        break}}}}var l=b.split(" ");switch(l[0].charAt(0)){case "a":var p=Mm(a,l[1],1);if(null!=p.za)if(a.Nf=p,void 0===l[2])a.R("begin assemble @"+sm(p)),a.zg=!0,Zc(a.O);else{var v;a.R("not supported yet");v=[];if(v.length){for(var w=0;w<v.length;w++)a.dd(p,v[w],1);a.R(um(a,a.Nf))}}break;case "b":a:{var F=l[1],K=l[0].charAt(1);if(K&&"?"!=K)if("l"==K)w=0,w+=Dm(a,a.Mc),w+=Dm(a,a.Re),(w+=Dm(a,a.Bd))||a.R("no breakpoints");else if(void 0===F)a.R("missing breakpoint address");else{w={};if("*"!=F&&(w=Mm(a,F,1),
        null==w.za))break a;F=null==w.za?F:ga(w.za);"c"==K?null==w.za?(Tl(a),a.R("all breakpoints cleared")):Bm(a,a.Mc,w,!0)||Bm(a,a.Re,w,!0)||Bm(a,a.Bd,w,!0)||a.R("breakpoint missing: "+sm(w)):"i"==K?a.R("breakpoint "+(nc(a.ma,w.za)?"enabled":"cleared")+": port "+F+" (input)"):"o"==K?a.R("breakpoint "+(rc(a.ma,w.za)?"enabled":"cleared")+": port "+F+" (output)"):null!=w.za&&("p"==K?a.Xe(a.Mc,w):"r"==K?a.Xe(a.Re,w):"w"==K?a.Xe(a.Bd,w):a.R("unknown breakpoint command: "+K))}else a.R("\nbreakpoint commands:"),
        a.R("\tbi [p]\ttoggle break on input port [p]"),a.R("\tbo [p]\ttoggle break on output port [p]"),a.R("\tbp [a]\tset exec breakpoint at addr [a]"),a.R("\tbr [a]\tset read breakpoint at addr [a]"),a.R("\tbw [a]\tset write breakpoint at addr [a]"),a.R("\tbc [a]\tclear breakpoint at addr [a]"),a.R("\tbl\tlist all breakpoints")}break;case "c":a.Ih&&(a.Ih.value="");break;case "d":a:{var J=l[0],w=l[1],I=l[2],T;if("?"==w){w="";for(T in cm)a.Nk[T]&&(w&&(w+=","),w+=T);w+=",state,symbols";a.R("\ndump commands:");
        a.R("\tdb [a] [#]    dump # bytes at address a");a.R("\tdw [a] [#]    dump # words at address a");a.R("\tdd [a] [#]    dump # dwords at address a");a.R("\tdh [#]        dump # instructions prior");w.length&&a.R("dump extensions:\n\t"+w)}else if("state"==w)a.R(Tm(a.Fa,!0));else if("symbols"==w)for(w=0;w<a.Sc.length;w++){var Z=a.Sc[w][0],S=a.Sc[w][2],X;for(X in S)if("."!=X.charAt(0)){var xa=S[X],qa=xa.o;if(void 0!==qa){var Sa=xa.s;void 0===Sa&&(Sa=Z>>>4);var Fb=S[X].l;Fb&&(X=Fb);a.R(jh(qa,Sa)+" "+X)}}}else if("dh"==
        J)tm(a,w);else{"ds"==J&&(J="d",I=w,w="desc");for(T in cm)if(w==T){var Va=a.Nk[T];Va?Va(I):a.R("no dump registered for "+w);break a}var ca=Mm(a,w,2);if(null!=ca.za&&(null!=ca.ia||null!=ca.Ba)){var ta="",da=0,sb="dd"==J?4:"dw"==J?2:1,l=16/sb|0;I&&("l"==I.charAt(0)&&(I=I.substr(1)),(da=+I)&&(da=(da+l-1)/l|0));da||(da=8);for(I=0;I<da;I++){for(var Gb=l=0,Za="",$a="",w=sm(ca),J=0;16>J;J++){var Ha=a.Qa(ca,1),l=l|Ha<<(Gb++<<3);Gb==sb&&(Za+=h(l,2*sb),Za+=1==sb?7==J?"-":" ":"  ",l=Gb=0);$a+=32<=Ha&&128>Ha?
        String.fromCharCode(Ha):"."}ta&&(ta+="\n");ta+=w+"  "+Za+" "+$a}ta&&a.R(ta);a.Jn=ca}}}break;case "e":var Ad=l[1];if(void 0===Ad)a.R("missing address");else{var bd=Mm(a,Ad,2);if(null!=bd.za)for(w=2;w<l.length;w++){var Kc=fa(l[w],16);if(void 0===Kc){a.R("unrecognized value: "+k(Kc));break}a.R("setting "+sm(bd)+" to "+k(Kc));a.dd(bd,Kc,1)}}break;case "f":Om(a,l[1]);break;case "g":a:{var Gj=l[1];if(void 0!==Gj){var Hj=Mm(a,Gj,1);if(null==Hj.za)break a;a.Xe(a.Mc,Hj,!0)}a.ag(!0)||a.R('cpu busy, "g" command ignored')}break;
        case "h":var Ij=l[1];a.fa.qb&&void 0===Ij?(a.R("halting"),a.zb()):tm(a,Ij);break;case "i":var jg=l[1];if(jg&&"?"!=jg){var kg=jm(a,jg);if(void 0!==kg){var jn=pc(a.ma,kg);a.R(ga(kg)+": "+k(jn))}}else a.R("\ninput commands:"),a.R("\ti [p]\tread port [p]"),a.R("warning: port accesses can affect hardware state");break;case "k":w=0;Gb=a.O.ta.ia;Za=Sl(a);$a=Sl(a,r(a.O),a.O.ua.ia);for(a.R("stack trace for "+sm($a));10>w;){ca=null;for(Ha=256;$a.za>>>0<a.O.tk>>>0;){Za.za=a.qc($a,!0);if(null==$a.Ba||!Ha--)break;
        Za.ia=Gb;if(ca=Rm(a,Za))break;Za.ia=a.qc($a);if(ca=Rm(a,Za,!0)){Gb=a.qc($a,!0);0<ca.indexOf("INT")&&a.qc($a,!0);break}}if(!ca)break;ca=ma(ca,50)+";stack="+sm($a)+" return="+sm(Za);a.R(ca);w++}w||a.R("no return addresses found");break;case "l":Qm(a,l);break;case "m":a:{w=null;da=l[1];"?"==da&&(da=void 0);if(void 0!==da){ca=0;if("all"==da)ca=1610481663,da=null;else if("on"==da)w=!0,da=null;else if("off"==da)w=!1,da=null;else{"keys"==da&&(da="key");"kbd"==da&&(da="keyboard");for(ta in cm)if(da==ta){ca=
        cm[ta];w=!!(a.Yb&ca);break}if(!ca){a.R("unknown message category: "+da);break a}}ca&&("on"==l[2]?(a.Yb|=ca,w=!0):"off"==l[2]&&(a.Yb&=~ca,w=!1))}ca=0;Ha="";for(ta in cm)if(!da||da==ta)if(sb=!!(a.Yb&cm[ta]),null===w||w==sb)Ha&&(Ha+=","),++ca%10||(Ha+="\n\t"),"key"==ta&&(ta="keys"),Ha+=ta;void 0===da&&a.R("\nmessage commands:\n\tm [category] [on|off]\tturn categories on/off");a.R((null!==w?w?"messages on:  ":"messages off: ":"message categories:\n\t")+(Ha||"none"))}break;case "o":var lg=l[1],kn=l[2];
        if(lg&&"?"!=lg){var mg=jm(a,lg,"port #"),ng=jm(a,kn);void 0!==mg&&void 0!==ng&&(tc(a.ma,mg,ng),a.R(ga(mg)+": "+k(ng)))}else a.R("\noutput commands:"),a.R("\to [p] [b]\twrite byte [b] to port [p]"),a.R("warning: port accesses can affect hardware state");break;case "p":case "pr":var Jj="pr"==l[0]?1:0,w=1+Jj;if(a.Jc)a.R("step in progress");else{var Oe,ca=!1,Jb=Sl(a,q(a.O),Mb(a.O));do switch(Oe=!1,a.Qa(Jb)){case 38:case 46:case 54:case 62:case 100:case 101:case 102:case 103:case 240:om(a,Jb,1);Oe=!0;
        break;case 204:case 206:a.Jc=w;om(a,Jb,1);break;case 205:case 224:case 225:case 226:a.Jc=w;om(a,Jb,2);break;case 232:a.Jc=w;om(a,Jb,3);break;case 154:a.Jc=w;om(a,Jb,5);break;case 255:var Kj=a.qc(Jb)&14591;a.Jc=4351==Kj||6399==Kj?w:0;break;case 243:case 242:om(a,Jb,1);ca=Oe=!0;break;case 108:case 109:case 110:case 111:case 164:case 165:case 166:case 167:case 170:case 171:case 172:case 173:case 174:case 175:ca&&(a.Jc=w,om(a,Jb,1))}while(Oe);a.Jc?(a.Xe(a.Mc,Jb,!0),a.ag()||(a.O.ed(),a.Jc=0)):Sm(a,Jj?
        "tr":"t")}break;case "r":xm(a,l);break;case "t":case "tr":Sm(a,l[0],l[1]);break;case "u":ym(a,l[1],l[2],8);break;case "x":a:if(void 0===l[1]||"?"==l[1])a.R("\nexecution options:"),a.R("\tcs int #\tset checksum cycle interval to #"),a.R("\tcs start #\tset checksum cycle start count to #"),a.R("\tcs stop #\tset checksum cycle stop count to #"),a.R("\tsp #\t\tset speed multiplier to #");else switch(l[1]){case "cs":var Hd;void 0!==l[3]&&(Hd=+l[3]);switch(l[2]){case "int":a.O.T.Ng=Hd;break;case "start":a.O.T.Xh=
        Hd;break;case "stop":a.O.T.Pg=Hd;break;default:a.R("unknown cs option");break a}void 0!==Hd&&Yc(a.O);a.R("checksums "+(a.O.fa.Ag?"enabled":"disabled"));break;case "sp":void 0!==l[2]&&gd(a.O,+l[2]);a.R("target speed: "+Ib(a.O)+" ("+a.O.T.Ce+"x)");break;default:a.R("unknown option: "+l[1])}break;case "?":var w="commands:",og;for(og in Yl)w+="\n"+ma(og,7)+Yl[og];rf(a)||(w+="\nnote: frequency/history disabled if no exec breakpoints");a.R(w);break;default:a.R("unknown command: "+b),c=!1}}}catch(Lj){a.R("debugger error: "+
        (Lj.stack||Lj.message)),c=!1}return c}Pa(function(){for(var a=kb(window.document,"pcjs","debugger"),b=0;b<a.length;b++){var c=a[b],d=ib(c),d=new Rl(d);jb(d,c)}});function Je(a,b,c){this.id=a.id;this.key=Um(a,b,c);this.Y=a.Y;Vm(this,a.ls)}function Um(a,b,c){a=a.id;if(b){var d=b.indexOf(".");0<d&&(a+=".v"+b.substr(0,d))}c&&(a+="."+c);return a}
        Je.prototype={constructor:Je,set:function(a,b){try{this[this.id][a]=b}catch(c){}},get:function(a){return this[this.id][a]||null},value:function(){return this[this.id]},data:function(){return this[this.id]},load:function(a){return a?(this[this.id]=a,this.ml=!0):this.ml?!0:Ea()&&(a=Fa(this.key))?(this[this.id]=a,this.ml=!0):!1},parse:function(){var a=!0;try{this[this.id]=JSON.parse(this[this.id])}catch(b){Ba(b.message||b),a=!1}return a},toString:function(){var a=this[this.id];return"string"==typeof a?
        a:JSON.stringify(a)},clear:function(a){Vm(this);var b=[];try{for(var c=0,d=window.localStorage.length;c<d;c++)b.push(window.localStorage.key(c))}catch(e){}for(c=0;c<b.length;c++)if((d=b[c])&&(a||d.substr(0,this.key.length)==this.key)){try{window.localStorage.removeItem(d)}catch(g){}b.splice(c,1);c=0}},qa:function(a){return this.Y?this.Y.qa(null==a?16777216:a|16777216):!1},ab:function(a){this.Y&&this.Y.message(a)}};function Vm(a,b){a[a.id]={};b&&a.set("parms",b);a.ml=!1}
        function Wm(a){var b=!0;if(Ea()){var c=JSON.stringify(a[a.id]);Ga(a.key,c)||(Ba("Unable to store "+c.length+" bytes in browser local storage"),b=!1)}return b}
        function Xm(a,b,c){Ua.call(this,"Computer",a,Xm,67108864);this.fa.jc=!1;this.Be=a.busWidth||a.buswidth;this.wd=Ym;this.ri=null;this.ej=!1;this.url=b?b.url:null;this.Ks=(Math.random()+.1).toString(36).substr(2,12);this.xd=Zm(this);if(this.O=hb("CPU",this.id)){this.Y=hb("Debugger",this.id);this.ma=new Zb({id:this.fo+".bus",buswidth:this.Be},this.O,this.Y);var d,e=fb(this.id);if((this.Ge=hb("Panel",this.id))&&this.Ge.Ih)for(b=0;b<e.length;b++)d=e[b],d.Da=this.Ge.Da,d.R=this.Ge.R,d.Ih=this.Ge.Ih;for(b=
        0;b<e.length;b++)d=e[b],d.Kc&&d.Kc(this,this.ma,this.O,this.Y);b=null;d=a.resume;void 0!==d&&(1<d.length?b=this.yk=d:this.wd=parseInt(d,10));var g;if(a=Ya&&Ya.state||(g=!0,a.state))b=this.Qo=a,g||(this.ej=!0,this.wd=Ym),this.wd&&(this.Ck=new Je(this,"1.18.3"),this.Ck.load()?b=null:delete this.Ck);!b&&this.wd&&(g=null,this.xd&&(g=Aa()+"/api/v1/user?req=load&user="+this.xd+"&state="+Um(this,"1.18.3")),b=g)&&(this.ej=!0);b?za(b,!0,null,this,this.ir):ob(this);c||$m(this,this.nk)}else Ba("Unable to find CPU component")}
        eb(Xm);var Ym=0;f=Xm.prototype;f.Hg=function(){return this.Ks};f.kf=function(){return this.xd?this.xd:""};f.ir=function(a,b,c){c?(this.yk=null,this.ej=!1,this.Da("Unable to load machine state from server (error "+c+(b?": "+na(b):"")+")")):this.ri=b;ob(this)};function $m(a,b,c){for(var d=fb(a.id),e=0;e<=d.length;e++){var g=e<d.length?d[e]:a;if(!pb(g)){pb(g,function(){$m(a,b,c)});return}}b.call(a,c)}
        function an(a,b){var c=new Je(a,"1.18.3","validate");if(c.load()&&c.parse()){var d=c.get("timestamp"),e=b?b.get("timestamp"):"unknown";d!=e&&(a.Da("Machine state may be out-of-date\n("+d+" vs. "+e+")\nCheck your browser's local storage limits"),b||c.clear())}}
        f.nk=function(a){void 0===a&&(a=this.wd||(this.ri?1:Ym));var b=!1,c=!1;this.Un=!1;var d=this.Ck||new Je(this,"1.18.3");if(-1==a)b=!0;else if(a>Ym){if(d.load(this.ri)){this.eg=new Je(this,"1.18.3","failsafe");this.eg.load()&&(bn(this,d),a=2,Vm(this.eg));this.eg.set("timestamp",sa());Wm(this.eg);var e=this.wd&&!this.ej;if(1==a||Ca("Click OK to restore the previous PCjs machine state, or CANCEL to reset the machine.")){if(c=d.parse()){var g=d.get("code"),l=d.get("data");g&&("ok"==g?d.load(l):("error"==
        g&&"no machine state"!=l?(this.Da("Error: "+l),"unable to verify user"==l&&(Ga("user",""),this.xd=null)):this.R(g+": "+l),Vm(d),d.load()?(c=d.parse(),e=!0):c=!1))}e&&an(this,c?d:null)}else 2==a&&d.clear()}else an(this);delete this.ri;delete this.Ck}e=fb(this.id);for(g=0;g<e.length;g++)l=e[g],l!==this&&l!=this.O&&(c=cn(this,l,d,b,c));b=[d,a,c];-1!=a?$m(this,this.Ln,b):this.Ln(b)};
        function cn(a,b,c,d,e){if(!b.fa.jc){b.fa.jc=!0;if(b.lc){var g=null;e&&((g=c.get(b.id))||(g=c.get(b.id.replace(/[a-z0-9]\./i,"."))));"string"===typeof g&&(g=null);!b.lc(g,d)&&g&&(Ba("Unable to restore state for "+b.type),a.Qo&&!a.ri?(c.clear(),a.wd=Ym,window&&window.location.reload()):a.Un=!0,b.lc(null),e=!1)}if(!d&&b.Gn)for(a=b.Gn.split("|"),c=0;c<a.length;c++)b.status(a[c])}return e}
        f.Ln=function(a){var b=a[0],c=0>a[1];a=a[2];this.fa.jc=!0;this.Rn||(this.R("PCjs v1.18.3\nCopyright \u00a9 2012-2015 Jeff Parsons <Jeff@pcjs.org>\nLicense: GPL version 3 or later <http://gnu.org/licenses/gpl.html>"),this.Rn=!0);this.O&&(cn(this,this.O,b,c,a),$c(this.O));this.Un&&(bn(this,b),b.clear());!c&&this.eg&&(this.eg.clear(),delete this.eg)};
        function bn(a,b){if(Ca("There may be a problem with your PCjs machine.\n\nTo help us diagnose it, click OK to send this PCjs machine state to http://www.pcjs.org.")){var c=a.kf(),d=b.toString(),e={app:"PCjs",ver:"1.18.3"};e.url=a.url;e.user=c;e.type="bug";e.data=d;za("http://www.pcjs.org/api/v1/report",!0,e)}}
        function Tm(a,b,c){var d,e="none",g=new Je(a,"1.18.3"),l=new Je(a,"1.18.3","validate"),p=sa();l.set("timestamp",p);g.set("timestamp",p);g.set("version","1.18.3");g.set("url",window?window.location.href:null);g.set("browser",window?window.navigator.userAgent:"");a.O&&a.O.kc&&(c&&a.O.zb(),d=a.O.kc(b,c),"object"===typeof d&&g.set(a.O.id,d),c&&(a.O.fa.jc=!1,!1===d&&(e=null)));for(var p=fb(a.id),v=0;v<p.length;v++){var w=p[v];w.fa.jc&&(w.kc&&(d=w.kc(b,c),"object"===typeof d&&g.set(w.id,d)),c&&(w.fa.jc=
        !1,!1===d&&(e=null)))}e&&(c?(p=d=!1,b?(a.xd&&dn(a,a.xd,g.toString()),Wm(l)&&Wm(g)||(e=null,d=p=!0)):a.wd&&(d=!0,p=3==a.wd),d&&g.clear(p)):e=g.toString());c&&(a.fa.jc=!1);return e}f.reset=function(){this.ma&&this.ma.reset&&(this.ab("Resetting "+this.ma.type),this.ma.reset());for(var a=fb(this.id),b=0;b<a.length;b++){var c=a[b];c!==this&&c!==this.ma&&c.reset&&(this.ab("Resetting "+c.type),c.reset())}};
        f.start=function(a,b){for(var c=fb(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.start&&e.start(a,b)}};f.stop=function(a,b){for(var c=fb(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.stop&&e.stop(a,b)}};
        f.Nb=function(a,b,c){var d=this;switch(b){case "save":return this.va[b]=c,c.onclick=function(){var a=Zm(d,!0);if(a){var b=!(!d.wd||d.yk),c=Tm(d,b);b?dn(d,a,c):d.Da("Resume disabled, machine state not saved")}},!0;case "reset":return this.va[b]=c,c.onclick=function(){fd(d)},!0}return!1};
        function Zm(a,b){var c=a.xd;c||(c=Fa("user"),void 0!==c?!c&&b&&(c=null,window&&(c=window.prompt("To save machine states on the pcjs.org server, you need a user ID (email support@pcjs.org).\n\nOnce you have an ID, enter it below.","")),c&&((c=en(a,c))||a.Da("Your user ID has not been approved."))):b&&a.Da("Browser local storage is not available"));return c}
        function en(a,b){a.xd=null;var c=za(Aa()+"/api/v1/user?req=verify&user="+b),d=c[1];if(!c[0]&&d)try{c=eval("("+d+")"),c.code&&"ok"==c.code&&(Ga("user",c.data),a.xd=c.data)}catch(e){Ba(e.message+" ("+d+")")}return a.xd}
        function dn(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=Um(a,"1.18.3");d.data=c;b=za(Aa()+"/api/v1/user",!1,d);d=b[1];if(b[0]){if(d){var e=d.indexOf("\n");0<e&&(d=d.substr(0,e));d.indexOf("Error: ")||(d=d.substr(7))}d='{"code":'+b[0]+',"data":"'+d+'"}'}b=JSON.parse(d);b&&"ok"==b.code?a.Da("Machine state saved to server"):c&&(c=b&&b.data||"unable to save machine state",c="error"==b.code?"Error: "+c:"Error "+b.code+": "+c,a.Da(c),Ga("user",""),a.xd=null)}}
        function fd(a){if(a.wd&&!a.yk){var b=Ca("Click OK to save changes to this PCjs machine.\n\nWARNING: If you CANCEL, all disk changes will be discarded.");Tm(a,b,!0);!b&&a.Qo?window&&window.location.reload():(b||(a.ol=!0),a.nk(Ym),a.ol=!1)}else a.reset(),a.O&&$c(a.O)}function xb(a,b,c){a=fb(a.id);for(var d=0;d<a.length;d++){var e=a[d];if(c)c==e&&(c=null);else if(e.type==b)return e}return null}
        Pa(function(){for(var a=kb(window.document,"pcjs-machine"),b=0;b<a.length;b++)for(var c=a[b],d=ib(c),c=kb(c,"pcjs","computer"),e=0;e<c.length;e++){var g=c[e],l=ib(g),l=new Xm(l,d,!0);jb(l,g);$m(l,l.nk)}});La.show.push(function(){for(var a=kb(window.document,"pcjs","computer"),b=0;b<a.length;b++){var c=ib(a[b]);(c=hb("Computer",c.id))&&c.Rn&&!c.fa.jc&&c.nk(-1)}});
        La.exit.push(function(){for(var a=kb(window.document,"pcjs","computer"),b=0;b<a.length;b++){var c=ib(a[b]);(c=hb("Computer",c.id))&&c.fa.jc&&Tm(c,!(!c.wd||c.yk),!0)}});var fn=0;function gn(a,b,c,d,e,g){e("Loading "+a+"...");za(a,!0,null,null,function(l,p,v){v?(p||(p="unable to load "+a+" ("+v+")"),g(p,null)):hn(p,a,b,c,d,e,g)})}
        function hn(a,b,c,d,e,g,l){function p(a,g){if(g)l(g,null);else{if(c){var p=b;p&&0>p.indexOf("/")&&(p=window.location.pathname+p);a=a.replace(/(<machine[^>]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" state=$2"+d+"$2":"")+(p?" url=$2"+p+"$2":""))}p=null;if("<"==a.charAt(0))try{window.ActiveXObject||"ActiveXObject"in window?(e||(a=a.replace(/<!DOCTYPE(.|[\r\n])*]>\s*/g,"")),p=new window.ActiveXObject("Microsoft.XMLDOM"),p.async=!1,p.loadXML(a)):p=(new window.DOMParser).parseFromString(a,"text/xml")}catch(K){p=
        null,a=K.message}else a="unrecognized XML: "+(255<a.length?a.substr(0,255)+"...":a);l(a,p)}}a?e?ln(a,g,p):p(a,null):l("no data"+(b?" for file: "+b:""),null)}
        function ln(a,b,c){var d;if(d=/<([a-z]+)\s+ref="(.*?)"(.*?)\/>/g.exec(a)){var e=d[2];b("Loading "+e+"...");za(e,!0,null,null,function(g,l,p){if(p||!l)c(a,"unable to resolve XML reference: "+d[0]+" ("+p+")");else{if(g=d[3])if(p=l.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var v=p[0],w,F=/( [a-z]+=)(['"])(.*?)\2/g;w=F.exec(g);)v=0>v.indexOf(w[1])?v.replace(">",w[0]+">"):v.replace(new RegExp(w[1]+"(['\"])(.*?)\\1"),w[0]);p[0]!=v&&(l=l.replace(p[0],v))}else{c(a,"missing <"+d[1]+"> in "+e);return}l=l.replace(/<\?xml[^>]*>[\r\n]*/,
        "");a=a.replace(d[0],l);ln(a,b,c)}})}else c(a,null)}
        function mn(a,b,c,d){function e(a){if(void 0===p){var b=l&&kb(l,"machine-warning");p=b&&b[0]||l}p&&(p.innerHTML=ka(a))}function g(a){e("Error: "+a);v&&(--fn||Ra(!0));v=!1}var l,p,v=!0;fn++;try{if(l=window.document.getElementById(a)){c||(c="/versions/pcjs/1.18.3/components.xsl");var w=function(d,p){if(p){var v=function(d,v){if(v)if(v)if(e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window){var w=p.transformNode(v);w?(l.outerHTML=w,--fn||Ra(!0)):g("transformNodeToObject failed")}else window.document.implementation&&
        window.document.implementation.createDocument?(w=new XSLTProcessor,w.importStylesheet(v),(w=w.transformToFragment(p,window.document))?l.parentNode?(l.parentNode.replaceChild(w,l),--fn||Ra(!0)):g("invalid machine element: "+a):g("transformToFragment failed")):g("unable to transform XML: unsupported browser");else g("failed to load XSL file: "+c);else g(d)};p?gn(c,null,null,!1,e,v):g("failed to load XML file: "+b)}else g(d)};"<"!=b.charAt(0)?gn(b,a,d,!0,e,w):hn(b,null,a,d,!1,e,w)}else g("missing machine element: "+
        a)}catch(F){g(F.message)}return v}window.embedPC=function(a,b,c,d){Ra(!1);return mn(a,b,c,d)};window.enableEvents=Ra;window.sendEvent=Ta;})();
        
      • pc.js
        (function(){var f,aa,g,ba={163840:[40,1,8],184320:[40,1,9],327680:[40,2,8],368640:[40,2,9],737280:[80,2,9],1228800:[80,2,15],1474560:[80,2,18],2949120:[80,2,36]};
        function ca(a,b){var c;if(a){b||(b=16);if("$"==a.charAt(0))b=16,a=a.substr(1);else if("0x"==a.substr(0,2))b=16,a=a.substr(2);else{var d=a.charAt(a.length-1).toLowerCase();"h"==d?(b=16,d=null):"."==d&&(b=10,d=null);null===d&&(a=a.substr(0,a.length-1))}var e,d=a;(b&&10!=b?16==b?null!==d.match(/^[0-9a-f]+$/i):1:null!==d.match(/^[0-9]+$/))&&!isNaN(e=parseInt(a,b))&&(c=e|0)}return c}
        function da(a,b){var c="";void 0===b?b=8:8<b&&(b=8);if(null==a||isNaN(a))for(;0<b--;)c="?"+c;else for(;0<b--;){var d=a&15,d=d+(0<=d&&9>=d?48:55),c=String.fromCharCode(d)+c;a>>=4}return c}function ea(a){return"0x"+da(a,2)}function fa(a,b){var c=a,d=a.lastIndexOf("/");0<=d&&(c=a.substr(d+1));d=c.indexOf("&");0<d&&(c=c.substr(0,d));b&&(d=c.lastIndexOf("."),0<d&&(c=c.substring(0,d)));return c}function ha(a){var b="",c=a.lastIndexOf(".");0<=c&&(b=a.substr(c+1).toLowerCase());return b}
        var ia={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};function ja(a){return a.replace(/[&<>"']/g,function(a){return ia[a]})}var ka=Date.now||function(){return+new Date};function la(){function a(a){return(10>a?"0":"")+a}var b=new Date;return b.getFullYear()+"-"+a(b.getMonth()+1)+"-"+a(b.getDate())+" "+a(b.getHours())+":"+a(b.getMinutes())+":"+a(b.getSeconds())}var ma=[31,28,31,30,31,30,31,31,30,31,30,31];
        function na(a,b){var c=0,d=1,e;for(e in a){if(d>=arguments.length)break;d++;c=void 0}return c}function oa(a,b){return(b&a.Mp)>>a.shift}
        function pa(a,b,c,d,e,m){b=!!b;var n=0,p=null,v=fa(a),w=window.XMLHttpRequest?new window.XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");b&&(w.onreadystatechange=function(){4===w.readyState&&(p=w.responseText,200==w.status||!w.status&&p.length&&"file:"==(window?window.location.protocol:"file:")||(n=w.status||-1),e&&(d?e.call(d,v,p,n,m):e(v,p,n,m)))});if(c){var G="",N;for(N in c)c.hasOwnProperty(N)&&(G&&(G+="&"),G+=N+"="+encodeURIComponent(c[N]));G=G.replace(/%20/g,"+");w.open("POST",
        a,b);w.setRequestHeader("Content-type","application/x-www-form-urlencoded");w.send(G)}else w.open("GET",a,b),w.send();a=[];b||(p=w.responseText,200!=w.status&&(n=w.status||-1),e&&(d?e.call(d,v,p,n,m):e(v,p,n,m)),a=[n,p]);return a}function qa(){return"http://"+(window?window.location.host:"www.pcjs.org")}function ra(a){window&&window.alert(a)}function sa(a){var b=!1;window&&(b=window.confirm(a));return b}var ta=null;
        function ua(){if(null==ta){var a=!1;if(window)try{window.localStorage.setItem("PCjs.localStorage","PCjs.localStorage"),a="PCjs.localStorage"==window.localStorage.getItem("PCjs.localStorage"),window.localStorage.removeItem("PCjs.localStorage")}catch(b){a=!1}ta=a}return ta}function va(a){var b;if(window)try{b=window.localStorage.getItem(a)}catch(c){}return b}function wa(a,b){try{return window.localStorage.setItem(a,b),!0}catch(c){}return!1}
        function ya(a){if(window){var b=window?window.navigator.userAgent:"";return"iOS"==a&&b.match(/(iPod|iPhone|iPad)/)&&b.match(/AppleWebKit/)||"MSIE"==a&&b.match(/(MSIE|Trident)/)||0<=b.indexOf(a)?!0:!1}return!1}var Aa={init:[],show:[],exit:[]},Ba=!1,Ca=!0;function Da(a,b){if(window){var c=window[a];window[a]="function"!==typeof c?b:function(){c&&c();b()}}}function Ea(a){Aa.init.push(a)}
        function Fa(a){if(Ca)try{for(var b=0;b<a.length;b++)a[b]()}catch(c){ra("An unexpected exception occurred:\n\n"+c.message+"\n\nPlease send this information to support@pcjs.org. Thanks.")}}function Ga(a){!Ca&&a?(Ca=!0,Ba&&Ha("init")):Ca=a}function Ha(a){Aa[a]&&Fa(Aa[a])}Da("onload",function(){Ba=!0;Fa(Aa.init)});Da("onpageshow",function(){Fa(Aa.show)});Da(ya("Opera")||ya("iOS")?"onunload":"onbeforeunload",function(){Fa(Aa.exit)});
        function Ia(a,b,c){this.type=a;b||(b={id:"",name:""});this.id=b.id;this.name=b.name;this.Km=b.comment;this.dr=b;void 0===this.id&&(this.id="");b=this.id.indexOf(".");0<b?(this.gn=this.id.substr(0,b),this.Vg=this.id.substr(b+1)):this.Vg=this.id;this[a]=c;this.ha={Sf:!1,Wc:!1,qk:!1,dc:!1,yd:!1};this.ni=null;this.ha.yd=!1;this.qa={};this.Ra=null;Ja[Ja.length]=this}var Ka=void 0,La={};
        if(window){Ka||(Ka=window.location.search.substr(1));for(var Ma,Na=/\+/g,Oa=/([^&=]+)=?([^&]*)/g;Ma=Oa.exec(Ka);)La[decodeURIComponent(Ma[1].replace(Na," "))]=decodeURIComponent(Ma[2].replace(Na," "))}function Pa(a){function b(){}if(window){if(!a)throw new TypeError;if(Object.create)return Object.create(a);var c=typeof a;if("object"!==c&&"function"!==c)throw new TypeError;}b.prototype=a;return new b}
        function Qa(a,b){b||(b=Ia);a.prototype=Pa(b.prototype);a.prototype.constructor=a;a.prototype.parent=b.prototype}var Ja=[];function Ra(a){var b,c=[];a&&(a=0<(b=a.indexOf("."))?a.substr(0,b+1):"");for(b=0;b<Ja.length;b++){var d=Ja[b];a&&d.id.indexOf(a)||c.push(d)}return c}function Sa(a,b){if(void 0!==a){var c;b&&0<(c=b.indexOf("."))&&(a=b.substr(0,c+1)+a);for(c=0;c<Ja.length;c++)if(Ja[c].id===a)return Ja[c]}return null}
        function Ta(a,b){var c;if(void 0!==a){var d;b&&(b=0<(d=b.indexOf("."))?b.substr(0,d+1):"");for(d=0;d<Ja.length;d++)if(c)c==Ja[d]&&(c=null);else if(!(a!=Ja[d].type||b&&Ja[d].id.indexOf(b)))return Ja[d]}return null}function Ua(a){var b=null;if(a=a.getAttribute("data-value"))try{b=eval("({"+a+"})")}catch(c){ra(c.message+" ("+a+")")}return b}window&&!window.document.ELEMENT_NODE&&(window.document.ELEMENT_NODE=1);
        function Wa(a,b){for(var c=Xa(b.parentNode,"pcjs-control"),d=0;d<c.length;d++)for(var e=c[d].childNodes,m=0;m<e.length;m++){var n=e[m];if(n.nodeType===window.document.ELEMENT_NODE){var p=n.getAttribute("class");if(p)for(var v=p.split(" "),w=0;w<v.length;w++)switch(p=v[w],p){case "pcjs-binding":(p=Ua(n))&&p.binding&&a.Lb(p.type,p.binding,n),w=v.length}}}}
        function Xa(a,b,c){c&&(b+="-"+c+"-object");if(a.getElementsByClassName)return a.getElementsByClassName(b);var d;c=[];a=a.getElementsByTagName("*");var e=new RegExp("(^| )"+b+"( |$)");b=0;for(d=a.length;b<d;b++)e.test(a[b].className)&&c.push(a[b]);return c}
        Ia.prototype={constructor:Ia,parent:null,toString:function(){return this.name?this.name:this.id||this.type},Lb:function(a,b,c){switch(b){case "clear":return this.qa[b]||(this.qa[b]=c,c.onclick=function(a){return function(){a.qa.print&&(a.qa.print.value="")}}(this)),!0;case "print":return this.qa[b]||(this.jk=this.qa[b]=c,c.value="",this.pc=function(a){return function(b,c){8192<a.value.length&&(a.value=a.value.substr(a.value.length-4096));a.value+=(void 0!==c?c+": ":"")+(b||"")+"\n";a.scrollTop=a.scrollHeight}}(c),
        this.wa=function(a,b,c){this.pc(a,"notice",c)}),!0;default:return!1}},log:function(){},assert:function(){},pc:function(){},status:function(a){this.pc(this.Vg+": "+a)},wa:function(a,b){b||ra(a)},gc:function(){return this.ha.dc=!0},fc:function(a,b){b&&(this.ha.dc=!1);return!0},oc:function(){return!1}};function Ya(a,b){if(a.ha.qk)return a.ha.Wc&&(a.ha.Wc=!1),a.ha.qk=!1;if(a.ha.yd)return a.pc(a.toString()+" error"),!1;a.ha.Wc=b;return a.ha.Wc}
        function Za(a,b){if(!a.ha.yd&&(a.ha.Sf=!1!==b,a.ha.Sf)){var c=a.ni;a.ni=null;c&&c()}}function $a(a,b){b&&(a.ha.Sf?b():a.ni=b);return a.ha.Sf}function ab(a,b){a.ha.yd=!0;a.wa(b)}var bb="undefined"!==typeof ArrayBuffer;function cb(a){Ia.call(this,"Panel",a,cb);this.canvas=null;this.ee=this.fe=this.Wg=-1}Qa(cb);function db(a,b,c,d){this.tf=[a,b,c,d];this.Jj=null;void 0===a&&(this.tf[0]=256*Math.random()|0,this.tf[1]=256*Math.random()|0,this.tf[2]=256*Math.random()|0,this.tf[3]=255,this.Jj=null)}
        db.prototype.toString=function(){this.Jj||(this.Jj="#"+da(this.tf[0],2)+da(this.tf[1],2)+da(this.tf[2],2));return this.Jj};function eb(a,b,c,d){this.x=a;this.y=b;this.Kc=c;this.Vc=d}eb.prototype.contains=function(a,b){return a>=this.x&&a<this.x+this.Kc&&b>=this.y&&b<this.y+this.Vc};function fb(a,b,c,d){void 0===d&&(d=b>=c>>2);d?(b=new eb(a.x,a.y,a.Kc,a.Vc*b/c|0),a.y+=b.Vc,a.Vc-=b.Vc):(b=new eb(a.x,a.y,a.Kc*b/c|0,a.Vc),a.x+=b.Kc,a.Kc-=b.Kc);return b}f=cb.prototype;
        f.Lb=function(a,b,c){return this.za&&this.za.Lb(a,b,c)||this.U&&this.U.Lb(a,b,c)||this.Da&&this.Da.Lb(a,b,c)?!0:this.parent.Lb.call(this,a,b,c)};f.Lc=function(a,b,c,d){this.za=a;this.la=b;this.U=c;this.Ra=d;this.Da=gb(a,"Keyboard")};f.gc=function(a,b){b||hb();return!0};f.fc=function(){return!0};f.ik=function(a,b){a.button||(this.Wg=b?0:-1,ib(this,a,b))};f.kn=function(a){ib(this,a)};
        function ib(a,b,c){var d=1280/a.canvas.offsetWidth,e=720/a.canvas.offsetHeight,m=a.canvas.getBoundingClientRect(),d=(b.clientX-m.left)*d|0;b=(b.clientY-m.top)*e|0;null==c&&(a.Wg||(a.Wg=Math.abs(a.ee-d)>Math.abs(a.fe-b)?1:2),1==a.Wg?b=a.fe:2==a.Wg&&(d=a.ee));a.ee=d;a.fe=b;if(0<=d&&1280>d&&0<=b&&720>b){a:{c=d;if(960>c&&a.Xa&&a.Xa.Ff)for(m=0;m<a.Xa.Ff.length;m++)if(e=a.Xa.Ff[m],e.contains(c,b)){c-=e.x;b-=e.y;var d=a.Xa.zg[m],n=oa(jb.yn,a.Xa.Rj[d.Do]),m=n*a.la.ob,d=(n+d.Pd)*a.la.ob-1;0<b&&(m+=e.Kc*(b-
        1)*a.Bn);m+=c*a.Bn;m|=0;m>d&&(m=d);c=m;break a}c=h}c!==h&&(c&=-16,c!=a.vm&&(kb(a,c,!0),a.vm=c))}}
        f.de=function(){if(this.canvas&&this.$h&&this.ne&&this.cf){var a=this.ne.width,b=this.ne.height;this.cf.fillStyle="black";this.cf.fillRect(0,0,a,b);lb(this,18,this.ne,this.cf,this.canvas.style.color);mb(this,3);k(this,"CPU");k(this,"Target");k(this,"Current");nb(this);k(this,this.U.ma);k(this,this.U.R.nf.toFixed(2)+"Mhz");k(this,ob(this.U));nb(this,2);mb(this,8);var c=this.U.ma<qb?4:8;this.Vp=16;this.sn=c;k(this,"AX",this.U.F,2);k(this,"DS",this.U.kb.sa,0,1);k(this,"DX",this.U.H,2);k(this,"SI",this.U.K,
        0,1.5);k(this,"BX",this.U.D,2);k(this,"ES",this.U.Qa.sa,0,1);k(this,"CX",this.U.G,2);k(this,"DI",this.U.J,0,1.5);k(this,"CS",this.U.oa.sa,2);k(this,"SS",this.U.ra.sa,0,1);k(this,"IP",l(this.U),2);k(this,"SP",q(this.U),0,1.5);k(this,"PS",c=rb(this.U),2);k(this,"BP",this.U.L,0,1.5);this.U.ma>=qb&&(k(this,"FS",this.U.Hd.sa,2),k(this,"CR0",this.U.zb,0,1),k(this,"GS",this.U.Id.sa,2),k(this,"CR3",this.U.gg,0,1.5));mb(this,9);k(this,"V"+(c&sb?1:0));k(this,"D"+(c&tb?1:0));k(this,"I"+(c&ub?1:0));k(this,"T"+
        (c&vb?1:0));k(this,"S"+(c&wb?1:0));k(this,"Z"+(c&xb?1:0));k(this,"A"+(c&yb?1:0));k(this,"P"+(c&zb?1:0));k(this,"C"+(c&Ab?1:0),0,2);kb(this,this.vm);this.$h.drawImage(this.ne,0,0,a,b,this.Bt,this.Et,this.Zs,this.bt)}};function Bb(a,b,c,d){a.Xa.zg[a.Xa.Fm++]={Do:b,Pd:c,type:d};return na(jb,b,c,0,d)}
        function kb(a,b,c){if(a.$h&&a.ne&&a.cf){var d=a.ne.width;a.cf.fillStyle="black";a.cf.fillRect(0,360,d,360);lb(a,378,a.ne,a.cf,a.canvas.style.color);mb(a,24);if(null==b)k(a,"Mouse over memory to dump");else{k(a,"0x"+da(b),null,0,1);for(var e=1;16>=e;e++){for(var m="",n=1;8>=n;n++){var p=Cb(a.la,b++);k(a,da(p,2),null,1);m+=32<=p&&128>p?String.fromCharCode(p):"."}k(a,m,null,0,1)}}c&&a.$h.drawImage(a.ne,0,360,d,360,a.zt,a.Ct,a.Xs,a.$s)}}
        function lb(a,b,c,d,e){var m,n=a.Ur=10;a.cd=n;a.Cf=b;a.Wf=a.dn=18;m||(m=a.$m||a.dn+"px Monaco, Lucida Console, Courier New");a.oi=a.$m=m;c&&(a.bo=c);d&&(a.wd=d,a.jo=e||"white")}function mb(a,b){a.kk=a.bo.width/b|0}function nb(a,b){a.cd=a.Ur;a.Cf+=(a.Wf+2)*(b||1)}function k(a,b,c,d,e){a.wd.font=a.oi;a.wd.fillStyle=a.jo;a.wd.fillText(b,a.cd,a.Cf);a.cd+=a.kk;null!=c&&(16!=a.Vp?b=c.toString():(b=8>a.sn?"0x":"",b+=da(c,a.sn)),a.wd.fillText(b,a.cd,a.Cf),a.cd+=a.kk);d&&(a.cd+=a.kk*d);e&&nb(a,e)}
        function hb(){for(var a=!1,b=Xa(window.document,"pcjs","panel"),c=0;c<b.length;c++){var d=b[c],e=Ua(d),m=Sa(e.id);m||(a=!0,m=new cb(e));Wa(m,d);a&&Za(m)}}Ea(hb);function Db(a,b,c){Ia.call(this,"Bus",a,Db);this.U=b;this.Ra=c;this.Be=a.buswidth||20;this.Xj=Math.pow(2,this.Be);this.Qp=this.xb=this.Xj-1|0;this.Aa=32==this.Be||20>=this.Be?12:24>=this.Be?14:15;this.ob=1<<this.Aa;this.nn=this.ob>>2;this.Ea=this.ob-1;this.Xd=this.Xj/this.ob|0;this.$c=this.Xd-1;this.Dh=[];this.Eh=[];this.Dk();Za(this)}Qa(Db);
        var jb,Eb={yn:20,count:8,Vs:1,type:3},Fb=0,Gb;for(Gb in Eb){var Hb=Eb[Gb];Eb[Gb]={Mp:(1<<Hb)-1<<Fb,shift:Fb};Fb+=Hb}jb=void 0;f=Db.prototype;f.Dk=function(){var a=new r;this.ka=Array(this.Xd);for(var b=0;b<this.Xd;b++)this.ka[b]=a;this.U.Dk(this.ka,this.Aa);a=this.U;a.xb=a.$d=this.xb};f.reset=function(){Ib(this,!0)};f.gc=function(a,b){b||this.reset();return!0};
        function Jb(a,b,c,d,e){for(var m=b>>>a.Aa;0<c&&m<a.ka.length;){var n=a.ka[m],p=m*a.ob,v=c>a.ob?a.ob:c;if(n&&n.size){if(n.type==d&&n.W==e){if(b+c<=n.Bg)return n.qg+=n.Bg-b,n.Bg=b,!0;if(b>=n.Bg+n.qg){v=n.size-(b-p);v>c&&(v=c);n.qg=b-n.Bg+v;c-=v;b=p+a.ob;continue}}return Kb(1,b,c)}a.ka[m++]=new r(b,v,a.ob,d,e);c-=v;b=p+a.ob}return 0<c?Kb(2,b,c):!0}
        function Ib(a,b){if(32==a.Be)b?a.vg&&(Lb(a,1048576,1048576,a.vg),a.vg=null):a.vg||(a.vg=Mb(a,1048576,1048576),Lb(a,1048576,1048576,Mb(a,0,1048576)));else if(20<a.Be){var c=a.xb&-1048577|(b?1048576:0);if(c!=a.xb&&(a.xb=c,a.U)){var d=a.U;d.xb=d.$d=c}}}f.Lj=function(a,b,c){if(!(a&this.Ea||!b||b&this.Ea)){for(var d=a>>>this.Aa;0<b;){var e=this.ka[d];if(!e.W)return Kb(5,a,b);e.md(c);b-=this.ob;d++}return!0}return Kb(3,a,b)};
        function Nb(a,b,c){if(!(b&a.Ea||!c||c&a.Ea)){for(var d=b>>>a.Aa;0<c;)b=d*a.ob,a.ka[d++]=new r(b),c-=a.ob;return!0}return Kb(4,b,c)}function Mb(a,b,c){var d=[];for(b>>>=a.Aa;0<c&&b<a.ka.length;)d.push(a.ka[b++]),c-=a.ob;return d}function Lb(a,b,c,d,e){for(var m=0,n=b>>>a.Aa;0<c&&n<a.ka.length;){var p=d[m++];if(!p)break;if(void 0!==e){var v=new r(b);v.clone(p,e);p=v}a.ka[n++]=p;c-=a.ob}}f.wc=function(a){return this.ka[(a&this.xb)>>>this.Aa].xc(a&this.Ea,a)};
        function Cb(a,b){return a.ka[(b&a.xb)>>>a.Aa].wj(b&a.Ea,b)}f.na=function(a){var b=a&this.Ea,c=(a&this.xb)>>>this.Aa;return b!=this.Ea?this.ka[c].xj(b,a):this.ka[c++].xc(b,a)|this.ka[c&this.$c].xc(0,a+1)<<8};function Ob(a,b){var c=b&a.Ea,d=(b&a.xb)>>>a.Aa;return c!=a.Ea?a.ka[d].rr(c,b):a.ka[d++].wj(c,b)|a.ka[d&a.$c].wj(0,b+1)<<8}
        f.Tg=function(a){var b=a&this.Ea,c=(a&this.xb)>>>this.Aa;if(b<this.Ea-2)return this.ka[c].yc(b,a);var d=(b&3)<<3;return this.ka[c].yc(b&-4,a)>>>d|this.ka[c+1&this.$c].yc(0,a+3)<<32-d};f.Oe=function(a,b){this.ka[(a&this.xb)>>>this.Aa].Cc(a&this.Ea,b&255,a)};f.Eb=function(a,b){var c=a&this.Ea,d=(a&this.xb)>>>this.Aa;c!=this.Ea?this.ka[d].Oj(c,b&65535,a):(this.ka[d++].Cc(c,b&255,a),this.ka[d&this.$c].Cc(0,b>>8&255,a+1))};
        function Pb(a,b,c){var d=b&a.Ea,e=(b&a.xb)>>>a.Aa;d!=a.Ea?a.ka[e].Pr(d,c&65535,b):(a.ka[e++].fm(d,c&255,b),a.ka[e&a.$c].fm(0,c>>8&255,b+1))}f.Kj=function(a,b){var c=a&this.Ea,d=(a&this.xb)>>>this.Aa;if(c<this.Ea-2)this.ka[d].Se(c,b);else{var e,m=(c&3)<<3,c=c&-4;e=this.ka[d].yc(c,a);this.ka[d].Se(c,e&~(-1<<m)|b<<m,a);d=d+1&this.$c;a+=3;e=this.ka[d].yc(0,a);this.ka[d].Se(0,e&-1<<m|b>>>32-m,a)}};
        function Qb(a){for(var b=0,c=[],d=0;d<a.Xd;d++){var e=a.ka[d];if(e.Ka||e.Pm){c[b++]=d;var m=b++;a:if(e=e.save()){for(var n=0,p=0,v=[];n<e.length;){for(var w=e[n],G=n+1;G<e.length&&e[G]===w;)G++;v[p++]=G-n;v[p++]=w;n=G}if(v.length<e.length){e=v;break a}}c[m]=e}}c[b]=!a.vg&&a.Qp==a.xb;return c}
        function Tb(a,b,c,d){void 0===d&&(d=0);for(var e in c){var m=a,n=+e+d,p=b,v=c[e];if(void 0!==v)for(var w=+e+d;w<=n;w++)void 0!==m.Dh[w]?ra("Input port 0x"+da(w,4)+" registered by "+m.Dh[w][0].id+", ignoring "+p.id):m.Dh[w]=[p,v,!1,!1]}}function Ub(a,b,c){var d=255;a=a.Dh[b];void 0!==a&&a[1]&&(b=a[1].call(a[0],b,c),void 0!==b&&(d=b));return d}
        function Vb(a,b,c,d){void 0===d&&(d=0);for(var e in c){var m=a,n=+e+d,p=b,v=c[e];if(void 0!==v)for(var w=+e+d;w<=n;w++)void 0!==m.Eh[w]?ra("Output port 0x"+da(w,4)+" registered by "+m.Eh[w][0].id+", ignoring "+p.id):m.Eh[w]=[p,v,!1,!1]}}function Wb(a,b,c,d){a=a.Eh[b];void 0!==a&&a[1]&&a[1].call(a[0],b,c,d)}function Kb(a,b,c){ra("Memory block error ("+a+","+da(b)+","+da(c)+")");return!1}var Xb;
        if(bb){var Yb=new ArrayBuffer(2);(new DataView(Yb)).setUint16(0,256,!0);Xb=256===(new Uint16Array(Yb))[0]}else Xb=!1;var Zb=Xb;
        function r(a,b,c,d,e,m){this.id=$b+=2;this.ba=null;this.offset=0;this.Bg=a;this.qg=b;this.size=c||0;this.type=d||ac;this.ki=d==bc;this.W=null;this.U=m;this.Ka=this.Pm=!1;cc(this);if(c)if(e)this.W=e,a=e.cn(a),this.ba=a[0],this.offset=a[1],this.md(e.Ak());else if(bb)this.buffer=new ArrayBuffer(c),this.se=new DataView(this.buffer,0,c),this.Nb=new Uint8Array(this.buffer,0,c),this.Jh=new Uint16Array(this.buffer,0,c>>1),this.ba=new Int32Array(this.buffer,0,c>>2),this.md(Zb?dc:ec);else{this.ba=Array(c>>
        2);for(e=0;e<this.ba.length;e++)this.ba[e]=0;this.md(fc)}else this.md()}var ac=0,bc=2,gc="NONE RAM ROM VIDEO H/W UNPAGED PAGED".split(" "),hc=["black","blue","green","cyan"],$b=0;function ic(a){bb&&!Zb&&(a=a<<24|a<<8&16711680|a>>8&65280|a>>>24);return a}
        r.prototype={constructor:r,parent:null,clone:function(a,b){this.id=a.id|1;this.qg=a.qg;this.size=a.size;b&&(this.type=b,this.ki=b==bc);bb?(this.buffer=a.buffer,this.se=a.se,this.Nb=a.Nb,this.Jh=a.Jh,this.ba=a.ba,this.md(Zb?dc:ec)):(this.ba=a.ba,this.md(fc))},save:function(){var a,b;if(this.W)a=null;else if(bb)for(a=Array(this.size>>2),b=0;b<a.length;b++)a[b]=this.se.getInt32(b<<2,!0);else a=this.ba;return a},restore:function(a){if(this.W)return null==a;if(a&&this.size==a.length<<2){var b;if(bb)for(b=
        0;b<a.length;b++)this.se.setInt32(b<<2,a[b],!0);else this.ba=a;return this.Ka=!0}return!1},md:function(a){a||(a=5==this.type?jc:6==this.type?kc:lc);var b=a;this.xc=b[0]||this.Cn;this.xj=b[1]||this.Dn;this.yc=b[2]||this.lr;this.wj=b[0]||this.Cn;this.rr=b[1]||this.Dn;this.Cc=!this.ki&&a[3]||this.Un;this.Oj=!this.ki&&a[4]||this.Vn;this.Se=!this.ki&&a[5]||this.Jr;this.fm=a[3]||this.Un;this.Pr=a[4]||this.Vn},Cn:function(){return 255},Un:function(){},Dn:function(a,b){return this.xc(a,b)|this.xc(a+1,b)<<
        8},lr:function(a,b){return this.xc(a,b)|this.xc(a+1,b)<<8|this.xc(a+2,b)<<16|this.xc(a+3,b)<<24},Vn:function(a,b){this.Cc(a,b&255);this.Cc(a+1,b>>8)},Jr:function(a,b){this.Cc(a,b&255);this.Cc(a+1,b>>8&255);this.Cc(a+2,b>>16&255);this.Cc(a+3,b>>>24)},hr:function(a){return this.ba[a>>2]>>>((a&3)<<3)&255},tr:function(a){var b=a>>2;a=(a&3)<<3;var c=this.ba[b]>>a;return 24>a?c&65535:c&255|(this.ba[b+1]&255)<<8},nr:function(a){var b=a>>2;a=(a&3)<<3;var c=this.ba[b];a&&(c=c>>>a|this.ba[b+1]<<32-a);return c},
        Fr:function(a,b){var c=a>>2,d=(a&3)<<3;this.ba[c]=this.ba[c]&~(255<<d)|b<<d;this.Ka=!0},Rr:function(a,b){var c=a>>2,d=(a&3)<<3;24>d?this.ba[c]=this.ba[c]&~(65535<<d)|b<<d:(this.ba[c]=this.ba[c]&16777215|b<<24,c++,this.ba[c]=this.ba[c]&-256|b>>8);this.Ka=!0},Lr:function(a,b){var c=a>>2,d=(a&3)<<3;if(d){var e=-1<<d;this.ba[c]=this.ba[c]&~e|b<<d;c++;this.ba[c]=this.ba[c]&e|b>>>32-d}else this.ba[c]=b;this.Ka=!0},ir:function(a,b){this.Sc.ba[this.Yc]|=this.Od;this.Tc.ba[this.Zc]|=this.Od;return this.Kf.xc(a,
        b)},ur:function(a,b){this.Sc.ba[this.Yc]|=this.Od;this.Tc.ba[this.Zc]|=this.Od;return this.Kf.xj(a,b)},or:function(a,b){this.Sc.ba[this.Yc]|=this.Od;this.Tc.ba[this.Zc]|=this.Od;return this.Kf.yc(a,b)},Gr:function(a,b,c){this.Sc.ba[this.Yc]|=this.Od;this.Tc.ba[this.Zc]|=this.ck;this.Kf.Cc(a,b,c)},Sr:function(a,b,c){this.Sc.ba[this.Yc]|=this.Od;this.Tc.ba[this.Zc]|=this.ck;this.Kf.Oj(a,b,c)},Mr:function(a,b,c){this.Sc.ba[this.Yc]|=this.Od;this.Tc.ba[this.Zc]|=this.ck;this.Kf.Se(a,b,c)},jr:function(a,
        b){return(mc(this.U,b,!1)||this).xc(a,b)},vr:function(a,b){return(mc(this.U,b,!1)||this).xj(a,b)},pr:function(a,b){return(mc(this.U,b,!1)||this).yc(a,b)},Hr:function(a,b,c){(mc(this.U,c,!0)||this).Cc(a,b,c)},Tr:function(a,b,c){(mc(this.U,c,!0)||this).Oj(a,b,c)},Nr:function(a,b,c){(mc(this.U,c,!0)||this).Se(a,b,c)},fr:function(a){return this.Nb[a]},gr:function(a){return this.Nb[a]},qr:function(a){return this.se.getUint16(a,!0)},sr:function(a){return a&1?this.Nb[a]|this.Nb[a+1]<<8:this.Jh[a>>1]},kr:function(a){return this.se.getInt32(a,
        !0)},mr:function(a){return a&3?this.Nb[a]|this.Nb[a+1]<<8|this.Nb[a+2]<<16|this.Nb[a+3]<<24:this.ba[a>>2]},Dr:function(a,b){this.Nb[a]=b;this.Ka=!0},Er:function(a,b){this.Nb[a]=b;this.Ka=!0},Or:function(a,b){this.se.setUint16(a,b,!0);this.Ka=!0},Qr:function(a,b){a&1?(this.Nb[a]=b,this.Nb[a+1]=b>>8):this.Jh[a>>1]=b;this.Ka=!0},Ir:function(a,b){this.se.setInt32(a,b,!0);this.Ka=!0},Kr:function(a,b){a&3?(this.Nb[a]=b,this.Nb[a+1]=b>>8,this.Nb[a+2]=b>>16,this.Nb[a+3]=b>>24):this.ba[a>>2]=b;this.Ka=!0}};
        function cc(a,b,c,d,e,m){a.Kf=b;a.Sc=c;a.Yc=d>>2;a.Tc=e;a.Zc=m>>2;a.ck=b?ic(nc|oc):0;a.Od=b?ic(nc):0}var lc=[],fc=[r.prototype.hr,r.prototype.tr,r.prototype.nr,r.prototype.Fr,r.prototype.Rr,r.prototype.Lr],kc=[r.prototype.ir,r.prototype.ur,r.prototype.or,r.prototype.Gr,r.prototype.Sr,r.prototype.Mr],jc=[r.prototype.jr,r.prototype.vr,r.prototype.pr,r.prototype.Hr,r.prototype.Tr,r.prototype.Nr];
        if(bb)var ec=[r.prototype.fr,r.prototype.qr,r.prototype.kr,r.prototype.Dr,r.prototype.Or,r.prototype.Ir],dc=[r.prototype.gr,r.prototype.sr,r.prototype.mr,r.prototype.Er,r.prototype.Qr,r.prototype.Kr];
        function pc(a,b){Ia.call(this,"CPU",a,pc);var c=a.cycles||b,d=a.multiplier||1;this.R={};this.R.Bd=c;this.R.Ce=d;this.R.qi=Math.round(this.R.Bd/1E4)/100;this.R.nf=this.R.qi*this.R.Ce;this.ha.Qb=!1;this.ha.Xm=!1;this.ha.pk=a.autoStart;this.ha.Qm=!1;c=La.autostart;void 0!==c&&(this.ha.pk="true"==c?!0:"false"==c?!1:null);this.ha.fi=!1;this.R.ui=this.R.Zf=0;this.R.xi=a.csStart;this.R.Xg=a.csInterval;this.R.Yg=a.csStop;this.ed=[];var e=this;this.dq=function(){rc(e)};Za(this)}Qa(pc);f=pc.prototype;
        f.Lc=function(a,b,c,d){this.la=b;this.Ra=d;this.za=a;for(b=null;b=gb(a,"Video",b);)this.ed.push(b);this.fa=gb(a,"ChipSet");Za(this)};f.reset=function(){};f.save=function(){return null};f.restore=function(){return!1};f.gc=function(a,b){if(!b){if(a&&this.restore){sc(this);if(!this.restore(a))return!1;tc(this)}else this.reset();this.pc("No debugger detected")}uc(this);this.de();return!0};f.fc=function(a){return a&&this.save?this.save():!0};
        function vc(a){(!0===a.ha.pk||null===a.ha.pk&&void 0===a.qa.run)&&rc(a)}f.bn=function(){return 0};function tc(a){void 0===a.R.xi&&(a.R.xi=0);void 0===a.R.Xg&&(a.R.Xg=-1);void 0===a.R.Yg&&(a.R.Yg=-1);a.ha.fi=0<=a.R.xi&&0<a.R.Xg;a.ha.fi&&(a.R.ui=0,a.R.Zf=a.R.xi-a.rf)}f.de=function(){this.za&&this.za.ae&&this.za.ae.de()};
        function uc(a){for(var b=0;b<a.ed.length;b++)wc(a.ed[b]);if(a.za&&a.za.ae&&(a=a.za.ae,a.zo)){lb(a,18,a.Ig,a.ko,a.canvas.style.color);if(a.ft){var b=a.la,c=a.Xa,d,e;null==d&&(d=0);null==e&&(e=b.Xj-d|0);null==c&&(c={gk:0,Pd:0,Rj:[]});var m=d>>>b.Aa;d=d+e-1>>>b.Aa;c.gk=0;for(c.Pd=0;m<=d;)e=b.ka[m],c.gk+=e.size,e.size&&(c.Rj.push(na(jb,m,0,0,e.type)),c.Pd++),m++;a.Xa=c;a.Bn=a.Xa.Pd*a.la.ob/691200;b=0;a.Xa.Fm=0;a.Xa.zg||(a.Xa.zg=[]);c=-1;d=0;var n=-1;for(e=0;e<a.Xa.Pd;e++){var p=a.Xa.Rj[e],m=oa(jb.type,
        p),p=oa(jb.yn,p);if(m!=c||p!=n+1)(n=e-d)&&(b+=Bb(a,d,n,c)),c=m,d=e;n=p}b+=Bb(a,d,e-d,c);c=a.Xa.io!=b;a.Xa.io=b;if(c){c=new eb(0,0,a.Ig.width,a.Ig.height);a.Xa.Ff=[];d=a.Xa.Pd;for(b=0;b<a.Xa.Fm;b++)e=a.Xa.zg[b].Pd,a.Xa.Ff.push(fb(c,e,d,!b)),d-=e;for(b=0;b<a.Xa.Ff.length;b++)c=a.Xa.zg[b],d=e=a.Xa.Ff[b],m=a.ko,(n=hc[c.type])||(n=new db),m.strokeStyle="black",m.strokeRect(d.x,d.y,d.Kc,d.Vc),m.fillStyle="string"==typeof n?n:n.toString(),m.fillRect(d.x,d.y,d.Kc,d.Vc),d=a,m=e,d.oi=d.$m,d.Wf=d.dn,e=m.x+(m.Kc>>
        1),n=m.y+(m.Vc>>1),p=m.Vc,m.Kc<m.Vc&&(p=m.Kc,d.Ym=!0,d.wd.save(),d.wd.translate(e,n),d.wd.rotate(-Math.PI/2),e=n=0),p<d.Wf&&(d.Wf=p,d.oi=d.Wf+"px Monaco, Lucida Console, Courier New"),m=n,d.cd=e,d.Cf=m,d=a,c=gc[c.type]+" ("+(c.Pd*a.la.ob/1024|0)+"Kb)",d.wd.font=d.oi,d.cd-=d.wd.measureText(c).width>>1,d.Cf+=(d.Wf>>1)-2,k(d,c),d.Ym&&(d.wd.restore(),d.Ym=!1)}}else k(a,"This space intentionally left blank");a.$h.drawImage(a.Ig,0,0,a.Ig.width,a.Ig.height,a.At,a.Dt,a.Ys,a.at);a.zo=!1}}
        f.Jd=function(){this.ed.length&&this.ed[0].Jd()};
        f.Lb=function(a,b,c){var d=this;a=!1;switch(b){case "run":this.qa[b]=c;c.onclick=function(){var a;if(a=d.za)if(a=d.za,a.ha.dc)a=!0;else{var b=null,c,p=Ra(a.id);for(c=0;c<p.length&&(b=p[c],b===a||b.ha.Sf);c++);if(c==p.length)for(c=0;c<p.length&&(b=p[c],b===a||b.ha.dc);c++);c==p.length&&(b=a);ra("The "+b.type+" component ("+b.id+") is not "+(b.ha.Sf?"powered yet":"ready yet"+(b.ni?" (waiting for notification)":""))+".");a=!1}a&&(d.ha.Qb?xc(d,!0):rc(d,!0))};a=!0;break;case "reset":this.qa[b]=c;c.onclick=
        function(){d.za&&yc(d.za)};a=!0;break;case "speed":this.qa[b]=c;a=!0;break;case "setSpeed":this.qa[b]=c,c.onclick=function(){zc(d,d.R.Ce<<1,!0)},c.textContent=this.R.nf.toFixed(2)+"Mhz",a=!0}return a};function Ac(a,b){if(a.ha.Qb){var c=a.A-b;a.A-=c;a.Ad-=c}}function Bc(a,b,c){a.rf+=b;c&&(a.Ad=a.A=0)}
        function Cc(a,b){var c=30;60>c&&(c=60);2>c&&(c=2);var d=1;b&&1<a.R.Ce&&a.R.ze&&(d=a.R.ze/a.R.qi);a.R.ln=Math.round(1E3/30);a.R.Tp=Math.floor(a.R.Bd/c*d);a.R.Jk=Math.floor(a.R.Bd/30*d);a.R.qn=Math.floor(a.R.Bd/60*d);a.R.pn=Math.floor(a.R.Bd/2*d);b||(a.R.ah=a.R.Jk,a.R.$g=a.R.qn,a.R.Zg=a.R.pn);a.R.Kk=0}function Dc(a,b){var c=a.rf+a.Ge+a.Ad-a.A;b&&1<a.R.Ce&&a.R.ze>a.R.qi&&(c=Math.round(c/a.R.Ce));return c}function sc(a){a.R.ze=0;a.rf=a.Ge=a.Ad=a.A=0;tc(a);zc(a,1)}
        function ob(a){return a.ha.Qb&&a.R.ze?a.R.ze.toFixed(2)+"Mhz":"Stopped"}function zc(a,b,c){if(void 0!==b){.8>a.R.ze/a.R.nf&&(b=1);a.R.Ce=b;b=a.R.qi*a.R.Ce;if(a.R.nf!=b){a.R.nf=b;b=a.R.nf.toFixed(2)+"Mhz";var d=a.qa.setSpeed;d&&(d.textContent=b);a.pc("target speed: "+b)}c&&a.Jd()}Bc(a,a.Ge);a.Ge=0;a.R.Yf=ka();a.R.of=0;Cc(a)}
        function rc(a,b){if(Ya(a,!0)){if(!a.ha.Qb){zc(a);a.za&&a.za.start(a.R.Yf,Dc(a));a.ha.Qb=!0;a.ha.Xm=!0;a.fa&&Ec(a.fa);var c=a.qa.run;c&&(c.textContent="Halt");a.de(!0);b&&a.Jd()}a.R.Kk>=a.R.Bd&&Cc(a,!0);a.R.bh=0;a.R.ri=ka();a.R.of&&(c=a.R.ri-a.R.of,c>a.R.ln&&(a.R.Yf+=c,a.R.Yf>a.R.ri&&(a.R.Yf=a.R.ri)));try{do{var d=a.ha.fi?1:a.R.Tp;if(a.fa){Fc(a.fa);var e=a.fa,c=d,m=e.Vb[0];if(m.kf){var n=(Dc(e.U,e.ue)-m.Yd)/e.qj|0,p=Gc(e,0)-n;6==m.mode&&(p-=n);var v=p*e.qj|0;6==m.mode&&(v>>=1);c>v&&(c=v)}var d=c,w=
        a.fa,c=d;if(w.ea&&w.ea[11]&64){var G=w.eg-Dc(w.U,w.ue);0<G&&c>G&&(c=G)}d=c}a.Qn(d);var N=a.Ad-a.A;a.Ge+=N;a.R.bh+=N;Bc(a,0,!0);var c=a,L=N;if(c.ha.fi){var U=!1;c.R.ui=c.R.ui+c.bn()|0;c.R.Zf-=L;0>=c.R.Zf&&(c.R.Zf+=c.R.Xg,U=!0);0<=c.R.Yg&&c.R.Yg<=Dc(c)&&(c.R.Xg=c.R.Yg=-1,tc(c),xc(c),U=!0);U&&c.pc(Dc(c)+" cycles: checksum="+da(c.R.ui))}a.R.$g-=N;0>=a.R.$g&&(a.R.$g+=a.R.qn,uc(a));a.R.Zg-=N;0>=a.R.Zg&&(a.R.Zg+=a.R.pn,a.de());a.R.ah-=N;if(0>=a.R.ah){a.R.ah+=a.R.Jk;break}}while(a.ha.Qb)}catch(W){xc(a);uc(a);
        a.de();a.za&&a.za.stop(ka(),Dc(a));Ya(a,!1);ab(a,W.stack||W.message);return}d=setTimeout;e=a.dq;a.R.of=ka();m=a.R.ln;a.R.bh&&(m=Math.round(m*a.R.bh/a.R.Jk));m-=a.R.of-a.R.ri;if(n=a.R.of-a.R.Yf)a.R.ze=Math.round(a.Ge/(10*n))/100,864E5<=n&&(a.rf=0,a.fa&&Fc(a.fa,!0),zc(a));if(0>m||a.R.ze<a.R.nf)m=0;a.R.Kk+=a.R.bh;a.R.of+=m;d(e,m)}else uc(a),a.de(),a.za&&a.za.stop(ka(),Dc(a))}f.Qn=function(){return 0};
        function xc(a,b){a.ha.Wc&&(a.ha.qk=!0);a.Ad-=a.A;a.A=0;Bc(a,a.Ge);a.Ge=0;if(a.ha.Qb){a.ha.Qb=!1;a.fa&&Ec(a.fa);var c=a.qa.run;c&&(c.textContent="Run")}a.ha.Qg=b}var qb=80386,h=-1,Ab=1,zb=4,yb=16,xb=64,wb=128,vb=256,ub=512,tb=1024,sb=2048,oc=64,nc=32,Hc=vb|ub|tb,Ic=Ab|zb|yb|xb|wb|sb,Jc=Ab|zb|yb|xb|wb;
        function Kc(a,b,c,d){this.U=a;this.Ra=a.Ra;this.id=b;this.Hj=c||"";this.sa=0;this.Ib=65535;this.Ie=this.Ib+1;this.Ja=this.uc=this.bi=this.Ob=this.type=this.xa=0;this.od=h;this.ja=this.Ld=2;this.C=this.T=65535;this.xm=this.id==Mc?Array(32):[];this.rk=null;this.mi=!1;Nc(this,!0,d)}var Mc=1;f=Kc.prototype;f.Lp=function(a){this.sa=a&65535;return this.xa=this.sa<<4};
        f.Kp=function(a,b){var c,d,e=this.U;a&=65535;a&4?(c=e.Ne.xa,d=c+e.Ne.Ib|0):(c=e.pd,d=e.If);if(!b||c){c=c+(a&65528)|0;if(d-c|0)return b||(e.A-=15),Oc(this,c,a,b);b||Pc.call(e,13,a)}return h};f.Jp=function(a){var b=this.U;a=b.qd+(a<<2);var c=b.na(a);b.ca&=~(vb|ub);return this.load(b.na(a+2))+c|0};f.Ip=function(a){var b=this.U;a<<=3;var c=b.qd+a|0;if(7<=(b.Ve-c|0))return Oc(this,c,a)+b.Vl;Pc.call(b,13,a|3,!0);return h};f.eo=function(a){return this.xa+a|0};f.ho=function(a){return this.xa+a|0};
        f.Im=function(a,b,c){return(a>>>0)+b<=this.Ie?this.xa+a|0:this.Xh(0,0,c)};f.co=function(a,b,c){return(a>>>0)+b>this.Ie?this.xa+a|0:this.Xh(0,0,c)};f.Xh=function(a,b,c){c||Pc.call(this.U,13,0);return h};f.Jm=function(a,b,c){return(a>>>0)+b<=this.Ie?this.xa+a|0:this.Yh(0,0,c)};f.fo=function(a,b,c){return(a>>>0)+b>this.Ie?this.xa+a|0:this.Yh(0,0,c)};f.Yh=function(a,b,c){c||Pc.call(this.U,13,0);return h};
        function Qc(a,b,c){var d=a.U,e=d.na(b+2),m=d.na(b)|(e&255)<<16,d=d.na(b+4);a.sa=c;a.xa=m;a.Ib=d;a.Ie=(d>>>0)+1;a.Ob=e;a.type=e&7936;a.bi=0;a.od=b;Nc(a,!0)}
        function Oc(a,b,c,d){var e=a.U,m=e.na(b+0),n=e.na(b+4),p=n&7936,v=e.na(b+2)|(n&255)<<16,w=e.na(b+6),G=c&65528;e.ma>=qb&&(v|=(w&65280)<<16,m|=(w&15)<<16,w&128&&(m=m<<12|4095));for(;;){var N,L,U;if(a.id==Mc){a.mi=!1;N=a.rk;var W,za;U=c&3;var ga=(n&24576)>>13;if(G&&!(n&32768)){d||Pc.call(e,11,c);v=h;break}if(6144<=p){U=c&3;if(U>a.Ja){if(!1!==N&&!(ga==a.Ja||p&1024&&ga<=a.Ja)){v=h;break}G=e.Fa();Rc(e,e.Fa(),!0);t(e,G);a.mi=!0}W=!1}else{if(256==p){if(!Sc(a,c,N)){v=h;break}return a.xa}if(1024==p)W=!0,za=
        -1,L=c,U<a.Ja&&(U=a.Ja);else if(1536==p)W=!0,za=~(16384|vb|ub),L=c|1;else if(1792==p)W=!0,za=~(16384|vb),L=c|1;else if(1280==p){if(!Sc(a,v&65535,N)){v=h;break}return a.xa}}if(W){b=v&65535;if(U<=ga){d=a.Ja;if(a.load(b,!0)===h){v=h;break}e.Vl=m;if(a.Ja<d){if(!0!==N){v=h;break}G=q(e);m=0;for(n&=31;n--;)a.xm[m++]=Tc(e,e.ra,G),G+=2;n=e.hb.xa;N=(a.Ja<<2)+2;d=N+2;U=e.ra.sa;L=q(e);Rc(e,e.na(n+d),!0);t(e,e.na(n+N));u(e,U);for(u(e,L);m;)u(e,a.xm[--m]);a.mi=!0}e.ca&=za;return a.xa}d||Pc.call(e,13,L,!0);v=h;
        break}else if(!1!==W){d||Pc.call(e,13,c,!0);v=h;break}}else if(2==a.id){if(G){if(!(n&32768)){d||Pc.call(e,11,c);v=h;break}if(4096>p||2048==(p&2560)){d||Pc.call(e,13,c,!!n);v=h;break}}}else if(3==a.id){if(!(n&32768)){d||Pc.call(e,12,c);v=h;break}if(!G||4096>p||512!=(p&2560)){d||Pc.call(e,13,c,!0);v=h;break}}else if(4==a.id){if(!G||256!=p&&768!=p){d||Pc.call(e,10,c,!0);v=h;break}}else if(6==a.id&&!(p&4096)&&768<p){v=h;break}a.sa=c;a.xa=v;a.Ib=m;a.Ie=(m>>>0)+1;a.Ob=n;a.type=p;a.bi=w;a.od=b;Nc(a,!0);
        break}return v}
        function Sc(a,b,c){var d=a.U,e=d.hb.xa,m=a.Ja,n=d.hb.sa;if(!c){if(768!=d.hb.type)return Pc.call(d,10,b,!0),!1;d.Eb(d.hb.od+4,d.hb.Ob&-769|256)}if(d.hb.load(b)===h)return!1;var p=d.hb.xa;if(!1===c){if(768!=d.hb.type)return Pc.call(d,13,b,!0),!1}else{if(768==d.hb.type)return Pc.call(d,13,b,!0),!1;d.Eb(d.hb.od+4,d.hb.Ob|=768);d.hb.type=768}d.Eb(e+14,l(d));d.Eb(e+16,rb(d));d.Eb(e+18,d.F);d.Eb(e+20,d.G);d.Eb(e+22,d.H);d.Eb(e+24,d.D);d.Eb(e+26,q(d));d.Eb(e+28,d.L);d.Eb(e+30,d.K);d.Eb(e+32,d.J);d.Eb(e+34,
        d.Qa.sa);d.Eb(e+36,d.oa.sa);d.Eb(e+38,d.ra.sa);d.Eb(e+40,d.kb.sa);d.Ne.load(d.na(p+42));Uc(d,d.na(p+16)|(c?16384:0));d.F=d.na(p+18);d.G=d.na(p+20);d.H=d.na(p+22);d.D=d.na(p+24);d.L=d.na(p+28);d.K=d.na(p+30);d.J=d.na(p+32);d.Qa.load(d.na(p+34));d.kb.load(d.na(p+40));Vc(d,d.na(p+14),d.na(p+36));b=38;e=26;a.Ja<m&&(e=(a.Ja<<2)+2,b=e+2);Rc(d,d.na(p+b),!0);t(d,d.na(p+e));c&&d.Eb(p+0,n);d.zb|=8;return!0}
        f.save=function(){return[this.sa,this.xa,this.Ib,this.Ob,this.id,this.Hj,this.Ja,this.uc,this.od,this.Ld,this.T,this.ja,this.C,this.type,this.Ie]};f.restore=function(a){"number"==typeof a?this.load(a):(this.sa=a[0],this.xa=a[1],this.Ib=a[2],this.Ob=a[3],this.id=a[4],this.Hj=a[5],this.Ja=a[6],this.uc=a[7],this.od=a[8],this.Ld=a[9]||2,this.T=a[10]||65535,this.ja=a[11]||2,this.C=a[12]||65535,this.type=a[13]||this.Ob&7936,this.Ie=a[14]||(this.Ib>>>0)+1)};
        function Nc(a,b,c){void 0===c&&(c=!!(a.U.zb&1));a.Qf=!1;if(c){a.load=a.Kp;a.jn=a.Ip;a.qc=a.Im;a.lc=a.Jm;if(!(a.sa&-4))a.qc=a.Xh,a.lc=a.Yh;else if(a.type&4096){6144==(a.type&6656)&&(a.qc=a.Xh);if(a.type&2048||!(a.type&512))a.lc=a.Yh;1024==(a.type&3072)&&(a.qc==a.Im&&(a.qc=a.co),a.lc==a.Jm&&(a.lc=a.fo),a.Qf=!0)}b&&(a.sa&-4&&a.od!==h&&(b=a.od+5,a.U.Oe(b,a.U.wc(b)|1)),a.Ja=a.sa&3,a.uc=(a.Ob&24576)>>13,a.U.ma<qb||!(a.bi&64)?(a.ja=2,a.C=65535):(a.ja=4,a.C=-1),a.Ld=a.ja,a.T=a.C)}else a.load=a.Lp,a.jn=a.Jp,
        a.qc=a.eo,a.lc=a.ho,a.Ja=a.uc=0,a.od=h}
        function Wc(a){this.ma=a.model||8088;var b=0;switch(this.ma){default:b=4772727;break;case 80286:b=6E6;break;case qb:b=16E6}pc.call(this,a,b);this.lm=61442;this.zh=Hc;this.yh=4;this.ub=255;this.B=this.ma==qb?Xc:80286==this.ma?Yc:Zc;this.Ia=$c;this.pm=ad;this.qm=bd;this.rm=cd;if(80186<=this.ma&&(this.Ia=$c.slice(),this.pm=ad.slice(),this.qm=bd.slice(),this.ub=31,this.Ia[15]=dd,this.Ia[96]=ed,this.Ia[97]=fd,this.Ia[98]=gd,this.Ia[99]=dd,this.Ia[100]=dd,this.Ia[101]=dd,this.Ia[102]=dd,this.Ia[103]=dd,
        this.Ia[104]=hd,this.Ia[105]=id,this.Ia[106]=jd,this.Ia[107]=kd,this.Ia[108]=ld,this.Ia[109]=md,this.Ia[110]=nd,this.Ia[111]=od,this.Ia[192]=pd,this.Ia[193]=qd,this.Ia[200]=rd,this.Ia[201]=sd,this.Ia[241]=td,this.pm[7]=ud,this.qm[7]=ud,80286<=this.ma)){this.lm=2;this.zh|=28672;this.yh=0;this.Ia[15]=vd;this.yg=wd.slice();for(a=0;a<this.yg.length;a++)this.yg[a]||(this.yg[a]=xd);this.Ia[84]=yd;this.Ia[99]=zd;if(this.ma>=qb){var c;this.Ia[100]=Ad;this.Ia[101]=Bd;this.Ia[102]=Cd;this.Ia[103]=Dd;for(c in x)this.yg[+c]=
        x[c]}}this.Ch=[];this.nm=[];this.Ad=this.Uh=0;this.ha.Qg=this.ha.vo=!1;this.Em=0;this.Te=this.ka=[];this.Aa=this.ob=this.Ea=this.Xd=this.$c=this.xb=this.$d=0;Ed(this)}Qa(Wc,pc);
        var Zc={kh:4,N:5,aa:6,Y:7,Z:8,I:9,O:11,P:12,Ee:4,Mk:60,Nk:83,Sb:3,tb:9,ec:16,hh:1,Uk:19,Wk:28,Yk:16,Xk:21,Vk:37,Sk:2,Gi:9,Tk:5,Rk:33,Ii:10,Hi:8,ag:3,$f:15,ll:51,ml:1,nl:2,ol:4,kl:32,Ji:15,ql:15,Ba:16,Ca:4,sl:11,rl:18,pl:24,Cb:4,tl:2,pf:16,ul:17,Oi:18,vl:19,Ni:5,Pi:6,Al:2,zl:8,xl:9,yl:10,wl:10,Qi:10,Ri:10,$k:80,bl:144,Zk:86,al:154,dl:101,fl:165,cl:107,el:171,Cl:70,El:113,Bl:76,Dl:124,hl:80,jl:128,gl:86,il:134,cg:3,bg:16,Yi:10,Xi:8,Fl:51,Tb:8,Gl:17,Hl:36,mc:11,Il:16,Fe:10,Mc:2,Di:18,Ei:7,Fi:15,Ki:12,
        Li:7,Mi:11,Si:18,Ti:7,Ui:15,Zi:15,$i:7,aj:13,gj:11,hj:7,ij:8,Jl:8,Ml:12,Kl:18,Ll:17,Nl:15,cj:8,bj:20,dj:2,lj:3,dg:9,kj:5,jj:11,nj:4,mj:17,Ol:11},Yc={kh:0,N:0,aa:0,Y:0,Z:0,I:0,O:1,P:1,Ee:3,Mk:14,Nk:16,Sb:2,tb:7,ec:7,hh:0,Uk:7,Wk:13,Yk:7,Xk:11,Vk:16,Sk:3,Gi:6,Tk:2,Rk:13,Ii:5,Hi:5,ag:2,$f:7,ll:23,ml:0,nl:1,ol:3,kl:17,Ji:7,ql:11,Ba:7,Ca:3,sl:7,rl:11,pl:15,Cb:2,tl:3,pf:7,ul:8,Oi:8,vl:8,Ni:4,Pi:4,Al:2,zl:3,xl:5,yl:2,wl:3,Qi:5,Ri:3,$k:14,bl:22,Zk:17,al:25,dl:17,fl:25,cl:20,el:28,Cl:13,El:21,Bl:16,Dl:24,
        hl:13,jl:21,gl:16,il:24,cg:2,bg:7,Yi:5,Xi:5,Fl:19,Tb:5,Gl:5,Hl:17,mc:3,Il:5,Fe:3,Mc:0,Di:8,Ei:5,Fi:9,Ki:5,Li:5,Mi:4,Si:5,Ti:5,Ui:4,Zi:7,$i:5,aj:8,gj:3,hj:4,ij:3,Jl:11,Ml:11,Kl:15,Ll:15,Nl:7,cj:5,bj:8,dj:0,lj:2,dg:6,kj:3,jj:6,nj:3,mj:5,Ol:5},Xc={kh:0,N:0,aa:0,Y:0,Z:0,I:0,O:1,P:1,Ee:3,Mk:14,Nk:16,Sb:2,tb:7,ec:7,hh:0,Uk:7,Wk:13,Yk:7,Xk:11,Vk:16,Sk:3,Gi:6,Tk:2,Rk:13,Ii:5,Hi:5,ag:2,$f:7,ll:23,ml:0,nl:1,ol:3,kl:17,Ji:7,ql:11,Ba:7,Ca:3,sl:7,rl:11,pl:15,Cb:2,tl:3,pf:7,ul:8,Oi:8,vl:8,Ni:4,Pi:4,Al:2,zl:3,xl:5,
        yl:2,wl:3,Qi:5,Ri:3,$k:14,bl:22,Zk:17,al:25,dl:17,fl:25,cl:20,el:28,Cl:13,El:21,Bl:16,Dl:24,hl:13,jl:21,gl:16,il:24,cg:2,bg:7,Yi:5,Xi:5,Fl:19,Tb:5,Gl:5,Hl:17,mc:3,Il:5,Fe:3,Mc:0,Di:8,Ei:5,Fi:9,Ki:5,Li:5,Mi:4,Si:5,Ti:5,Ui:4,Zi:7,$i:5,aj:8,gj:3,hj:4,ij:3,Jl:11,Ml:11,Kl:15,Ll:15,Nl:7,cj:5,bj:8,dj:0,lj:2,dg:6,kj:3,jj:6,nj:3,mj:5,Ol:5,un:11,Qk:6,Ok:8,Pk:5,Yp:3,Wp:6,Xp:6,wn:9,vn:12,Wi:3,Vi:6,$p:4,Zp:5,fj:3,ej:7};f=Wc.prototype;
        f.Dk=function(a,b){this.ka=this.Te=a;this.Aa=b;this.ob=1<<this.Aa;this.Ea=this.ob-1;this.Xd=a.length;this.$c=this.Xd-1};function Fd(a){if(a.ka===a.Te){a.ka=Array(a.Xd);a.dk=new r(null,0,0,5,null,a);for(var b=0;b<a.Xd;b++)a.ka[b]=a.dk}else for(b=0;b<a.Ah.length;b++)a.ka[a.Ah[b]]=a.dk;a.Ah=[]}
        function mc(a,b,c,d){var e=(b&-4194304)>>>20,m=a.Te[(a.gg+e&a.xb)>>>a.Aa],n=m.yc(e);if(!(n&1))return d||Gd.call(a,b,!1,c),null;if(!(n&4)&&3==a.oa.Ja)return d||Gd.call(a,b,!0,c),null;var p=(b&4190208)>>>10,n=a.Te[((n&-4096)+p&a.xb)>>>a.Aa],v=n.yc(p);if(!(v&1||d))return d||Gd.call(a,b,!1,c),null;if(!(v&4)&&3==a.oa.Ja)return d||Gd.call(a,b,!0,c),null;c=a.Te[((v&-4096)+(b&4095)&a.xb)>>>a.Aa];if(d)return c;d=new r(b&-4096,0,0,6);cc(d,c,m,e,n,p);b>>>=a.Aa;a.ka[b]=d;a.Ah.push(b);return d}
        f.reset=function(){this.ha.Qb&&xc(this);Ed(this);sc(this);this.ha.yd=!1};
        function Ed(a){a.F=0;a.D=0;a.G=0;a.H=0;a.Fd=0;a.L=0;a.K=0;a.J=0;a.Pb=!1;a.gb=a.$b=0;a.ld=0;a.Oh=0;a.zb=65520;a.qd=0;a.Ve=1023;a.ca=a.Ci=0;a.ng=a.uh=a.mg=a.og=0;a.zi=-1;a.oa=new Kc(a,Mc,"CS");a.kb=new Kc(a,2,"DS");a.Qa=new Kc(a,2,"ES");a.ra=new Kc(a,3,"SS");t(a,0);Rc(a,0);a.ma>=qb&&(a.H=772,a.zb=16,a.yj=0,a.nh=0,a.gg=0,a.tm=Array(8),a.um=Array(8),a.Hd=new Kc(a,2,"FS"),a.Id=new Kc(a,2,"GS"));a.On=new Kc(a,0,"NULL");a.da=a.kb;a.ga=a.ra;a.Q=a.va=0;a.V=a.Ga=h;a.lb=0;Vc(a,0,65535);if(80286<=a.ma){a.pd=
        0;a.If=65535;a.Ne=new Kc(a,5,"LDT",!0);a.hb=new Kc(a,4,"TSS",!0);a.Kb=new Kc(a,6,"VER",!0);Vc(a,65520,61440);var b,c=l(a);b=a.oa;var d=-65536;b.U.ma<qb&&(d&=16777215);b=b.xa=d;a.pa=b+c|0;a.rh=b+a.oa.Ib|0}Uc(a,0);Jd(a)}function Kd(a){2==a.Ld?(a.an=a.na,a.Gc=y,a.Oc=Ld,a.ie=Md,a.Ha=z,a.vb=Nd,a.Fc=Od):(a.an=a.Tg,a.Gc=A,a.Oc=Pd,a.ie=Qd,a.Ha=B,a.vb=Rd,a.Fc=Sd)}function Td(a,b){a.ja!=b&&(a.va|=4096,a.ja=b,a.C=2==b?65535:-1,Ud(a))}
        function Ud(a){2==a.ja?(a.dataType=32768,a.we=a.na,a.wf=a.Eb):(a.dataType=-2147483648,a.we=a.Tg,a.wf=a.Kj)}function Vd(a){a.Ld=a.oa.Ld;a.T=a.oa.T;Kd(a);a.ja=a.oa.ja;a.C=a.oa.C;Ud(a);a.va&=-12289}f.bn=function(){var a=this.F+this.D+this.G+this.H+q(this)+this.L+this.K+this.J|0;return a=a+l(this)+this.oa.sa+this.kb.sa+this.ra.sa+this.Qa.sa+rb(this)|0};function Wd(a,b,c,d){void 0!==d&&(void 0===a.Ch[b]&&(a.Ch[b]=[]),a.Ch[b].push([c,d]))}
        function Xd(a,b){var c=a.nm[b];null!=c&&(c(--a.Uh),delete a.nm[b])}function Jd(a,b){void 0===b&&(b=!!(a.zb&1));a.rm=b?Yd:cd;Nc(a.oa);Nc(a.kb);Nc(a.ra);Nc(a.Qa);a.ma>=qb&&(Nc(a.Hd),Nc(a.Id),Vd(a))}
        f.save=function(){var a=new Zd(this);a.set(0,[this.F,this.D,this.G,this.H,q(this),this.L,this.K,this.J]);var b=l(this),c=this.oa.save(),d=this.kb.save(),e=this.ra.save(),m=this.Qa.save(),n;null!=this.pd?(n=[this.zb,this.pd,this.If,this.qd,this.Ve,this.Ne.save(),this.hb.save(),this.Ci],n.push(this.yj),n.push(this.nh),n.push(this.gg),n.push(this.tm),n.push(this.um)):n=null;b=[b,c,d,e,m,n,rb(this)];this.ma>=qb&&(b.push(this.Hd.save()),b.push(this.Id.save()));a.set(1,b);a.set(2,[this.da.Hj,this.ga.Hj,
        this.Q,this.va,this.lb,this.V,this.Ga]);a.set(3,[0,this.rf,this.R.Ce]);a.set(4,Qb(this.la));return a.data()};
        f.restore=function(a){var b=a[0];this.F=b[0];this.D=b[1];this.G=b[2];this.H=b[3];var c=b[4];this.L=b[5];this.K=b[6];this.J=b[7];b=a[1];this.oa.restore(b[1]);this.kb.restore(b[2]);this.ra.restore(b[3]);this.Qa.restore(b[4]);var d=b[5];d&&d.length&&(this.zb=d[0],this.pd=d[1],this.If=d[2],this.qd=d[3],this.Ve=d[4],this.Ne.restore(d[5]),this.hb.restore(d[6]),this.Ci=d[7],this.ma>=qb&&(this.yj=d[8],this.nh=d[9],this.gg=d[10],this.tm=d[11],this.um=d[12]),Jd(this));Uc(this,b[6]);Vc(this,b[0],this.oa.sa);
        t(this,c);Rc(this,this.ra.sa);this.ma>=qb&&(this.Hd.restore(b[7]),this.Id.restore(b[8]));b=a[2];this.da=null!=b[0]&&$d(this,b[0])||this.kb;this.ga=null!=b[1]&&$d(this,b[1])||this.ra;this.Q=b[2];this.va=b[3];this.lb=b[4];this.V=b[5];this.Ga=b[6];b=a[3];this.rf=b[1];zc(this,b[2]);a:{b=this.la;a=a[4];for(c=0;c<a.length-1;c+=2){var d=a[c],e=a[c+1];if(e&&e.length<b.nn){for(var m=0,n=Array(b.nn),p=0;p<e.length-1;)for(var v=e[p++],w=e[p++];v--;)n[m++]=w;e=n}m=b.ka[d];if(!m||!m.restore(e)){ra("Unable to restore memory block "+
        d);b=!1;break a}}void 0!==a[c]&&Ib(b,a[c]);b=!0}return b};function $d(a,b){switch(b){case "CS":return a.oa;case "DS":return a.kb;case "SS":return a.ra;case "ES":return a.Qa;case "NULL":return a.On;default:return[0,b,0,0,""]}}function ae(a,b){var c=l(a);a.pa=a.oa.load(b)+c|0;a.rh=a.oa.xa+a.oa.Ib|0;Vd(a);a.Q|=a.yh}function be(a,b){a.kb.load(b);a.Q|=a.yh}
        function Rc(a,b,c){var d=q(a);a.Bc=a.ra.load(b)+d|0;a.ra.Qf?(a.Wl=a.ra.xa+a.ra.T|0,a.Xl=a.ra.xa+a.ra.Ib|0):(a.Wl=a.ra.xa+a.ra.Ib|0,a.Xl=a.ra.xa);c||(a.Q|=4)}function ce(a,b){a.Qa.load(b);a.Q|=a.yh}function l(a){return a.pa-a.oa.xa|0}function C(a,b){a.pa=a.oa.xa+(b&a.C)|0}function Vc(a,b,c,d){a.oa.rk=d;a.Vl=b;b=a.oa.load(c);return b!==h?(a.pa=b+(a.Vl&a.C)|0,a.rh=b+a.oa.Ib|0,Vd(a),a.oa.mi):null}
        function de(a,b){a.pa=a.pa+b|0;var c=a.rh-a.pa|0;0>c&&0<=(a.rh^a.pa)&&(8088>=a.ma||a.oa.Ib==a.oa.T?C(a,a.pa-a.oa.xa):-1>c&&Pc.call(a,13,0))}function q(a){return a.Fd&~a.ra.T|a.Bc-a.ra.xa}function t(a,b){a.Fd=b;a.Bc=a.ra.xa+(b&a.ra.T)|0}function ee(a,b,c,d,e,m){if(63!=(e&63)&&e!=a.resultType){var n=(e^a.resultType)&a.resultType;n&&(n&1&&fe(a),n&2&&ge(a),n&4&&he(a),n&8&&ie(a),n&16&&je(a),n&32&&ke(a))}m?(a.ng=d,a.mg=b):(a.ng=b,a.mg=d);a.uh=c;a.og=d;a.resultType=e}
        function D(a,b,c,d,e){a.resultType=c|26;a.og=b;d?le(a):me(a);e?ne(a):oe(a);return b}function pe(a,b,c,d){c&d?le(a):me(a);(b^c)&d?ne(a):oe(a)}function qe(a){return fe(a)?1:0}function fe(a){a.resultType&1&&(a.ca&=~Ab,(a.ng^(a.ng^a.uh)&(a.uh^a.mg))&a.resultType&-2147450752&&(a.ca|=Ab),a.resultType&=-2);return a.ca&Ab}function ge(a){a.resultType&2&&(a.ca&=~zb,38505>>((a.og^a.og>>4)&15)&1&&(a.ca|=zb),a.resultType&=-3);return a.ca&zb}
        function he(a){a.resultType&4&&(a.ca&=~yb,(a.mg^a.ng^a.uh)&16&&(a.ca|=yb),a.resultType&=-5);return a.ca&yb}function ie(a){a.resultType&8&&(a.ca&=~xb,a.og&((a.resultType&-2147450752)-1|a.resultType&-2147450752)||(a.ca|=xb),a.resultType&=-9);return a.ca&xb}function je(a){a.resultType&16&&(a.ca&=~wb,a.og&a.resultType&-2147450752&&(a.ca|=wb),a.resultType&=-17);return a.ca&wb}
        function ke(a){a.resultType&32&&(a.ca&=~sb,(a.ng^a.mg)&(a.uh^a.mg)&a.resultType&-2147450752&&(a.ca|=sb),a.resultType&=-33);return a.ca&sb}function me(a){a.resultType&=-2;a.ca&=~Ab}function re(a){a.resultType&=-5;a.ca&=~yb}function se(a){a.resultType&=-9;a.ca&=~xb}function oe(a){a.resultType&=-33;a.ca&=~sb}function le(a){a.resultType&=-2;a.ca|=Ab}function te(a){a.resultType&=-5;a.ca|=yb}function ue(a){a.resultType&=-9;a.ca|=xb}function ne(a){a.resultType&=-33;a.ca|=sb}
        function rb(a){return a.ca&~Ic|fe(a)|ge(a)|he(a)|ie(a)|je(a)|ke(a)}function ve(a,b){b=b|a.zb&1|65520;a.zb=a.zb&-65536|b&65535;a.zb&1&&Jd(a,!0)}function Uc(a,b,c){a.zb&1||(b&=-61441);void 0===c&&(c=a.oa.Ja);c?b=b&-12289|a.ca&12288:a.Ci=(b&12288)>>12;c>a.Ci&&(b=b&~ub|a.ca&ub);a.resultType=128;a.ca=a.ca&~(a.zh|Ic)|b&(a.zh|Ic)|a.lm;a.ca&vb&&(a.lb|=2,a.Q|=4)}
        f.Lb=function(a,b,c){var d=!1;switch(b){case "EAX":case "EBX":case "ECX":case "EDX":case "ESP":case "EBP":case "ESI":case "EDI":case "EIP":case "AX":case "BX":case "CX":case "DX":case "SP":case "BP":case "SI":case "DI":case "IP":case "PC":case "CS":case "DS":case "SS":case "ES":case "PS":case "C":case "P":case "A":case "Z":case "S":case "T":case "I":case "D":case "V":this.qa[b]=c;this.Em++;d=!0;break;default:d=this.parent.Lb.call(this,a,b,c)}return d};
        f.wc=function(a){return this.ka[(a&this.$d)>>>this.Aa].xc(a&this.Ea,a)};f.na=function(a){var b=a&this.Ea,c=(a&this.$d)>>>this.Aa;this.A-=this.B.kh;return b<this.Ea?this.ka[c].xj(b,a):this.ka[c].xc(b,a)|this.ka[c+1&this.$c].xc(0,a+1)<<8};f.Tg=function(a){var b=a&this.Ea,c=(a&this.$d)>>>this.Aa;if(b<this.Ea-2)return this.ka[c].yc(b,a);var d=(b&3)<<3;return this.ka[c].yc(b&-4,a)>>>d|this.ka[c+1&this.$c].yc(0,a+3)<<32-d};f.Oe=function(a,b){this.ka[(a&this.$d)>>>this.Aa].Cc(a&this.Ea,b&255,a)};
        f.Eb=function(a,b){var c=a&this.Ea,d=(a&this.$d)>>>this.Aa;this.A-=this.B.kh;c<this.Ea?this.ka[d].Oj(c,b&65535,a):(this.ka[d++].Cc(c,b&255,a),this.ka[d&this.$c].Cc(0,b>>8&255,a+1))};f.Kj=function(a,b){var c=a&this.Ea,d=(a&this.$d)>>>this.Aa;this.A-=this.B.kh;if(c<this.Ea-2)this.ka[d].Se(c,b,a);else{var e,m=(c&3)<<3,c=c&-4;e=this.ka[d].yc(c,a);this.ka[d].Se(c,e&~(-1<<m)|b<<m,a);d=d+1&this.$c;a+=3;e=this.ka[d].yc(0,a);this.ka[d].Se(0,e&-1<<m|b>>>32-m,a)}};
        function we(a,b,c){a.xh=b;a.V=b.qc(a.mh=c,1);return a.Q&1?0:a.wc(a.V)}function E(a,b){return we(a,a.da,b&a.T)}function F(a,b){return we(a,a.ga,b&a.T)}function xe(a,b,c){a.xh=b;a.V=b.qc(a.mh=c,a.ja);return a.Q&1?0:a.we(a.V)}function H(a,b){return xe(a,a.da,b&a.T)}function I(a,b){return xe(a,a.ga,b&a.T)}function ye(a,b,c){a.xh=b;a.Ga=a.V=b.qc(a.mh=c,1);return a.Q&1?0:a.wc(a.V)}function J(a,b){return ye(a,a.da,b&a.T)}function K(a,b){return ye(a,a.ga,b&a.T)}
        function ze(a,b,c){a.xh=b;a.Ga=a.V=b.qc(a.mh=c,a.ja);return a.Q&1?0:a.we(a.V)}function M(a,b){return ze(a,a.da,b&a.T)}function O(a,b){return ze(a,a.ga,b&a.T)}function P(a,b){a.Q&2||a.Oe(a.xh.lc(a.mh,1),b)}function Q(a,b){a.Q&2||a.wf(a.xh.lc(a.mh,a.ja),b)}function Tc(a,b,c){return a.we(b.qc(c,a.ja))}f.S=function(){var a=this.wc(this.pa);de(this,1);return a};function Ae(a){var b=a.na(a.pa);de(a,2);return b}function R(a){var b=a.an(a.pa);de(a,a.Ld);return b}
        f.ia=function(){var a=this.we(this.pa);de(this,this.ja);return a};f.M=function(){var a=this.wc(this.pa)<<24>>24;de(this,1);return a};function S(a,b){var c=a.wc(a.pa);de(a,1);return Be[c].call(a,b)}f.Fa=function(){var a=this.we(this.Bc);this.Bc=this.Bc+this.ja|0;var b=this.Wl-this.Bc|0;0>b&&0<=(this.Wl^this.Bc)&&(8088>=this.ma||!this.ra.Qf&&this.ra.Ib==this.ra.T||this.ra.Qf&&!this.ra.Ib?t(this,this.Bc-this.ra.xa&this.ra.T):-1>b&&Pc.call(this,12,0));return a};
        function u(a,b){a.Bc=a.Bc-a.ja|0;0>(a.Bc-a.Xl|0)&&0<=(a.Xl^a.Bc)&&(8088>=a.ma||!a.ra.Qf&&a.ra.Ib==a.ra.T||a.ra.Qf&&!a.ra.Ib?t(a,a.Bc-a.ra.xa&a.ra.T):Pc.call(a,12,0));a.wf(a.Bc,b)}function Ce(a,b,c){var d=4;1==b.length&&(d=1,c=c?1:0);if(80386>a.ma)2<b.length&&(b=b.substr(1,2));else if("PS"==b||2<b.length)d=8;a.qa[b]&&(void 0===c&&(ab(a,"Value for "+b+" is invalid"),xc(a)),d=!a.ha.Qb||a.ha.Qm?da(c,d):"--------".substr(0,d),a.qa[b].textContent!=d&&(a.qa[b].textContent=d))}
        f.de=function(a){if(this.Em&&(a||!this.ha.Qb||this.ha.Qm)){Ce(this,"EAX",this.F);Ce(this,"EBX",this.D);Ce(this,"ECX",this.G);Ce(this,"EDX",this.H);Ce(this,"ESP",q(this));Ce(this,"EBP",this.L);Ce(this,"ESI",this.K);Ce(this,"EDI",this.J);Ce(this,"CS",this.oa.sa);Ce(this,"DS",this.kb.sa);Ce(this,"SS",this.ra.sa);Ce(this,"ES",this.Qa.sa);Ce(this,"EIP",l(this));var b=rb(this);Ce(this,"PS",b);Ce(this,"V",b&sb);Ce(this,"D",b&tb);Ce(this,"I",b&ub);Ce(this,"T",b&vb);Ce(this,"S",b&wb);Ce(this,"Z",b&xb);Ce(this,
        "A",b&yb);Ce(this,"P",b&zb);Ce(this,"C",b&Ab)}if(b=this.qa.speed)b.textContent=ob(this);this.parent.de.call(this,a)};
        f.Qn=function(a){this.ha.Qg=!0;this.ha.vo=!1;this.ha.Xm=!1;this.Ad=this.A=a;this.fa&&!a&&Fc(this.fa);a||(this.Q|=4);do{if(a=this.Q&12528)this.va|=a;else if(this.Jb=this.pa,this.da=this.kb,this.ga=this.ra,this.V=this.Ga=h,this.va&12288&&Vd(this),this.va=this.Q&256,this.lb){a:{if(!(this.Q&4)){a=80286>this.ma?0:1;for(var b=0;2>b;b++){switch(a){case 0:if(this.lb&1&&this.ca&ub){var c=De(this.fa);if(-1<=c&&(this.lb&=-2,0<=c)){this.lb&=-5;Ee.call(this,c,null,11);break a}}break;case 1:if(this.lb&2){this.lb&=
        -3;Ee.call(this,1,null,11);break a}}a=1-a}}if(a=this.lb&8){a=this.fa;b=!1;for(c=0;c<a.$a;c++)for(var d=a.$a[c],e=0;e<d.Fb.length;e++){var m=d.Fb[e];m.Wd||(Fe(a,m),m.Wd||(b=!0))}a=!b}a&&(this.lb&=-9)}if(this.lb&4){this.Q=this.A=0;break}}this.Q=0;this.Ia[this.S()].call(this)}while(0<this.A);return this.ha.Qg?this.Ad-this.A:void 0===this.ha.Qg?0:-1};Ea(function(){for(var a=Xa(window.document,"pcjs","cpu"),b=0;b<a.length;b++){var c=a[b],d=Ua(c),d=new Wc(d);Wa(d,c)}});
        function Ge(a,b){var c=a+b+qe(this)|0;ee(this,a,b,c,191);this.A-=this.Ga===h?this.V===h?this.B.Sb:this.B.tb:this.B.ec;return c&255}function He(a,b){var c=a+b+qe(this)|0;ee(this,a,b,c,this.dataType|63);this.A-=this.Ga===h?this.V===h?this.B.Sb:this.B.tb:this.B.ec;return c&this.C}function Ie(a,b){var c=a+b|0;ee(this,a,b,c,191);this.A-=this.Ga===h?this.V===h?this.B.Sb:this.B.tb:this.B.ec;return c&255}
        function Je(a,b){var c=a+b|0;ee(this,a,b,c,this.dataType|63);this.A-=this.Ga===h?this.V===h?this.B.Sb:this.B.tb:this.B.ec;return c&this.C}function Ke(a,b){var c=a&b;D(this,c,128);this.A-=this.Ga===h?this.V===h?this.B.Sb:this.B.tb:this.B.ec;return c}function Le(a,b){this.A-=this.Ga===h?this.V===h?this.B.Sb:this.B.tb:this.B.ec;return D(this,a&b,this.dataType)}function Me(a,b){this.A-=10+(this.V===h?0:1);if((a&3)<(b&3))return a=a&-4|b&3,ue(this),a;se(this);return a}
        function Ne(a){if(this.V===h)return dd.call(this),a;var b=a,c=this.we(this.V),d=this.we(this.V+this.ja);2==this.ja&&(b=a<<16>>16,c=c<<16>>16,d=d<<16>>16);this.A-=this.B.Rk;if(b<c||b>d)C(this,this.Jb-this.oa.xa),Ee.call(this,5,null,0);this.Q|=2;return a}function Oe(a,b){var c=0;if(b){se(this);for(var d=1;d&this.C;){if(b&d){a=c;break}d<<=1;c++}}else ue(this);this.A-=this.B.un+3*c;return a}
        function Pe(a,b){var c=0;if(b){se(this);for(var d=2==this.ja?15:31,e=1<<d;e;){if(b&e){a=d;break}e>>>=1;c++;d--}}else ue(this);this.A-=this.B.un+3*c;return a}function Qe(a,b){a&1<<(b&31)?le(this):me(this);this.A-=this.V===h?this.B.Yp:this.B.Wp;this.Q|=2;return a}function Re(a,b){var c=1<<(b&31);a&c?le(this):me(this);this.A-=this.V===h?this.B.Qk:this.B.Ok;return a^c}function Ue(a,b){var c=1<<(b&31);a&c?le(this):me(this);this.A-=this.V===h?this.B.Qk:this.B.Ok;return a&~c}
        function Ve(a,b){var c=1<<(b&31);a&c?le(this):me(this);this.A-=this.V===h?this.B.Qk:this.B.Ok;return a|c}function We(a,b){var c=this.oa.sa,d=l(this);null!=Vc(this,a,b,!0)&&(u(this,c),u(this,d))}function Xe(a,b){ee(this,a,b,a-b|0,191,!0);this.A-=this.Ga===h?this.V===h?this.B.Sb:this.B.Gi:this.B.tb;this.Q|=2;return a}function Ye(a,b){ee(this,a,b,a-b|0,this.dataType|63,!0);this.A-=this.Ga===h?this.V===h?this.B.Sb:this.B.Gi:this.B.tb;this.Q|=2;return a}
        function Ze(a){var b=(a&this.C)-1|0;ee(this,a,1,b,32830,!0);this.A-=2;return a&~this.C|b&this.C}function $e(a,b){var c=a[1]-b[1];c||(c=a[0]-b[0]);return c}
        function af(a,b,c){this.Pb=!1;if((c>>>=0)&&!(c<=b>>>0)){var d=0,e=1;c=[c>>>0,0];for(a=[a>>>0,b>>>0];0<$e(a,c);){var m=b=c;b[0]+=m[0];b[1]+=m[1];4294967295<b[0]&&(b[0]>>>=0,b[1]++);e+=e}do 0<=$e(a,c)&&(b=a,m=c,b[0]-=m[0],b[1]-=m[1],0>b[0]&&(b[0]>>>=0,b[1]--),d+=e),b=c,b[0]>>>=1,b[1]&1&&(b[0]=(b[0]|2147483648)>>>0),b[1]>>>=1,e>>>=1;while(e);this.gb=d;this.$b=a[0];this.Pb=!0}}function bf(a){return a}
        function cf(a,b){a=this.S();var c=(b<<16>>16)*(a<<24>>24)|0;32767<c||-32768>c?(le(this),ne(this)):(me(this),oe(this));this.A-=this.V===h?21:24;return c&65535}function df(a,b){var c,d;a=this.ia();2==this.ja?(d=(b<<16>>16)*(a<<16>>16)|0,c=32767<d||-32768>d):(d=b*a,c=2147483647<d||-2147483648>d);c?(le(this),ne(this)):(me(this),oe(this));d&=this.C;this.A-=this.V===h?21:24;return d}
        function ef(a,b){var c=(a<<16>>16)*(b<<16>>16)|0;32767<c||-32768>c?(le(this),ne(this)):(me(this),oe(this));this.A-=this.V===h?this.B.wn:this.B.vn;return c&65535}function ff(a,b){var c=a*b;2147483647<c||-2147483648>c?(le(this),ne(this)):(me(this),oe(this));this.A-=this.V===h?this.B.wn:this.B.vn;return c|0}function gf(a){var b=(a&this.C)+1|0;ee(this,a,1,b,32830);this.A-=2;return a&~this.C|b&this.C}
        function Ee(a,b,c){this.A-=this.B.ll+c;this.oa.rk=!0;c=rb(this);var d=this.oa.sa,e=l(this);a=this.oa.jn(a);a!==h&&(u(this,c),u(this,d),u(this,e),null!=b&&u(this,b),this.zi=-1,this.pa=a,this.rh=this.oa.xa+this.oa.Ib|0,Vd(this))}function hf(a,b){this.A-=14+(this.V===h?0:2);se(this);this.Kb.load(b,!0)!==h&&this.Kb.uc>=this.oa.Ja&&this.Kb.uc>=(b&3)&&(ue(this),a=this.Kb.Ob&-256,2<this.ja&&(a|=(this.Kb.bi&-65281)<<16));return a}
        function jf(a,b){if(this.V===h)return xd.call(this),a;be(this,this.na(this.V+this.ja));this.A-=this.B.pf;return b}function kf(a){if(this.V===h)return xd.call(this),a;this.A-=this.B.tl;return this.V}function lf(a,b){if(this.V===h)return xd.call(this),a;ce(this,this.na(this.V+this.ja));this.A-=this.B.pf;return b}function mf(a,b){if(this.V===h)return xd.call(this),a;var c=this.na(this.V+this.ja);this.Hd.load(c);this.A-=this.B.pf;return b}
        function nf(a,b){if(this.V===h)return xd.call(this),a;var c=this.na(this.V+this.ja);this.Id.load(c);this.A-=this.B.pf;return b}function of(a,b){this.A-=14+(this.V===h?0:2);if(b&65528&&this.Kb.load(b,!0)!==h&&(7168==(this.Kb.Ob&7168)||this.Kb.uc>=this.oa.Ja)&&this.Kb.uc>=(b&3))return ue(this),this.Kb.Ib;se(this);return a}function pf(a,b){if(this.V===h)return xd.call(this),a;Rc(this,this.na(this.V+this.ja));this.A-=this.B.pf;return b}
        function qf(a,b){this.A-=this.Ga===h?this.V===h?this.B.Al:this.B.zl:this.B.xl;return b}function rf(a,b){return b}function sf(){this.Ga!==h&&Td(this,2);return qf.call(this,0,this.ld)}function tf(a,b){var c=b&65535,d=b>>>16,e=a&65535,m=a>>>16,n=c*e,e=(n>>>16)+d*e,p=e>>>16,e=(e&65535)+c*m;this.Pb=!0;this.gb=e<<16|n&65535;this.$b=p+((e>>>16)+d*m)|0}function uf(a,b){this.A-=this.Ga===h?this.V===h?this.B.Sb:this.B.tb:this.B.ec;return D(this,a|b,128)}
        function vf(a,b){this.A-=this.Ga===h?this.V===h?this.B.Sb:this.B.tb:this.B.ec;return D(this,a|b,this.dataType)}function wf(a){var b=this.Fa(),c=this.Fa();(a<<=this.ja>>2)&&t(this,q(this)+a);Vc(this,b,c,!1)&&(a&&t(this,q(this)+a),this.kb.sa&65528&&this.kb.uc<this.oa.Ja&&7168!=(this.kb.Ob&7168)&&this.kb.load(0),this.Qa.sa&65528&&this.Qa.uc<this.oa.Ja&&7168!=(this.Qa.Ob&7168)&&this.Qa.load(0));2==a&&this.Uh&&Xd(this,this.pa)}
        function xf(a,b){var c=a-b-qe(this)|0;ee(this,a,b,c,191,!0);this.A-=this.Ga===h?this.V===h?this.B.Sb:this.B.tb:this.B.ec;return c&255}function yf(a,b){var c=a-b-qe(this)|0;ee(this,a,b,c,this.dataType|63,!0);this.A-=this.Ga===h?this.V===h?this.B.Sb:this.B.tb:this.B.ec;return c&this.C}function zf(a){this.Q|=1;this.Oc[this.S()].call(this,a);this.A-=this.V===h?this.B.$p:this.B.Zp}function Af(){return ke(this)?1:0}function Bf(){return fe(this)?1:0}function Cf(){return fe(this)?0:1}
        function Df(){return ie(this)?1:0}function Ef(){return ie(this)?0:1}function Ff(){return fe(this)||ie(this)?1:0}function Gf(){return fe(this)||ie(this)?0:1}function Hf(){return je(this)?1:0}function If(){return je(this)?0:1}function Jf(){return ge(this)?1:0}function Kf(){return ge(this)?0:1}function Lf(){return!je(this)!=!ke(this)?1:0}function Mf(){return!je(this)!=!ke(this)?0:1}function Nf(){return ie(this)||!je(this)!=!ke(this)?1:0}function Of(){return ie(this)||!je(this)!=!ke(this)?0:1}
        function Pf(a,b,c){if(c){16<c&&(a=b,c-=16);var d=a<<c-1;a=(d<<1|b>>16-c)&65535;D(this,a,32768,d&32768)}return a}function Qf(a,b,c){if(c){var d=a<<c-1;a=d<<1|b>>32-c;D(this,a,-2147483648,d&-2147483648)}return a}function Rf(a,b){return Pf.call(this,a,b,this.S())}function Sf(a,b){return Qf.call(this,a,b,this.S())}function Tf(a,b){return Pf.call(this,a,b,this.G&31)}function Uf(a,b){return Qf.call(this,a,b,this.G&31)}
        function Vf(a,b,c){if(c){16<c&&(a=b,c-=16);var d=a>>c-1;a=(d>>1|b<<16-c)&65535;D(this,a,32768,d&1)}return a}function Wf(a,b,c){if(c){var d=a>>c-1;a=d>>1|b<<32-c;D(this,a,-2147483648,d&1)}return a}function Xf(a,b){return Vf.call(this,a,b,this.S())}function Yf(a,b){return Wf.call(this,a,b,this.S())}function Zf(a,b){return Vf.call(this,a,b,this.G&31)}function $f(a,b){return Wf.call(this,a,b,this.G&31)}
        function ag(a,b){var c=a-b|0;ee(this,a,b,c,191,!0);this.A-=this.Ga===h?this.V===h?this.B.Sb:this.B.tb:this.B.ec;return c&255}function bg(a,b){var c=a-b|0;ee(this,a,b,c,this.dataType|63,!0);this.A-=this.Ga===h?this.V===h?this.B.Sb:this.B.tb:this.B.ec;return c&this.C}function cg(a,b){D(this,a&b,128);this.A-=this.Ga===h?this.V===h?this.B.lj:this.B.dg:this.B.dg;this.Q|=2;return a}function dg(a,b){D(this,a&b,32768);this.A-=this.Ga===h?this.V===h?this.B.lj:this.B.dg:this.B.dg;this.Q|=2;return a}
        function eg(a,b){if(this.V===h){switch(this.Oh&7){case 0:this.F=this.F&-256|a;break;case 1:this.G=this.G&-256|a;break;case 2:this.H=this.H&-256|a;break;case 3:this.D=this.D&-256|a;break;case 4:this.F=this.F&255|a<<8;break;case 5:this.G=this.G&255|a<<8;break;case 6:this.H=this.H&255|a<<8;break;case 7:this.D=this.D&255|a<<8}this.A-=this.B.nj}else this.Ga=this.V,P(this,a),this.A-=this.B.mj;return b}
        function fg(a,b){if(this.V===h){switch(this.Oh&7){case 0:this.F=a;break;case 1:this.G=a;break;case 2:this.H=a;break;case 3:this.D=a;break;case 4:t(this,a);break;case 5:this.L=a;break;case 6:this.K=a;break;case 7:this.J=a}this.A-=this.B.nj}else this.Ga=this.V,Q(this,a),this.A-=this.B.mj;return b}function gg(a,b){var c=a^b;D(this,c,128);this.A-=this.Ga===h?this.V===h?this.B.Sb:this.B.tb:this.B.ec;return c}
        function hg(a,b){this.A-=this.Ga===h?this.V===h?this.B.Sb:this.B.tb:this.B.ec;return D(this,a^b,this.dataType)}function ig(a){Pc.call(this,13,0);return a}function ud(a){dd.call(this);return a}function T(a){xd.call(this);return a}function jg(){C(this,this.Jb-this.oa.xa);Ee.call(this,0,null,2)}function kg(){this.A-=this.V===h?2:this.B.Nl;return 1}function lg(){var a=this.G&255;this.A-=(this.V===h?this.B.cj:this.B.bj)+(a<<this.B.dj);return a}
        function mg(){var a=this.S();this.A-=(this.V===h?this.B.cj:this.B.bj)+(a<<this.B.dj);return a}function ng(){return null}function Pc(a,b,c,d){if(this.ha.Qg){var e=!1;if(80186<=this.ma)if(0>this.zi)C(this,this.Jb-this.oa.xa),e=!0;else if(8!=this.zi)b=0,a=8,e=!0;else{og.call(this,-1,0,c);Ed(this);return}og.call(this,a,b,c)&&(e=!1);e&&Ee.call(this,this.zi=a,b,d||0);this.Q|=3}else this.oc("Fault "+ea(a)+" blocked by Debugger",1073741824),C(this,this.Jb-this.oa.xa)}
        function Gd(a,b,c){this.nh=a;a=0;b&&(a|=1);c&&(a|=2);3==this.oa.Ja&&(a|=4);Pc.call(this,14,a)}
        function og(a,b,c){var d=32,e;a:{e=this.pa;var m=this.ka[(e&this.$d)>>>this.Aa];if(5==m.type&&(m=mc(this,e,!1,!0),!m)){e=null;break a}e=m.wj(e&this.Ea,e)}204!=e||this.Ve||(c=!1,d|=1);983040<=this.pa&&1048575>=this.pa&&(c=!1);c&&(a=(c?"\n":"")+"Fault "+ea(a)+(null!=b?" (0x"+da(b,4)+")":"")+" on opcode "+ea(e)+" at "+this.Ra.it(l(this),this.oa.sa)+" (%"+da(this.pa,6)+")",b=this.ha.Qb,this.oc(a,d)?c&&(c=b,xc(this.Ra)):(this.wa(a),xc(this)));return c}function vd(){this.yg[this.S()].call(this)}
        function yd(){u(this,q(this)&this.C);this.A-=this.B.mc}function ed(){var a=q(this)&this.C;u(this,this.F&this.C);u(this,this.G&this.C);u(this,this.H&this.C);u(this,this.D&this.C);u(this,a);u(this,this.L&this.C);u(this,this.K&this.C);u(this,this.J&this.C);this.A-=this.B.Hl}
        function fd(){this.J=this.J&~this.C|this.Fa();this.K=this.K&~this.C|this.Fa();this.L=this.L&~this.C|this.Fa();t(this,q(this)+this.ja);this.D=this.D&~this.C|this.Fa();this.H=this.H&~this.C|this.Fa();this.G=this.G&~this.C|this.Fa();this.F=this.F&~this.C|this.Fa();this.A-=this.B.Fl}function gd(){this.Ha[this.S()].call(this,Ne)}function zd(){this.vb[this.S()].call(this,Me)}function Ad(){this.Q|=20;this.da=this.ga=this.Hd;this.A-=this.B.Mc;xc(this)}
        function Bd(){this.Q|=20;this.da=this.ga=this.Id;this.A-=this.B.Mc;xc(this)}function Cd(){this.Q|=4096;this.ja^=6;this.C^=-65536;Ud(this);this.A-=this.B.Mc}function Dd(){this.Q|=8192;this.Ld^=6;this.T^=-65536;Kd(this);this.A-=this.B.Mc}function hd(){u(this,this.ia());this.A-=this.B.mc}function id(){this.Ha[this.S()].call(this,df)}function jd(){u(this,this.S());this.A-=this.B.mc}function kd(){this.Ha[this.S()].call(this,cf)}
        function ld(){var a=1,b=0,c=5;this.va&192&&(a=this.G&this.T,b=1,this.va&256&&(c=4));if(a--){var d=Ub(this.la,this.H,this.pa-b-1);this.Oe(this.Qa.lc(this.J&this.T,1),d);this.J=this.J&~this.T|this.J+(this.ca&tb?-1:1)&this.T;this.A-=c;this.G=this.G&~this.T|this.G-b&this.T;a&&(this.pa=this.Jb,this.Q|=256)}}
        function md(){var a=1,b=0,c=5;this.va&192&&(a=this.G&this.T,b=1,this.va&256&&(c=4));if(a--){for(var d=this.pa-b-1,e=0,m=0,n=0;n<this.ja;n++)e|=Ub(this.la,this.H,d)<<m,m+=8;d=e;this.wf(this.Qa.lc(this.J&this.T,this.ja),d);this.J=this.J&~this.T|this.J+(this.ca&tb?-this.ja:this.ja)&this.T;this.A-=c;this.G=this.G&~this.T|this.G-b&this.T;a&&(this.pa=this.Jb,this.Q|=256)}}
        function nd(){var a=1,b=0,c=5;this.va&192&&(a=this.G&this.T,b=1,this.va&256&&(c=4));if(a--){var d=this.wc(this.kb.qc(this.K&this.T,1));this.K=this.K&~this.T|this.K+(this.ca&tb?-1:1)&this.T;this.A-=c;Wb(this.la,this.H,d,this.pa-b-1);this.G=this.G&~this.T|this.G-b&this.T;a&&(this.pa=this.Jb,this.Q|=256)}}
        function od(){var a=1,b=0,c=5;this.va&192&&(a=this.G&this.T,b=1,this.va&256&&(c=4));if(a--){var d=Tc(this,this.kb,this.K&this.T);this.K=this.K&~this.T|this.K+(this.ca&tb?-this.ja:this.ja)&this.T;this.A-=c;for(var c=this.pa-b-1,e=0,m=0;m<this.ja;m++)Wb(this.la,this.H,d>>e&255,c),e+=8;this.G=this.G&~this.T|this.G-b&this.T;a&&(this.pa=this.Jb,this.Q|=256)}}function pg(){var a=this.M();ke(this)?(C(this,l(this)+a),this.A-=this.B.Ba):this.A-=this.B.Ca}
        function qg(){var a=this.M();ke(this)?this.A-=this.B.Ca:(C(this,l(this)+a),this.A-=this.B.Ba)}function rg(){var a=this.M();fe(this)?(C(this,l(this)+a),this.A-=this.B.Ba):this.A-=this.B.Ca}function sg(){var a=this.M();fe(this)?this.A-=this.B.Ca:(C(this,l(this)+a),this.A-=this.B.Ba)}function tg(){var a=this.M();ie(this)?(C(this,l(this)+a),this.A-=this.B.Ba):this.A-=this.B.Ca}function ug(){var a=this.M();ie(this)?this.A-=this.B.Ca:(C(this,l(this)+a),this.A-=this.B.Ba)}
        function vg(){var a=this.M();fe(this)||ie(this)?(C(this,l(this)+a),this.A-=this.B.Ba):this.A-=this.B.Ca}function wg(){var a=this.M();fe(this)||ie(this)?this.A-=this.B.Ca:(C(this,l(this)+a),this.A-=this.B.Ba)}function xg(){var a=this.M();je(this)?(C(this,l(this)+a),this.A-=this.B.Ba):this.A-=this.B.Ca}function yg(){var a=this.M();je(this)?this.A-=this.B.Ca:(C(this,l(this)+a),this.A-=this.B.Ba)}function zg(){var a=this.M();ge(this)?(C(this,l(this)+a),this.A-=this.B.Ba):this.A-=this.B.Ca}
        function Ag(){var a=this.M();ge(this)?this.A-=this.B.Ca:(C(this,l(this)+a),this.A-=this.B.Ba)}function Bg(){var a=this.M();!je(this)!=!ke(this)?(C(this,l(this)+a),this.A-=this.B.Ba):this.A-=this.B.Ca}function Cg(){var a=this.M();!je(this)==!ke(this)?(C(this,l(this)+a),this.A-=this.B.Ba):this.A-=this.B.Ca}function Dg(){var a=this.M();ie(this)||!je(this)!=!ke(this)?(C(this,l(this)+a),this.A-=this.B.Ba):this.A-=this.B.Ca}
        function Eg(){var a=this.M();ie(this)||!je(this)!=!ke(this)?this.A-=this.B.Ca:(C(this,l(this)+a),this.A-=this.B.Ba)}function Fg(){this.ie[this.S()].call(this,Gg,this.S);this.A-=this.Ga===h?1:this.B.hh}function pd(){this.ie[this.S()].call(this,Hg,mg)}function qd(){this.Fc[this.S()].call(this,2==this.ja?Ig:Jg,mg)}function Kg(){var a=Ae(this)<<(this.ja>>2),b=this.Fa();C(this,b);a&&t(this,q(this)+a);this.A-=this.B.Ml}function Lg(){var a=this.Fa();C(this,a);this.A-=this.B.Jl}
        function rd(){var a=Ae(this),b=this.S()&31;this.A-=11;u(this,this.L);var c=q(this)&this.C;if(0<b){for(this.A-=(b<<2)+(1<b?1:0);--b;)this.L=this.L&~this.C|this.L-this.ja&this.C,u(this,Tc(this,this.ra,this.L&this.C));u(this,c)}this.L=this.L&~this.C|c;t(this,q(this)&~this.ra.T|q(this)-a&this.ra.T)}function sd(){t(this,q(this)&~this.ra.T|this.L&this.ra.T);this.L=this.L&~this.C|this.Fa()&this.C;this.A-=5}function Mg(){wf.call(this,Ae(this));this.A-=this.B.Ll}
        function Ng(){wf.call(this,0);this.A-=this.B.Kl}function Og(){this.Ha[this.S()].call(this,bf);this.A-=8}function Pg(){this.Q|=36;this.A-=this.B.Mc}function td(){xd.call(this)}function dd(){Pc.call(this,6);xc(this)}function xd(){C(this,this.Jb-this.oa.xa);ab(this,"Undefined opcode "+ea(Cb(this.la,this.pa))+" at "+("0x"+da(this.pa)));xc(this)}
        var $c=[function(){var a=this.S();this.Oc[a].call(this,Ie)},function(){this.vb[this.S()].call(this,Je)},function(){this.Gc[this.S()].call(this,Ie)},function(){this.Ha[this.S()].call(this,Je)},function(){this.F=this.F&-256|Ie.call(this,this.F&255,this.S());this.A--},function(){this.F=this.F&~this.C|Je.call(this,this.F&this.C,this.ia());this.A--},function(){u(this,this.Qa.sa);this.A-=this.B.Fe},function(){ce(this,this.Fa());this.A-=this.B.Tb},function(){this.Oc[this.S()].call(this,uf)},function(){this.vb[this.S()].call(this,
        vf)},function(){this.Gc[this.S()].call(this,uf)},function(){this.Ha[this.S()].call(this,vf)},function(){this.F=this.F&-256|uf.call(this,this.F&255,this.S());this.A--},function(){this.F=this.F&~this.C|vf.call(this,this.F&this.C,this.ia());this.A--},function(){u(this,this.oa.sa);this.A-=this.B.Fe},function(){ae(this,this.Fa());this.A-=this.B.Tb},function(){this.Oc[this.S()].call(this,Ge)},function(){this.vb[this.S()].call(this,He)},function(){this.Gc[this.S()].call(this,Ge)},function(){this.Ha[this.S()].call(this,
        He)},function(){this.F=this.F&-256|Ge.call(this,this.F&255,this.S());this.A--},function(){this.F=this.F&~this.C|He.call(this,this.F&this.C,this.ia());this.A--},function(){u(this,this.ra.sa);this.A-=this.B.Fe},function(){Rc(this,this.Fa());this.A-=this.B.Tb},function(){this.Oc[this.S()].call(this,xf)},function(){this.vb[this.S()].call(this,yf)},function(){this.Gc[this.S()].call(this,xf)},function(){this.Ha[this.S()].call(this,yf)},function(){this.F=this.F&-256|xf.call(this,this.F&255,this.S());this.A--},
        function(){this.F=this.F&~this.C|yf.call(this,this.F&this.C,this.ia());this.A--},function(){u(this,this.kb.sa);this.A-=this.B.Fe},function(){be(this,this.Fa());this.A-=this.B.Tb},function(){this.Oc[this.S()].call(this,Ke)},function(){this.vb[this.S()].call(this,Le)},function(){this.Gc[this.S()].call(this,Ke)},function(){this.Ha[this.S()].call(this,Le)},function(){this.F=this.F&-256|Ke.call(this,this.F&255,this.S());this.A--},function(){this.F=this.F&~this.C|Le.call(this,this.F&this.C,this.ia());this.A--},
        function(){this.Q|=20;this.da=this.ga=this.Qa;this.A-=this.B.Mc},function(){var a=this.F&255,b=he(this),c=fe(this);if(9<(a&15)||b)a+=6,b=yb;if(159<a||c)a+=96,c=Ab;a&=255;this.F=this.F&-256|a;D(this,a,128);c?le(this):me(this);b?te(this):re(this);this.A-=this.B.Ee},function(){this.Oc[this.S()].call(this,ag)},function(){this.vb[this.S()].call(this,bg)},function(){this.Gc[this.S()].call(this,ag)},function(){this.Ha[this.S()].call(this,bg)},function(){this.F=this.F&-256|ag.call(this,this.F&255,this.S());
        this.A--},function(){this.F=this.F&~this.C|bg.call(this,this.F&this.C,this.ia());this.A--},function(){this.Q|=20;this.da=this.ga=this.oa;this.A-=this.B.Mc},function(){var a=this.F&255,b=he(this),c=fe(this);if(9<(a&15)||b)a-=6,b=yb;if(159<a||c)a-=96,c=Ab;a&=255;this.F=this.F&-256|a;D(this,a,128);c?le(this):me(this);b?te(this):re(this);this.A-=this.B.Ee},function(){this.Oc[this.S()].call(this,gg)},function(){this.vb[this.S()].call(this,hg)},function(){this.Gc[this.S()].call(this,gg)},function(){this.Ha[this.S()].call(this,
        hg)},function(){this.F=this.F&-256|gg.call(this,this.F&255,this.S());this.A--},function(){this.F=this.F&~this.C|hg.call(this,this.F&this.C,this.ia());this.A--},function(){this.Q|=20;this.da=this.ga=this.ra;this.A-=this.B.Mc},function(){var a,b,c=this.F&255,d=this.F>>8&255;9<(c&15)||he(this)?(c=c+6&15,d=d+1&255,a=b=1):a=b=0;this.F=this.F&-65536|d<<8|c;a?le(this):me(this);b?te(this):re(this);this.A-=this.B.Ee},function(){this.Oc[this.S()].call(this,Xe)},function(){this.vb[this.S()].call(this,Ye)},function(){this.Gc[this.S()].call(this,
        Xe)},function(){this.Ha[this.S()].call(this,Ye)},function(){Xe.call(this,this.F&255,this.S());this.A--},function(){Ye.call(this,this.F&this.C,this.ia());this.A--},function(){this.Q|=20;this.da=this.ga=this.kb;this.A-=this.B.Mc},function(){var a,b,c=this.F&255,d=this.F>>8&255;9<(c&15)||he(this)?(c=c-6&15,d=d-1&255,a=b=1):a=b=0;this.F=this.F&-65536|d<<8|c;a?le(this):me(this);b?te(this):re(this);this.A-=this.B.Ee},function(){this.F=gf.call(this,this.F)},function(){this.G=gf.call(this,this.G)},function(){this.H=
        gf.call(this,this.H)},function(){this.D=gf.call(this,this.D)},function(){t(this,gf.call(this,q(this)))},function(){this.L=gf.call(this,this.L)},function(){this.K=gf.call(this,this.K)},function(){this.J=gf.call(this,this.J)},function(){this.F=Ze.call(this,this.F)},function(){this.G=Ze.call(this,this.G)},function(){this.H=Ze.call(this,this.H)},function(){this.D=Ze.call(this,this.D)},function(){t(this,Ze.call(this,q(this)))},function(){this.L=Ze.call(this,this.L)},function(){this.K=Ze.call(this,this.K)},
        function(){this.J=Ze.call(this,this.J)},function(){u(this,this.F&this.C);this.A-=this.B.mc},function(){u(this,this.G&this.C);this.A-=this.B.mc},function(){u(this,this.H&this.C);this.A-=this.B.mc},function(){u(this,this.D&this.C);this.A-=this.B.mc},function(){u(this,q(this)-2&65535);this.A-=this.B.mc},function(){u(this,this.L&this.C);this.A-=this.B.mc},function(){u(this,this.K&this.C);this.A-=this.B.mc},function(){u(this,this.J&this.C);this.A-=this.B.mc},function(){this.F=this.F&~this.C|this.Fa();
        this.A-=this.B.Tb},function(){this.G=this.G&~this.C|this.Fa();this.A-=this.B.Tb},function(){this.H=this.H&~this.C|this.Fa();this.A-=this.B.Tb},function(){this.D=this.D&~this.C|this.Fa();this.A-=this.B.Tb},function(){t(this,q(this)&~this.C|this.Fa());this.A-=this.B.Tb},function(){this.L=this.L&~this.C|this.Fa();this.A-=this.B.Tb},function(){this.K=this.K&~this.C|this.Fa();this.A-=this.B.Tb},function(){this.J=this.J&~this.C|this.Fa();this.A-=this.B.Tb},pg,qg,rg,sg,tg,ug,vg,wg,xg,yg,zg,Ag,Bg,Cg,Dg,Eg,
        pg,qg,rg,sg,tg,ug,vg,wg,xg,yg,zg,Ag,Bg,Cg,Dg,Eg,Fg,function(){this.Fc[this.S()].call(this,Qg,this.ia);this.A-=this.Ga===h?1:this.B.hh},Fg,function(){this.Fc[this.S()].call(this,Qg,this.M);this.A-=this.Ga===h?1:this.B.hh},function(){this.Oc[this.S()].call(this,cg)},function(){this.vb[this.S()].call(this,dg)},function(){this.Gc[this.Oh=this.S()].call(this,eg)},function(){this.Ha[this.Oh=this.S()].call(this,fg)},function(){this.Q|=1;this.Oc[this.S()].call(this,qf)},function(){this.Q|=1;this.vb[this.S()].call(this,
        qf)},function(){this.Gc[this.S()].call(this,qf)},function(){this.Ha[this.S()].call(this,qf)},function(){var a=this.S();switch((a&56)>>3){case 0:this.ld=this.Qa.sa;break;case 1:this.ld=this.oa.sa;break;case 2:this.ld=this.ra.sa;break;case 3:this.ld=this.kb.sa;break;case 4:if(this.ma>=qb){this.ld=this.Hd.sa;break}dd.call(this);break;case 5:if(this.ma>=qb){this.ld=this.Id.sa;break}default:dd.call(this)}this.Q|=1;this.vb[a].call(this,sf)},function(){this.Q|=1;this.da=this.ga=this.On;this.Ha[this.S()].call(this,
        kf)},function(){var a,b=this.S(),c=(b&56)>>3;switch(c){case 0:a=this.F;break;case 2:a=this.H;break;case 3:a=this.D;break;default:if(80286==this.ma||this.ma==qb&&4!=c&&5!=c){dd.call(this);return}switch(c){case 1:a=this.G;break;case 4:a=q(this);break;case 5:a=this.L;break;case 6:a=this.K;break;case 7:a=this.J}}this.Ha[b].call(this,qf);switch(c){case 0:ce(this,this.F);this.F=a;break;case 1:ae(this,this.G);this.G=a;break;case 2:Rc(this,this.H);this.H=a;break;case 3:be(this,this.D);this.D=a;break;case 4:this.ma>=
        qb?this.Hd.load(q(this)):ce(this,q(this));t(this,a);break;case 5:this.ma>=qb?this.Id.load(this.L):ae(this,this.L);this.L=a;break;case 6:Rc(this,this.K);this.K=a;break;case 7:be(this,this.J),this.J=a}},function(){this.Q|=1;this.Fc[this.S()].call(this,Rg,this.Fa)},function(){this.A-=3},function(){var a=this.F;this.F=this.F&~this.C|this.G&this.C;this.G=this.G&~this.C|a&this.C;this.A-=3},function(){var a=this.F;this.F=this.F&~this.C|this.H&this.C;this.H=this.H&~this.C|a&this.C;this.A-=3},function(){var a=
        this.F;this.F=this.F&~this.C|this.D&this.C;this.D=this.D&~this.C|a&this.C;this.A-=3},function(){var a=this.F,b=q(this);this.F=this.F&~this.C|b&this.C;t(this,b&~this.C|a&this.C);this.A-=3},function(){var a=this.F;this.F=this.F&~this.C|this.L&this.C;this.L=this.L&~this.C|a&this.C;this.A-=3},function(){var a=this.F;this.F=this.F&~this.C|this.K&this.C;this.K=this.K&~this.C|a&this.C;this.A-=3},function(){var a=this.F;this.F=this.F&~this.C|this.J&this.C;this.J=this.J&~this.C|a&this.C;this.A-=3},function(){this.F=
        2==this.ja?this.F&-65536|this.F<<24>>24&65535:this.F<<16>>16;this.A-=2},function(){this.H=2==this.ja?this.H&-65536|(this.F&32768?65535:0):this.F&-2147483648?-1:0;this.A-=this.B.Tk},function(){We.call(this,this.ia(),Ae(this));this.A-=this.B.Wk},function(){this.oc("WAIT not implemented");this.A--},function(){u(this,rb(this));this.A-=this.B.mc},function(){Uc(this,this.Fa());this.A-=this.B.Tb},function(){var a=this.F>>8&255;a&Ab?le(this):me(this);a&zb?(this.resultType&=-3,this.ca|=zb):(this.resultType&=
        -3,this.ca&=~zb);a&yb?te(this):re(this);a&xb?ue(this):se(this);a&wb?(this.resultType&=-17,this.ca|=wb):(this.resultType&=-17,this.ca&=~wb);this.A-=this.B.Cb},function(){this.F=this.F&-65281|(rb(this)&Jc)<<8;this.A-=this.B.Cb},function(){var a=this.F&-256,b;b=R(this);b=this.wc(this.da.qc(b,1));this.F=a|b;this.A-=this.B.Qi},function(){this.F=this.F&~this.C|Tc(this,this.da,R(this));this.A-=this.B.Qi},function(){var a=R(this),b=this.F;this.Oe(this.da.lc(a,1),b);this.A-=this.B.Ri},function(){var a=R(this),
        b=this.F;this.wf(this.da.lc(a,this.ja),b);this.A-=this.B.Ri},function(){var a=1,b=0,c=this.B.Si;this.va&192&&(a=this.G&this.T,b=1,c=this.B.Ui,this.va&256||(this.A-=this.B.Ti));if(a--){var d=this.ca&tb?-1:1,e=this.wc(this.da.qc(this.K,1));this.Oe(this.Qa.lc(this.J&this.T,1),e);this.K=this.K&~this.T|this.K+d&this.T;this.J=this.J&~this.T|this.J+d&this.T;this.A-=c;this.G=this.G&~this.T|this.G-b&this.T;a&&(this.pa=this.Jb,this.Q|=256)}},function(){var a=1,b=0,c=this.B.Si;this.va&192&&(a=this.G&this.T,
        b=1,c=this.B.Ui,this.va&256||(this.A-=this.B.Ti));if(a--){var d=this.ca&tb?-this.ja:this.ja,e=Tc(this,this.da,this.K);this.wf(this.Qa.lc(this.J&this.T,this.ja),e);this.K=this.K&~this.T|this.K+d&this.T;this.J=this.J&~this.T|this.J+d&this.T;this.A-=c;this.G=this.G&~this.T|this.G-b&this.T;a&&(this.pa=this.Jb,this.Q|=256)}},function(){var a=1,b=0,c=this.B.Di;this.va&192&&(a=this.G&this.T,b=1,c=this.B.Fi,this.va&256||(this.A-=this.B.Ei));if(a--){var d=this.ca&tb?-1:1,e=we(this,this.da,this.K&this.T),m=
        ye(this,this.Qa,this.J&this.T);Xe.call(this,e,m);this.K=this.K&~this.T|this.K+d&this.T;this.J=this.J&~this.T|this.J+d&this.T;this.A-=c-this.B.tb;this.G=this.G&~this.T|this.G-b&this.T;a&&ie(this)==(this.va&64)&&(this.pa=this.Jb,this.Q|=256)}},function(){var a=1,b=0,c=this.B.Di;this.va&192&&(a=this.G&this.T,b=1,c=this.B.Fi,this.va&256||(this.A-=this.B.Ei));if(a--){var d=this.ca&tb?-this.ja:this.ja,e=xe(this,this.da,this.K&this.T),m=ze(this,this.Qa,this.J&this.T);Ye.call(this,e,m);this.K=this.K&~this.T|
        this.K+d&this.T;this.J=this.J&~this.T|this.J+d&this.T;this.A-=c-this.B.tb;this.G=this.G&~this.T|this.G-b&this.T;a&&ie(this)==(this.va&64)&&(this.pa=this.Jb,this.Q|=256)}},function(){D(this,this.F&this.S(),128);this.A-=this.B.Ee},function(){D(this,this.F&this.ia(),this.dataType);this.A-=this.B.Ee},function(){var a=1,b=0,c=this.B.gj;this.va&192&&(a=this.G&this.T,b=1,c=this.B.ij,this.va&256||(this.A-=this.B.hj));if(a--){var d=this.F;this.Oe(this.Qa.lc(this.J&this.T,1),d);this.J=this.J&~this.T|this.J+
        (this.ca&tb?-1:1)&this.T;this.A-=c;this.G=this.G&~this.T|this.G-b&this.T;a&&(this.pa=this.Jb,this.Q|=256)}},function(){var a=1,b=0,c=this.B.gj;this.va&192&&(a=this.G&this.T,b=1,c=this.B.ij,this.va&256||(this.A-=this.B.hj));if(a--){var d=this.F;this.wf(this.Qa.lc(this.J&this.T,this.ja),d);this.J=this.J&~this.T|this.J+(this.ca&tb?-this.ja:this.ja)&this.T;this.A-=c;this.G=this.G&~this.T|this.G-b&this.T;a&&(this.pa=this.Jb,this.Q|=256)}},function(){var a=1,b=0,c=this.B.Ki;this.va&192&&(a=this.G&this.T,
        b=1,c=this.B.Mi,this.va&256||(this.A-=this.B.Li));a--&&(this.F=this.F&-256|this.wc(this.da.qc(this.K&this.T,1)),this.K=this.K&~this.T|this.K+(this.ca&tb?-1:1)&this.T,this.A-=c,this.G=this.G&~this.T|this.G-b&this.T,a&&(this.pa=this.Jb,this.Q|=256))},function(){var a=1,b=0,c=this.B.Ki;this.va&192&&(a=this.G&this.T,b=1,c=this.B.Mi,this.va&256||(this.A-=this.B.Li));a--&&(this.F=this.F&~this.C|Tc(this,this.da,this.K&this.T),this.K=this.K&~this.T|this.K+(this.ca&tb?-this.ja:this.ja)&this.T,this.A-=c,this.G=
        this.G&~this.T|this.G-b&this.T,a&&(this.pa=this.Jb,this.Q|=256))},function(){var a=1,b=0,c=this.B.Zi;this.va&192&&(a=this.G&this.T,b=1,c=this.B.aj,this.va&256||(this.A-=this.B.$i));a--&&(Xe.call(this,this.F&255,ye(this,this.Qa,this.J&this.T)),this.J=this.J&~this.T|this.J+(this.ca&tb?-1:1)&this.T,this.A-=c-this.B.tb,this.G=this.G&~this.T|this.G-b&this.T,a&&ie(this)==(this.va&64)&&(this.pa=this.Jb,this.Q|=256))},function(){var a=1,b=0,c=this.B.Zi;this.va&192&&(a=this.G&this.T,b=1,c=this.B.aj,this.va&
        256||(this.A-=this.B.$i));a--&&(Ye.call(this,this.F&this.C,ze(this,this.Qa,this.J&this.T)),this.J=this.J&~this.T|this.J+(this.ca&tb?-this.ja:this.ja)&this.T,this.A-=c-this.B.tb,this.G=this.G&~this.T|this.G-b&this.T,a&&ie(this)==(this.va&64)&&(this.pa=this.Jb,this.Q|=256))},function(){this.F=this.F&-256|this.S();this.A-=this.B.Cb},function(){this.G=this.G&-256|this.S();this.A-=this.B.Cb},function(){this.H=this.H&-256|this.S();this.A-=this.B.Cb},function(){this.D=this.D&-256|this.S();this.A-=this.B.Cb},
        function(){this.F=this.F&255|this.S()<<8;this.A-=this.B.Cb},function(){this.G=this.G&255|this.S()<<8;this.A-=this.B.Cb},function(){this.H=this.H&255|this.S()<<8;this.A-=this.B.Cb},function(){this.D=this.D&255|this.S()<<8;this.A-=this.B.Cb},function(){this.F=this.F&~this.C|this.ia();this.A-=this.B.Cb},function(){this.G=this.G&~this.C|this.ia();this.A-=this.B.Cb},function(){this.H=this.H&~this.C|this.ia();this.A-=this.B.Cb},function(){this.D=this.D&~this.C|this.ia();this.A-=this.B.Cb},function(){t(this,
        q(this)&~this.C|this.ia());this.A-=this.B.Cb},function(){this.L=this.L&~this.C|this.ia();this.A-=this.B.Cb},function(){this.K=this.K&~this.C|this.ia();this.A-=this.B.Cb},function(){this.J=this.J&~this.C|this.ia();this.A-=this.B.Cb},Kg,Lg,Kg,Lg,function(){this.Ha[this.S()].call(this,lf)},function(){this.Ha[this.S()].call(this,jf)},function(){this.Q|=1;this.ie[this.S()].call(this,Sg,this.S)},function(){this.Q|=1;this.Fc[this.S()].call(this,Sg,this.ia)},Mg,Ng,Mg,Ng,function(){Ee.call(this,3,null,this.B.ml)},
        function(){var a=this.S(),b;a:{b=this.Ch[a];if(void 0!==b)for(var c=0;c<b.length;c++)if(!b[c][1].call(b[c][0],this.pa)){b=!1;break a}b=!0}b?Ee.call(this,a,null,0):this.A--},function(){ke(this)?Ee.call(this,4,null,this.B.nl):this.A-=this.B.ol},function(){this.A-=this.B.kl;if(this.zb&1&&this.ca&16384){var a=this.na(this.hb.xa+0);Sc(this.oa,a,!1)}else{var a=this.oa.Ja,b=this.Fa(),c=this.Fa(),d=this.Fa();null!=Vc(this,b,c,!1)&&(Uc(this,d,a),this.Uh&&Xd(this,this.pa))}},function(){this.ie[this.S()].call(this,
        Hg,kg)},function(){this.Fc[this.S()].call(this,2==this.ja?Ig:Jg,kg)},function(){this.ie[this.S()].call(this,Hg,lg)},function(){this.Fc[this.S()].call(this,2==this.ja?Ig:Jg,lg)},function(){var a=this.S();if(a){var b=this.F&255;this.F=this.F&-65536|b/a<<8|b%a;D(this,this.F,128);this.A-=this.B.Nk}},function(){var a=this.S();this.F=this.F&-65536|(this.F>>8&255)*a+this.F&255;D(this,this.F,128);this.A-=this.B.Mk},function(){this.F=this.F&-256|(fe(this)?255:0);this.A-=2},function(){this.F=this.F&-256|we(this,
        this.da,this.D+(this.F&255)&65535);this.A-=this.B.Ol},Og,Og,Og,Og,Og,Og,Og,Og,function(){var a=this.M();(this.G=this.G-1&this.T)&&!ie(this)?(C(this,l(this)+a),this.A-=this.B.vl):this.A-=this.B.Ni},function(){var a=this.M();(this.G=this.G-1&this.T)&&ie(this)?(C(this,l(this)+a),this.A-=this.B.Oi):this.A-=this.B.Pi},function(){var a=this.M();(this.G=this.G-1&this.T)?(C(this,l(this)+a),this.A-=this.B.ul):this.A-=this.B.Ni},function(){var a=this.M();this.G&this.T?this.A-=this.B.Pi:(C(this,l(this)+a),this.A-=
        this.B.Oi)},function(){var a=this.S();this.F=this.F&-256|Ub(this.la,a,this.pa-2);this.A-=this.B.Ii},function(){var a=this.S();this.F=Ub(this.la,a,this.pa-2);this.F|=Ub(this.la,a+1&65535,this.pa-2)<<8;this.A-=this.B.Ii},function(){var a=this.S();Wb(this.la,a,this.F&255,this.pa-2);this.A-=this.B.Yi},function(){var a=this.S();Wb(this.la,a,this.F&255,this.pa-2);Wb(this.la,a+1&65535,this.F>>8,this.pa-2);this.A-=this.B.Yi},function(){var a=this.ia(),b=l(this),a=b+a;u(this,b);C(this,a);this.A-=this.B.Uk},
        function(){var a=this.ia();C(this,l(this)+a);this.A-=this.B.Ji},function(){Vc(this,this.ia(),Ae(this));this.A-=this.B.ql},function(){var a=this.M();C(this,l(this)+a);this.A-=this.B.Ji},function(){this.F=this.F&-256|Ub(this.la,this.H,this.pa-1);this.A-=this.B.Hi},function(){this.F=Ub(this.la,this.H,this.pa-1);this.F|=Ub(this.la,this.H+1&65535,this.pa-1)<<8;this.A-=this.B.Hi},function(){Wb(this.la,this.H,this.F&255,this.pa-1);this.A-=this.B.Xi},function(){Wb(this.la,this.H,this.F&255,this.pa-1);Wb(this.la,
        this.H+1&65535,this.F>>8,this.pa-1);this.A-=this.B.Xi},Pg,Pg,function(){this.Q|=132;this.A-=this.B.Mc},function(){this.Q|=68;this.A-=this.B.Mc},function(){this.lb|=4;this.A-=2;this.ca&ub||xc(this)},function(){fe(this)?me(this):le(this);this.A-=2},function(){this.Pb=!1;this.ie[this.S()].call(this,Tg,ng);this.Pb&&(this.F=this.F&~this.C|this.gb&this.C)},function(){this.Pb=!1;this.Fc[this.S()].call(this,Ug,ng);this.Pb&&(this.F=this.F&~this.C|this.gb&this.C,this.H=this.H&~this.C|this.$b&this.C)},function(){me(this);
        this.A-=2},function(){le(this);this.A-=2},function(){this.ca&=~ub;this.A-=this.B.Sk},function(){this.ca|=ub;this.Q|=4;this.A-=2},function(){this.ca&=~tb;this.A-=2},function(){this.ca|=tb;this.A-=2},function(){this.ie[this.S()].call(this,ad,ng)},function(){this.Fc[this.S()].call(this,bd,ng)}],Gg=[Ie,uf,Ge,xf,Ke,ag,gg,Xe],Qg=[Je,vf,He,yf,Le,bg,hg,Ye],Rg=[function(a,b){this.A-=this.Ga===h?this.B.Tb:this.B.Gl;return b},ig,ig,ig,ig,ig,ig,ig],Sg=[function(a,b){this.A-=this.Ga===h?this.B.yl:this.B.wl;return b},
        T,T,T,T,T,T,T],Hg=[function(a,b){var c=a,d=b&this.ub;if(d){var e;(d&=7)?(e=a<<d-1,c=(a<<d|a>>8-d)&255):e=a<<7;pe(this,c,e,128)}return c},function(a,b){var c=a,d=b&this.ub;if(d){var e;(d&=7)?(e=a<<8-d,c=(a>>>d|e)&255):e=a;pe(this,c,e,128)}return c},function(a,b){var c=a,d=b&this.ub;if(d){var e=qe(this);(d%=9)?(c=(a<<d|e<<d-1|a>>9-d)&255,e=a<<d-1):e<<=7;pe(this,c,e,128)}return c},function(a,b){var c=a,d=b&this.ub;if(d){var e=qe(this);(d%=9)?(c=(a>>d|e<<8-d|a<<9-d)&255,e=a<<8-d):e<<=7;pe(this,c,e,128)}return c},
        function(a,b){var c=a,d=b&this.ub;if(d){var e=0;8<d?c=0:(e=a<<d-1,c=e<<1&255);D(this,c,128,e&128,(c^e)&128)}return c},function(a,b){var c=b&this.ub;c&&(c=8<c?0:a>>>c-1,a=c>>>1&255,D(this,a,128,c&1,a&128));return a},T,function(a,b){var c=b&this.ub;c&&(9<c&&(c=9),c=a<<24>>24>>c-1,a=c>>1&255,D(this,a,128,c&1));return a}],Ig=[function(a,b){var c=a,d=b&this.ub;if(d){var e;(d&=15)?(e=a<<d-1,c=(a<<d|a>>16-d)&65535):e=a<<15;pe(this,c,e,32768)}return c},function(a,b){var c=a,d=b&this.ub;if(d){var e;(d&=15)?
        (e=a<<16-d,c=(a>>>d|e)&65535):e=a;pe(this,c,e,32768)}return c},function(a,b){var c=a,d=b&this.ub;if(d){var e=qe(this);(d%=17)?(c=(a<<d|e<<d-1|a>>17-d)&65535,e=a<<d-1):e<<=15;pe(this,c,e,32768)}return c},function(a,b){var c=a,d=b&this.ub;if(d){var e=qe(this);(d%=17)?(c=(a>>d|e<<16-d|a<<17-d)&65535,e=a<<16-d):e<<=15;pe(this,c,e,32768)}return c},function(a,b){var c=a,d=b&this.ub;if(d){var e=0;16<d?c=0:(e=a<<d-1,c=e<<1&65535);D(this,c,32768,e&32768,(c^e)&32768)}return c},function(a,b){var c=b&this.ub;
        c&&(c=16<c?0:a>>>c-1,a=c>>>1&65535,D(this,a,32768,c&1,a&32768));return a},T,function(a,b){var c=b&this.ub;c&&(17<c&&(c=17),c=a<<16>>16>>c-1,a=c>>1&65535,D(this,a,32768,c&1));return a}],Jg=[function(a,b){var c=a,d=b&this.ub;d&&(c=a<<d|a>>>32-d,pe(this,c,a<<d-1,-2147483648));return c},function(a,b){var c=a,d=b&this.ub;if(d){var e=a<<32-d,c=a>>>d|e;pe(this,c,e,-2147483648)}return c},function(a,b){var c=a,d=b&this.ub;d&&(c=qe(this),c=a<<d|c<<d-1|a>>>32-d>>>1,pe(this,c,a<<d-1,-2147483648));return c},function(a,
        b){var c=a,d=b&this.ub;d&&(c=qe(this),c=a>>>d|c<<32-d|a<<32-d<<1,pe(this,c,a<<32-d,-2147483648));return c},function(a,b){var c=a,d=b&this.ub;d&&(d=a<<d-1,c=d<<1,D(this,c,-2147483648,d&-2147483648,(c^d)&-2147483648));return c},function(a,b){var c=b&this.ub;c&&(c=a>>>c-1,a=c>>>1,D(this,a,-2147483648,c&1,a&-2147483648));return a},T,function(a,b){var c=b&this.ub;c&&(c=a>>c-1,a=c>>1,D(this,a,-2147483648,c&1));return a}],Tg=[function(a,b){b=this.S();D(this,a&b,128);this.A-=this.V===h?this.B.kj:this.B.jj;
        this.Q|=2;return a},T,function(a){this.A-=this.V===h?this.B.cg:this.B.bg;return a^255},function(a){var b=-a|0;ee(this,0,a,b,191,!0);this.A-=this.V===h?this.B.cg:this.B.bg;return b&255},function(a){this.Pb=!0;this.gb=(this.F&255)*a&65535;this.gb&65280?(le(this),ne(this)):(me(this),oe(this));this.A-=this.V===h?this.B.Cl:this.B.Bl;this.Q|=2;return a},function(a){var b=(this.F<<24>>24)*(a<<24>>24)|0;this.Pb=!0;this.gb=b&65535;127<b||-128>b?(le(this),ne(this)):(me(this),oe(this));this.A-=this.V===h?this.B.hl:
        this.B.gl;this.Q|=2;return a},function(a,b){if(!a)return jg.call(this),a;var c=(b=this.F&65535)/a;if(255<c)return jg.call(this),a;this.Pb=!0;this.gb=c&255|(b%a&255)<<8;this.A-=this.V===h?this.B.$k:this.B.Zk;this.Q|=2;return a},function(a,b){if(!a)return jg.call(this),a;var c=a<<24>>24,d=(b=this.F<<16>>16)/c|0;if(d!=d<<24>>24||8086==this.ma&&-128==d)return jg.call(this),a;this.Pb=!0;this.gb=d&255|(b%c&255)<<8;this.A-=this.V===h?this.B.dl:this.B.cl;this.Q|=2;return a}],Ug=[function(a,b){b=this.ia();
        D(this,a&b,32768);this.A-=this.V===h?this.B.kj:this.B.jj;this.Q|=2;return a},T,function(a){this.A-=this.V===h?this.B.cg:this.B.bg;return a^65535},function(a){var b=-a|0;ee(this,0,a,b,32831,!0);this.A-=this.V===h?this.B.cg:this.B.bg;return b&65535},function(a,b){if(2==this.ja){b=this.F&65535;var c=b*a|0;this.Pb=!0;this.gb=c&65535;this.$b=c>>16&65535}else tf.call(this,a,this.F);this.$b?(le(this),ne(this)):(me(this),oe(this));this.A-=this.V===h?this.B.El:this.B.Dl;this.Q|=2;return a},function(a,b){var c;
        if(2==this.ja)b=this.F&65535,c=(b<<16>>16)*(a<<16>>16)|0,this.Pb=!0,this.gb=c&65535,this.$b=c>>16&65535,c=32767<c||-32768>c;else{c=a;var d=this.F,e=!1;0>d&&(d=-d|0,e=!e);0>c&&(c=-c|0,e=!e);tf.call(this,c,d);e&&(this.gb=~this.gb+1|0,this.$b=~this.$b+(this.gb?0:1)|0);c=this.$b!=this.gb>>31}c?(le(this),ne(this)):(me(this),oe(this));this.A-=this.V===h?this.B.jl:this.B.il;this.Q|=2;return a},function(a,b){if(2==this.ja){if(!a)return jg.call(this),a;b=65536*(this.H&65535)+(this.F&65535);var c=b/a|0;if(65536<=
        c)return jg.call(this),a;this.Pb=!0;this.gb=c&65535;this.$b=b%a&65535}else{af.call(this,this.F,this.H,a);if(!this.Pb)return jg.call(this),a;this.gb|=0;this.$b|=0}this.A-=this.V===h?this.B.bl:this.B.al;this.Q|=2;return a},function(a,b){if(2==this.ja){if(!a)return jg.call(this),a;var c=a<<16>>16,d=(b=this.H<<16|this.F&65535)/c|0;if(d!=d<<16>>16||8086==this.ma&&-32768==d)return jg.call(this),a;this.Pb=!0;this.gb=d&65535;this.$b=b%c&65535}else{var c=this.F,d=this.H,e=a,m=!1,n=!1;0>e&&(e=-e|0,m=!m);0>
        d&&(c=-c|0,d=~d+(c?0:1)|0,n=!0,m=!m);af.call(this,c,d,e);2147483647<this.gb&&(this.Pb=!1);m&&(this.gb=-this.gb);n&&(this.$b=-this.$b);if(!this.Pb)return jg.call(this),a;this.gb|=0;this.$b|=0}this.A-=this.V===h?this.B.fl:this.B.el;this.Q|=2;return a}],ad=[function(a){var b=a+1|0;ee(this,a,1,b,190);this.A-=this.V===h?this.B.ag:this.B.$f;return b&255},function(a){var b=a-1|0;ee(this,a,1,b,190,!0);this.A-=this.V===h?this.B.ag:this.B.$f;return b&255},T,T,T,T,T,T],bd=[function(a){var b=a+1|0;ee(this,a,
        1,b,32830);this.A-=this.V===h?this.B.ag:this.B.$f;return b&65535},function(a){var b=a-1|0;ee(this,a,1,b,32830,!0);this.A-=this.V===h?this.B.ag:this.B.$f;return b&65535},function(a){u(this,l(this));C(this,a);this.A-=this.V===h?this.B.Yk:this.B.Xk;this.Q|=2;return a},function(a){if(this.V===h)return T.call(this,a);We.call(this,a,this.na(this.V+this.ja));this.A-=this.B.Vk;this.Q|=2;return a},function(a){C(this,a);this.A-=this.V===h?this.B.sl:this.B.rl;this.Q|=2;return a},function(a){if(this.V===h)return T.call(this,
        a);Vc(this,a,this.na(this.V+this.ja));this.Uh&&Xd(this,this.pa);this.A-=this.B.pl;this.Q|=2;return a},function(a){var b=a;this.Q&512&&(a=a-2&65535,80286>this.ma&&(b=a));u(this,b);this.A-=this.V===h?this.B.mc:this.B.Il;this.Q|=2;return a},ig],wd=Array(256);wd[0]=function(){var a=this.S();16>(a&56)&&(this.Q|=1);this.Fc[a].call(this,this.rm,ng)};wd[1]=function(){var a=this.S();a&16||(this.Q|=1);this.Fc[a].call(this,Vg,ng)};wd[2]=function(){this.Ha[this.S()].call(this,hf)};
        wd[3]=function(){this.Ha[this.S()].call(this,of)};
        wd[5]=function(){this.oa.Ja?Pc.call(this,13,0,!0):(ve(this,this.na(2054)),this.J=this.na(2086),this.K=this.na(2088),this.L=this.na(2090),this.D=this.na(2094),this.H=this.na(2096),this.G=this.na(2098),this.F=this.na(2100),Qc(this.Qa,2102,this.na(2084)),Qc(this.oa,2108,this.na(2082)),Qc(this.ra,2114,this.na(2080)),Qc(this.kb,2120,this.na(2078)),Uc(this,this.na(2072)),C(this,this.na(2074)),t(this,this.na(2092)),this.pd=this.na(2126)|this.wc(2128)<<16,this.If=this.pd+this.na(2130),Qc(this.Ne,2132,this.na(2076)),
        this.qd=this.na(2138)|this.wc(2140)<<16,this.Ve=this.qd+this.na(2142),Qc(this.hb,2144,this.na(2070)),this.A-=195)};wd[6]=function(){this.oa.Ja?Pc.call(this,13,0):(this.zb&=-9,this.A-=2)};wd[11]=dd;var x=[];x[32]=function(){var a=this.S()|192;if(this.oa.Ja)Pc.call(this,13,0);else{switch((a&56)>>3){case 0:this.ld=this.zb;break;case 1:this.ld=this.yj;break;case 2:this.ld=this.nh;break;case 3:this.ld=this.gg;break;default:xd.call(this);return}Td(this,4);this.Ha[a].call(this,sf)}};
        x[34]=function(){var a,b=this.S()|192;if(this.oa.Ja)Pc.call(this,13,0);else{var c=(b&56)>>3;switch(c){case 0:a=this.F;break;case 1:a=this.G;break;case 2:a=this.H;break;case 3:a=this.D;break;default:dd.call(this);return}Td(this,4);this.Ha[b].call(this,qf);switch(c){case 0:c=this.F;this.F=a;this.zb=c;Jd(this);this.zb&-2147483648?Fd(this):this.ka!=this.Te&&(this.ka=this.Te,this.Ah=this.dk=null);break;case 1:this.yj=this.G;this.G=a;break;case 2:this.nh=this.H;this.H=a;break;case 3:c=this.D,this.D=a,this.gg=
        c,this.zb&-2147483648&&Fd(this)}}};x[128]=function(){var a=this.ia();ke(this)?(C(this,l(this)+a),this.A-=this.B.Ba):this.A-=this.B.Ca};x[129]=function(){var a=this.ia();ke(this)?this.A-=this.B.Ca:(C(this,l(this)+a),this.A-=this.B.Ba)};x[130]=function(){var a=this.ia();fe(this)?(C(this,l(this)+a),this.A-=this.B.Ba):this.A-=this.B.Ca};x[131]=function(){var a=this.ia();fe(this)?this.A-=this.B.Ca:(C(this,l(this)+a),this.A-=this.B.Ba)};
        x[132]=function(){var a=this.ia();ie(this)?(C(this,l(this)+a),this.A-=this.B.Ba):this.A-=this.B.Ca};x[133]=function(){var a=this.ia();ie(this)?this.A-=this.B.Ca:(C(this,l(this)+a),this.A-=this.B.Ba)};x[134]=function(){var a=this.ia();fe(this)||ie(this)?(C(this,l(this)+a),this.A-=this.B.Ba):this.A-=this.B.Ca};x[135]=function(){var a=this.ia();fe(this)||ie(this)?this.A-=this.B.Ca:(C(this,l(this)+a),this.A-=this.B.Ba)};
        x[136]=function(){var a=this.ia();je(this)?(C(this,l(this)+a),this.A-=this.B.Ba):this.A-=this.B.Ca};x[137]=function(){var a=this.ia();je(this)?this.A-=this.B.Ca:(C(this,l(this)+a),this.A-=this.B.Ba)};x[138]=function(){var a=this.ia();ge(this)?(C(this,l(this)+a),this.A-=this.B.Ba):this.A-=this.B.Ca};x[139]=function(){var a=this.ia();ge(this)?this.A-=this.B.Ca:(C(this,l(this)+a),this.A-=this.B.Ba)};
        x[140]=function(){var a=this.ia();!je(this)!=!ke(this)?(C(this,l(this)+a),this.A-=this.B.Ba):this.A-=this.B.Ca};x[141]=function(){var a=this.ia();!je(this)==!ke(this)?(C(this,l(this)+a),this.A-=this.B.Ba):this.A-=this.B.Ca};x[142]=function(){var a=this.ia();ie(this)||!je(this)!=!ke(this)?(C(this,l(this)+a),this.A-=this.B.Ba):this.A-=this.B.Ca};x[143]=function(){var a=this.ia();ie(this)||!je(this)!=!ke(this)?this.A-=this.B.Ca:(C(this,l(this)+a),this.A-=this.B.Ba)};x[144]=function(){zf.call(this,Af)};
        x[145]=function(){zf.call(this,Af)};x[146]=function(){zf.call(this,Bf)};x[147]=function(){zf.call(this,Cf)};x[148]=function(){zf.call(this,Df)};x[149]=function(){zf.call(this,Ef)};x[150]=function(){zf.call(this,Ff)};x[151]=function(){zf.call(this,Gf)};x[152]=function(){zf.call(this,Hf)};x[153]=function(){zf.call(this,If)};x[154]=function(){zf.call(this,Jf)};x[155]=function(){zf.call(this,Kf)};x[156]=function(){zf.call(this,Lf)};x[157]=function(){zf.call(this,Mf)};x[158]=function(){zf.call(this,Nf)};
        x[159]=function(){zf.call(this,Of)};x[160]=function(){u(this,this.Hd.sa);this.A-=this.B.Fe};x[161]=function(){var a=this.Fa();this.Hd.load(a);this.A-=this.B.Tb};x[163]=function(){this.vb[this.S()].call(this,Qe);this.V!==h&&(this.A-=this.B.Xp)};x[164]=function(){this.vb[this.S()].call(this,2==this.ja?Rf:Sf);this.A-=this.V===h?this.B.fj:this.B.ej};x[165]=function(){this.vb[this.S()].call(this,2==this.ja?Tf:Uf);this.A-=this.V===h?this.B.fj:this.B.ej};x[168]=function(){u(this,this.Id.sa);this.A-=this.B.Fe};
        x[169]=function(){var a=this.Fa();this.Id.load(a);this.A-=this.B.Tb};x[171]=function(){this.vb[this.S()].call(this,Ve);this.V!==h&&(this.A-=this.B.Pk)};x[172]=function(){this.vb[this.S()].call(this,2==this.ja?Xf:Yf);this.A-=this.V===h?this.B.fj:this.B.ej};x[173]=function(){this.vb[this.S()].call(this,2==this.ja?Zf:$f);this.A-=this.V===h?this.B.fj:this.B.ej};x[175]=function(){this.Ha[this.S()].call(this,2==this.ja?ef:ff)};x[178]=function(){this.Ha[this.S()].call(this,pf)};
        x[179]=function(){this.vb[this.S()].call(this,Ue);this.V!==h&&(this.A-=this.B.Pk)};x[180]=function(){this.Ha[this.S()].call(this,mf)};x[181]=function(){this.Ha[this.S()].call(this,nf)};
        x[182]=function(){var a,b=this.S(),c=(b&56)>>3;switch(c){case 4:a=this.F;break;case 5:a=this.G;break;case 6:a=this.H;break;case 7:a=this.D}this.Gc[b].call(this,rf);switch(c){case 0:this.F=this.F&~this.C|this.F&255;break;case 1:this.G=this.G&~this.C|this.G&255;break;case 2:this.H=this.H&~this.C|this.H&255;break;case 3:this.D=this.D&~this.C|this.D&255;break;case 4:this.Fd=this.Fd&~this.C|this.F>>8&255;this.F=a;break;case 5:this.L=this.L&~this.C|this.G>>8&255;this.G=a;break;case 6:this.K=this.K&~this.C|
        this.H>>8&255;this.H=a;break;case 7:this.J=this.J&~this.C|this.D>>8&255,this.D=a}this.A-=this.V===h?this.B.Wi:this.B.Vi};x[183]=function(){var a=this.S();Td(this,2);this.Ha[a].call(this,rf);switch((a&56)>>3){case 0:this.F&=65535;break;case 1:this.G&=65535;break;case 2:this.H&=65535;break;case 3:this.D&=65535;break;case 4:this.Fd&=65535;break;case 5:this.L&=65535;break;case 6:this.K&=65535;break;case 7:this.J&=65535}this.A-=this.V===h?this.B.Wi:this.B.Vi};
        x[186]=function(){this.Fc[this.S()].call(this,Wg,this.S)};x[187]=function(){this.vb[this.S()].call(this,Re);this.V!==h&&(this.A-=this.B.Pk)};x[188]=function(){this.Ha[this.S()].call(this,Oe)};x[189]=function(){this.Ha[this.S()].call(this,Pe)};
        x[190]=function(){var a,b=this.S(),c=(b&56)>>3;switch(c){case 4:a=this.F;break;case 5:a=this.G;break;case 6:a=this.H;break;case 7:a=this.D}this.Gc[b].call(this,rf);switch(c){case 0:this.F=this.F&~this.C|(this.F&255)<<24>>24&this.C;break;case 1:this.G=this.G&~this.C|(this.G&255)<<24>>24&this.C;break;case 2:this.H=this.H&~this.C|(this.H&255)<<24>>24&this.C;break;case 3:this.D=this.D&~this.C|(this.D&255)<<24>>24&this.C;break;case 4:this.Fd=this.Fd&~this.C|this.F<<16>>24&this.C;this.F=a;break;case 5:this.L=
        this.L&~this.C|this.G<<16>>24&this.C;this.G=a;break;case 6:this.K=this.K&~this.C|this.H<<16>>24&this.C;this.H=a;break;case 7:this.J=this.J&~this.C|this.D<<16>>24&this.C,this.D=a}this.A-=this.V===h?this.B.Wi:this.B.Vi};
        x[191]=function(){var a=this.S();Td(this,2);this.Ha[a].call(this,rf);switch((a&56)>>3){case 0:this.F=this.F<<16>>16;break;case 1:this.G=this.G<<16>>16;break;case 2:this.H=this.H<<16>>16;break;case 3:this.D=this.D<<16>>16;break;case 4:this.Fd=this.Fd<<16>>16;break;case 5:this.L=this.L<<16>>16;break;case 6:this.K=this.K<<16>>16;break;case 7:this.J=this.J<<16>>16}this.A-=this.V===h?this.B.Wi:this.B.Vi};
        var Yd=[function(){this.A-=2+(this.V===h?0:1);return this.Ne.sa},function(){this.A-=2+(this.V===h?0:1);return this.hb.sa},function(a){this.Q|=2;this.Ne.load(a);this.A-=17+(this.V===h?0:2);return a},function(a){this.Q|=2;this.hb.load(a)!==h&&(this.Eb(this.hb.od+4,this.hb.Ob|=512),this.hb.type=768);this.A-=17+(this.V===h?0:2);return a},function(a){this.Q|=2;this.A-=14+(this.V===h?0:2);if(this.Kb.load(a,!0)!==h&&2048!=(this.Kb.Ob&2560)&&(this.Kb.uc>=this.oa.Ja&&this.Kb.uc>=(a&3)||7168==(this.Kb.Ob&7168)))return ue(this),
        a;se(this);return a},function(a){this.Q|=2;this.A-=14+(this.V===h?0:2);if(this.Kb.load(a,!0)!==h&&512==(this.Kb.Ob&2560)&&this.Kb.uc>=this.oa.Ja&&this.Kb.uc>=(a&3))return ue(this),a;se(this);return a},T,T],cd=[ud,ud,ud,ud,ud,ud,T,T],Vg=[function(a){if(this.V===h)dd.call(this);else{a=this.If-this.pd;var b=this.pd;80286==this.ma?b|=-16777216:this.ma>=qb&&(2==this.ja?b&=16777215:a|=b<<16);this.Kj(this.V+2,b);this.A-=11}return a},function(a){if(this.V===h)dd.call(this);else{a=this.Ve-this.qd;var b=this.qd;
        80286==this.ma?b|=-16777216:this.ma>=qb&&(2==this.ja?b&=16777215:a|=b<<16);this.Kj(this.V+2,b);this.A-=12}return a},function(a){this.V===h?dd.call(this):(this.pd=this.Tg(this.V+2)&(this.C|this.C<<8),a&=65535,this.If=this.pd+a,this.Q|=2,this.A-=11);return a},function(a){this.V===h?dd.call(this):(this.qd=this.Tg(this.V+2)&(this.C|this.C<<8),a&=65535,this.Ve=this.qd+a,this.Q|=2,this.A-=12);return a},function(){this.A-=2+(this.V===h?0:1);return this.zb},T,function(a){ve(this,a);this.A-=this.V===h?3:6;
        this.Q|=2;return a},T],Wg=[T,T,T,T,Qe,Ve,Ue,Re],y=[function(a){a=a.call(this,this.F&255,E(this,this.D+this.K));this.F=this.F&-256|a;this.A-=this.B.Y},function(a){a=a.call(this,this.F&255,E(this,this.D+this.J));this.F=this.F&-256|a;this.A-=this.B.Z},function(a){a=a.call(this,this.F&255,F(this,this.L+this.K));this.F=this.F&-256|a;this.A-=this.B.Z},function(a){a=a.call(this,this.F&255,F(this,this.L+this.J));this.F=this.F&-256|a;this.A-=this.B.Y},function(a){a=a.call(this,this.F&255,E(this,this.K));this.F=
        this.F&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.F&255,E(this,this.J));this.F=this.F&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.F&255,E(this,R(this)));this.F=this.F&-256|a;this.A-=this.B.aa},function(a){a=a.call(this,this.F&255,E(this,this.D));this.F=this.F&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.G&255,E(this,this.D+this.K));this.G=this.G&-256|a;this.A-=this.B.Y},function(a){a=a.call(this,this.G&255,E(this,this.D+this.J));this.G=this.G&-256|a;this.A-=this.B.Z},
        function(a){a=a.call(this,this.G&255,F(this,this.L+this.K));this.G=this.G&-256|a;this.A-=this.B.Z},function(a){a=a.call(this,this.G&255,F(this,this.L+this.J));this.G=this.G&-256|a;this.A-=this.B.Y},function(a){a=a.call(this,this.G&255,E(this,this.K));this.G=this.G&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.G&255,E(this,this.J));this.G=this.G&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.G&255,E(this,R(this)));this.G=this.G&-256|a;this.A-=this.B.aa},function(a){a=a.call(this,
        this.G&255,E(this,this.D));this.G=this.G&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.H&255,E(this,this.D+this.K));this.H=this.H&-256|a;this.A-=this.B.Y},function(a){a=a.call(this,this.H&255,E(this,this.D+this.J));this.H=this.H&-256|a;this.A-=this.B.Z},function(a){a=a.call(this,this.H&255,F(this,this.L+this.K));this.H=this.H&-256|a;this.A-=this.B.Z},function(a){a=a.call(this,this.H&255,F(this,this.L+this.J));this.H=this.H&-256|a;this.A-=this.B.Y},function(a){a=a.call(this,this.H&255,E(this,
        this.K));this.H=this.H&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.H&255,E(this,this.J));this.H=this.H&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.H&255,E(this,R(this)));this.H=this.H&-256|a;this.A-=this.B.aa},function(a){a=a.call(this,this.H&255,E(this,this.D));this.H=this.H&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.D&255,E(this,this.D+this.K));this.D=this.D&-256|a;this.A-=this.B.Y},function(a){a=a.call(this,this.D&255,E(this,this.D+this.J));this.D=this.D&-256|
        a;this.A-=this.B.Z},function(a){a=a.call(this,this.D&255,F(this,this.L+this.K));this.D=this.D&-256|a;this.A-=this.B.Z},function(a){a=a.call(this,this.D&255,F(this,this.L+this.J));this.D=this.D&-256|a;this.A-=this.B.Y},function(a){a=a.call(this,this.D&255,E(this,this.K));this.D=this.D&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.D&255,E(this,this.J));this.D=this.D&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.D&255,E(this,R(this)));this.D=this.D&-256|a;this.A-=this.B.aa},function(a){a=
        a.call(this,this.D&255,E(this,this.D));this.D=this.D&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.F>>8&255,E(this,this.D+this.K));this.F=this.F&-65281|a<<8;this.A-=this.B.Y},function(a){a=a.call(this,this.F>>8&255,E(this,this.D+this.J));this.F=this.F&-65281|a<<8;this.A-=this.B.Z},function(a){a=a.call(this,this.F>>8&255,F(this,this.L+this.K));this.F=this.F&-65281|a<<8;this.A-=this.B.Z},function(a){a=a.call(this,this.F>>8&255,F(this,this.L+this.J));this.F=this.F&-65281|a<<8;this.A-=this.B.Y},
        function(a){a=a.call(this,this.F>>8&255,E(this,this.K));this.F=this.F&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.F>>8&255,E(this,this.J));this.F=this.F&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.F>>8&255,E(this,R(this)));this.F=this.F&-65281|a<<8;this.A-=this.B.aa},function(a){a=a.call(this,this.F>>8&255,E(this,this.D));this.F=this.F&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.G>>8&255,E(this,this.D+this.K));this.G=this.G&-65281|a<<8;this.A-=this.B.Y},
        function(a){a=a.call(this,this.G>>8&255,E(this,this.D+this.J));this.G=this.G&-65281|a<<8;this.A-=this.B.Z},function(a){a=a.call(this,this.G>>8&255,F(this,this.L+this.K));this.G=this.G&-65281|a<<8;this.A-=this.B.Z},function(a){a=a.call(this,this.G>>8&255,F(this,this.L+this.J));this.G=this.G&-65281|a<<8;this.A-=this.B.Y},function(a){a=a.call(this,this.G>>8&255,E(this,this.K));this.G=this.G&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.G>>8&255,E(this,this.J));this.G=this.G&-65281|a<<
        8;this.A-=this.B.N},function(a){a=a.call(this,this.G>>8&255,E(this,R(this)));this.G=this.G&-65281|a<<8;this.A-=this.B.aa},function(a){a=a.call(this,this.G>>8&255,E(this,this.D));this.G=this.G&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.H>>8&255,E(this,this.D+this.K));this.H=this.H&-65281|a<<8;this.A-=this.B.Y},function(a){a=a.call(this,this.H>>8&255,E(this,this.D+this.J));this.H=this.H&-65281|a<<8;this.A-=this.B.Z},function(a){a=a.call(this,this.H>>8&255,F(this,this.L+this.K));this.H=
        this.H&-65281|a<<8;this.A-=this.B.Z},function(a){a=a.call(this,this.H>>8&255,F(this,this.L+this.J));this.H=this.H&-65281|a<<8;this.A-=this.B.Y},function(a){a=a.call(this,this.H>>8&255,E(this,this.K));this.H=this.H&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.H>>8&255,E(this,this.J));this.H=this.H&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.H>>8&255,E(this,R(this)));this.H=this.H&-65281|a<<8;this.A-=this.B.aa},function(a){a=a.call(this,this.H>>8&255,E(this,this.D));
        this.H=this.H&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.D>>8&255,E(this,this.D+this.K));this.D=this.D&-65281|a<<8;this.A-=this.B.Y},function(a){a=a.call(this,this.D>>8&255,E(this,this.D+this.J));this.D=this.D&-65281|a<<8;this.A-=this.B.Z},function(a){a=a.call(this,this.D>>8&255,F(this,this.L+this.K));this.D=this.D&-65281|a<<8;this.A-=this.B.Z},function(a){a=a.call(this,this.D>>8&255,F(this,this.L+this.J));this.D=this.D&-65281|a<<8;this.A-=this.B.Y},function(a){a=a.call(this,this.D>>
        8&255,E(this,this.K));this.D=this.D&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.D>>8&255,E(this,this.J));this.D=this.D&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.D>>8&255,E(this,R(this)));this.D=this.D&-65281|a<<8;this.A-=this.B.aa},function(a){a=a.call(this,this.D>>8&255,E(this,this.D));this.D=this.D&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.F&255,E(this,this.D+this.K+this.M()));this.F=this.F&-256|a;this.A-=this.B.O},function(a){a=a.call(this,
        this.F&255,E(this,this.D+this.J+this.M()));this.F=this.F&-256|a;this.A-=this.B.P},function(a){a=a.call(this,this.F&255,F(this,this.L+this.K+this.M()));this.F=this.F&-256|a;this.A-=this.B.P},function(a){a=a.call(this,this.F&255,F(this,this.L+this.J+this.M()));this.F=this.F&-256|a;this.A-=this.B.O},function(a){a=a.call(this,this.F&255,E(this,this.K+this.M()));this.F=this.F&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&255,E(this,this.J+this.M()));this.F=this.F&-256|a;this.A-=this.B.I},function(a){a=
        a.call(this,this.F&255,F(this,this.L+this.M()));this.F=this.F&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&255,E(this,this.D+this.M()));this.F=this.F&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&255,E(this,this.D+this.K+this.M()));this.G=this.G&-256|a;this.A-=this.B.O},function(a){a=a.call(this,this.G&255,E(this,this.D+this.J+this.M()));this.G=this.G&-256|a;this.A-=this.B.P},function(a){a=a.call(this,this.G&255,F(this,this.L+this.K+this.M()));this.G=this.G&-256|a;this.A-=
        this.B.P},function(a){a=a.call(this,this.G&255,F(this,this.L+this.J+this.M()));this.G=this.G&-256|a;this.A-=this.B.O},function(a){a=a.call(this,this.G&255,E(this,this.K+this.M()));this.G=this.G&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&255,E(this,this.J+this.M()));this.G=this.G&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&255,F(this,this.L+this.M()));this.G=this.G&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&255,E(this,this.D+this.M()));this.G=this.G&-256|
        a;this.A-=this.B.I},function(a){a=a.call(this,this.H&255,E(this,this.D+this.K+this.M()));this.H=this.H&-256|a;this.A-=this.B.O},function(a){a=a.call(this,this.H&255,E(this,this.D+this.J+this.M()));this.H=this.H&-256|a;this.A-=this.B.P},function(a){a=a.call(this,this.H&255,F(this,this.L+this.K+this.M()));this.H=this.H&-256|a;this.A-=this.B.P},function(a){a=a.call(this,this.H&255,F(this,this.L+this.J+this.M()));this.H=this.H&-256|a;this.A-=this.B.O},function(a){a=a.call(this,this.H&255,E(this,this.K+
        this.M()));this.H=this.H&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&255,E(this,this.J+this.M()));this.H=this.H&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&255,F(this,this.L+this.M()));this.H=this.H&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&255,E(this,this.D+this.M()));this.H=this.H&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&255,E(this,this.D+this.K+this.M()));this.D=this.D&-256|a;this.A-=this.B.O},function(a){a=a.call(this,this.D&255,E(this,
        this.D+this.J+this.M()));this.D=this.D&-256|a;this.A-=this.B.P},function(a){a=a.call(this,this.D&255,F(this,this.L+this.K+this.M()));this.D=this.D&-256|a;this.A-=this.B.P},function(a){a=a.call(this,this.D&255,F(this,this.L+this.J+this.M()));this.D=this.D&-256|a;this.A-=this.B.O},function(a){a=a.call(this,this.D&255,E(this,this.K+this.M()));this.D=this.D&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&255,E(this,this.J+this.M()));this.D=this.D&-256|a;this.A-=this.B.I},function(a){a=a.call(this,
        this.D&255,F(this,this.L+this.M()));this.D=this.D&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&255,E(this,this.D+this.M()));this.D=this.D&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.F>>8&255,E(this,this.D+this.K+this.M()));this.F=this.F&-65281|a<<8;this.A-=this.B.O},function(a){a=a.call(this,this.F>>8&255,E(this,this.D+this.J+this.M()));this.F=this.F&-65281|a<<8;this.A-=this.B.P},function(a){a=a.call(this,this.F>>8&255,F(this,this.L+this.K+this.M()));this.F=this.F&-65281|
        a<<8;this.A-=this.B.P},function(a){a=a.call(this,this.F>>8&255,F(this,this.L+this.J+this.M()));this.F=this.F&-65281|a<<8;this.A-=this.B.O},function(a){a=a.call(this,this.F>>8&255,E(this,this.K+this.M()));this.F=this.F&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.F>>8&255,E(this,this.J+this.M()));this.F=this.F&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.F>>8&255,F(this,this.L+this.M()));this.F=this.F&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.F>>8&
        255,E(this,this.D+this.M()));this.F=this.F&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.G>>8&255,E(this,this.D+this.K+this.M()));this.G=this.G&-65281|a<<8;this.A-=this.B.O},function(a){a=a.call(this,this.G>>8&255,E(this,this.D+this.J+this.M()));this.G=this.G&-65281|a<<8;this.A-=this.B.P},function(a){a=a.call(this,this.G>>8&255,F(this,this.L+this.K+this.M()));this.G=this.G&-65281|a<<8;this.A-=this.B.P},function(a){a=a.call(this,this.G>>8&255,F(this,this.L+this.J+this.M()));this.G=this.G&
        -65281|a<<8;this.A-=this.B.O},function(a){a=a.call(this,this.G>>8&255,E(this,this.K+this.M()));this.G=this.G&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.G>>8&255,E(this,this.J+this.M()));this.G=this.G&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.G>>8&255,F(this,this.L+this.M()));this.G=this.G&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.G>>8&255,E(this,this.D+this.M()));this.G=this.G&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.H>>8&
        255,E(this,this.D+this.K+this.M()));this.H=this.H&-65281|a<<8;this.A-=this.B.O},function(a){a=a.call(this,this.H>>8&255,E(this,this.D+this.J+this.M()));this.H=this.H&-65281|a<<8;this.A-=this.B.P},function(a){a=a.call(this,this.H>>8&255,F(this,this.L+this.K+this.M()));this.H=this.H&-65281|a<<8;this.A-=this.B.P},function(a){a=a.call(this,this.H>>8&255,F(this,this.L+this.J+this.M()));this.H=this.H&-65281|a<<8;this.A-=this.B.O},function(a){a=a.call(this,this.H>>8&255,E(this,this.K+this.M()));this.H=this.H&
        -65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.H>>8&255,E(this,this.J+this.M()));this.H=this.H&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.H>>8&255,F(this,this.L+this.M()));this.H=this.H&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.H>>8&255,E(this,this.D+this.M()));this.H=this.H&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.D>>8&255,E(this,this.D+this.K+this.M()));this.D=this.D&-65281|a<<8;this.A-=this.B.O},function(a){a=a.call(this,this.D>>
        8&255,E(this,this.D+this.J+this.M()));this.D=this.D&-65281|a<<8;this.A-=this.B.P},function(a){a=a.call(this,this.D>>8&255,F(this,this.L+this.K+this.M()));this.D=this.D&-65281|a<<8;this.A-=this.B.P},function(a){a=a.call(this,this.D>>8&255,F(this,this.L+this.J+this.M()));this.D=this.D&-65281|a<<8;this.A-=this.B.O},function(a){a=a.call(this,this.D>>8&255,E(this,this.K+this.M()));this.D=this.D&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.D>>8&255,E(this,this.J+this.M()));this.D=this.D&
        -65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.D>>8&255,F(this,this.L+this.M()));this.D=this.D&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.D>>8&255,E(this,this.D+this.M()));this.D=this.D&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.F&255,E(this,this.D+this.K+R(this)));this.F=this.F&-256|a;this.A-=this.B.O},function(a){a=a.call(this,this.F&255,E(this,this.D+this.J+R(this)));this.F=this.F&-256|a;this.A-=this.B.P},function(a){a=a.call(this,this.F&255,F(this,
        this.L+this.K+R(this)));this.F=this.F&-256|a;this.A-=this.B.P},function(a){a=a.call(this,this.F&255,F(this,this.L+this.J+R(this)));this.F=this.F&-256|a;this.A-=this.B.O},function(a){a=a.call(this,this.F&255,E(this,this.K+R(this)));this.F=this.F&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&255,E(this,this.J+R(this)));this.F=this.F&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&255,F(this,this.L+R(this)));this.F=this.F&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&
        255,E(this,this.D+R(this)));this.F=this.F&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&255,E(this,this.D+this.K+R(this)));this.G=this.G&-256|a;this.A-=this.B.O},function(a){a=a.call(this,this.G&255,E(this,this.D+this.J+R(this)));this.G=this.G&-256|a;this.A-=this.B.P},function(a){a=a.call(this,this.G&255,F(this,this.L+this.K+R(this)));this.G=this.G&-256|a;this.A-=this.B.P},function(a){a=a.call(this,this.G&255,F(this,this.L+this.J+R(this)));this.G=this.G&-256|a;this.A-=this.B.O},function(a){a=
        a.call(this,this.G&255,E(this,this.K+R(this)));this.G=this.G&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&255,E(this,this.J+R(this)));this.G=this.G&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&255,F(this,this.L+R(this)));this.G=this.G&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&255,E(this,this.D+R(this)));this.G=this.G&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&255,E(this,this.D+this.K+R(this)));this.H=this.H&-256|a;this.A-=this.B.O},function(a){a=
        a.call(this,this.H&255,E(this,this.D+this.J+R(this)));this.H=this.H&-256|a;this.A-=this.B.P},function(a){a=a.call(this,this.H&255,F(this,this.L+this.K+R(this)));this.H=this.H&-256|a;this.A-=this.B.P},function(a){a=a.call(this,this.H&255,F(this,this.L+this.J+R(this)));this.H=this.H&-256|a;this.A-=this.B.O},function(a){a=a.call(this,this.H&255,E(this,this.K+R(this)));this.H=this.H&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&255,E(this,this.J+R(this)));this.H=this.H&-256|a;this.A-=this.B.I},
        function(a){a=a.call(this,this.H&255,F(this,this.L+R(this)));this.H=this.H&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&255,E(this,this.D+R(this)));this.H=this.H&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&255,E(this,this.D+this.K+R(this)));this.D=this.D&-256|a;this.A-=this.B.O},function(a){a=a.call(this,this.D&255,E(this,this.D+this.J+R(this)));this.D=this.D&-256|a;this.A-=this.B.P},function(a){a=a.call(this,this.D&255,F(this,this.L+this.K+R(this)));this.D=this.D&-256|
        a;this.A-=this.B.P},function(a){a=a.call(this,this.D&255,F(this,this.L+this.J+R(this)));this.D=this.D&-256|a;this.A-=this.B.O},function(a){a=a.call(this,this.D&255,E(this,this.K+R(this)));this.D=this.D&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&255,E(this,this.J+R(this)));this.D=this.D&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&255,F(this,this.L+R(this)));this.D=this.D&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&255,E(this,this.D+R(this)));this.D=this.D&
        -256|a;this.A-=this.B.I},function(a){a=a.call(this,this.F>>8&255,E(this,this.D+this.K+R(this)));this.F=this.F&-65281|a<<8;this.A-=this.B.O},function(a){a=a.call(this,this.F>>8&255,E(this,this.D+this.J+R(this)));this.F=this.F&-65281|a<<8;this.A-=this.B.P},function(a){a=a.call(this,this.F>>8&255,F(this,this.L+this.K+R(this)));this.F=this.F&-65281|a<<8;this.A-=this.B.P},function(a){a=a.call(this,this.F>>8&255,F(this,this.L+this.J+R(this)));this.F=this.F&-65281|a<<8;this.A-=this.B.O},function(a){a=a.call(this,
        this.F>>8&255,E(this,this.K+R(this)));this.F=this.F&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.F>>8&255,E(this,this.J+R(this)));this.F=this.F&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.F>>8&255,F(this,this.L+R(this)));this.F=this.F&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.F>>8&255,E(this,this.D+R(this)));this.F=this.F&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.G>>8&255,E(this,this.D+this.K+R(this)));this.G=this.G&-65281|a<<
        8;this.A-=this.B.O},function(a){a=a.call(this,this.G>>8&255,E(this,this.D+this.J+R(this)));this.G=this.G&-65281|a<<8;this.A-=this.B.P},function(a){a=a.call(this,this.G>>8&255,F(this,this.L+this.K+R(this)));this.G=this.G&-65281|a<<8;this.A-=this.B.P},function(a){a=a.call(this,this.G>>8&255,F(this,this.L+this.J+R(this)));this.G=this.G&-65281|a<<8;this.A-=this.B.O},function(a){a=a.call(this,this.G>>8&255,E(this,this.K+R(this)));this.G=this.G&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.G>>
        8&255,E(this,this.J+R(this)));this.G=this.G&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.G>>8&255,F(this,this.L+R(this)));this.G=this.G&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.G>>8&255,E(this,this.D+R(this)));this.G=this.G&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.H>>8&255,E(this,this.D+this.K+R(this)));this.H=this.H&-65281|a<<8;this.A-=this.B.O},function(a){a=a.call(this,this.H>>8&255,E(this,this.D+this.J+R(this)));this.H=this.H&-65281|a<<8;
        this.A-=this.B.P},function(a){a=a.call(this,this.H>>8&255,F(this,this.L+this.K+R(this)));this.H=this.H&-65281|a<<8;this.A-=this.B.P},function(a){a=a.call(this,this.H>>8&255,F(this,this.L+this.J+R(this)));this.H=this.H&-65281|a<<8;this.A-=this.B.O},function(a){a=a.call(this,this.H>>8&255,E(this,this.K+R(this)));this.H=this.H&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.H>>8&255,E(this,this.J+R(this)));this.H=this.H&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.H>>8&255,
        F(this,this.L+R(this)));this.H=this.H&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.H>>8&255,E(this,this.D+R(this)));this.H=this.H&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.D>>8&255,E(this,this.D+this.K+R(this)));this.D=this.D&-65281|a<<8;this.A-=this.B.O},function(a){a=a.call(this,this.D>>8&255,E(this,this.D+this.J+R(this)));this.D=this.D&-65281|a<<8;this.A-=this.B.P},function(a){a=a.call(this,this.D>>8&255,F(this,this.L+this.K+R(this)));this.D=this.D&-65281|a<<
        8;this.A-=this.B.P},function(a){a=a.call(this,this.D>>8&255,F(this,this.L+this.J+R(this)));this.D=this.D&-65281|a<<8;this.A-=this.B.O},function(a){a=a.call(this,this.D>>8&255,E(this,this.K+R(this)));this.D=this.D&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.D>>8&255,E(this,this.J+R(this)));this.D=this.D&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.D>>8&255,F(this,this.L+R(this)));this.D=this.D&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.D>>8&255,E(this,
        this.D+R(this)));this.D=this.D&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.F&255,this.F&255);this.F=this.F&-256|a},function(a){a=a.call(this,this.F&255,this.G&255);this.F=this.F&-256|a},function(a){a=a.call(this,this.F&255,this.H&255);this.F=this.F&-256|a},function(a){a=a.call(this,this.F&255,this.D&255);this.F=this.F&-256|a},function(a){a=a.call(this,this.F&255,this.F>>8&255);this.F=this.F&-256|a},function(a){a=a.call(this,this.F&255,this.G>>8&255);this.F=this.F&-256|a},function(a){a=
        a.call(this,this.F&255,this.H>>8&255);this.F=this.F&-256|a},function(a){a=a.call(this,this.F&255,this.D>>8&255);this.F=this.F&-256|a},function(a){a=a.call(this,this.G&255,this.F&255);this.G=this.G&-256|a},function(a){a=a.call(this,this.G&255,this.G&255);this.G=this.G&-256|a},function(a){a=a.call(this,this.G&255,this.H&255);this.G=this.G&-256|a},function(a){a=a.call(this,this.G&255,this.D&255);this.G=this.G&-256|a},function(a){a=a.call(this,this.G&255,this.F>>8&255);this.G=this.G&-256|a},function(a){a=
        a.call(this,this.G&255,this.G>>8&255);this.G=this.G&-256|a},function(a){a=a.call(this,this.G&255,this.H>>8&255);this.G=this.G&-256|a},function(a){a=a.call(this,this.G&255,this.D>>8&255);this.G=this.G&-256|a},function(a){a=a.call(this,this.H&255,this.F&255);this.H=this.H&-256|a},function(a){a=a.call(this,this.H&255,this.G&255);this.H=this.H&-256|a},function(a){a=a.call(this,this.H&255,this.H&255);this.H=this.H&-256|a},function(a){a=a.call(this,this.H&255,this.D&255);this.H=this.H&-256|a},function(a){a=
        a.call(this,this.H&255,this.F>>8&255);this.H=this.H&-256|a},function(a){a=a.call(this,this.H&255,this.G>>8&255);this.H=this.H&-256|a},function(a){a=a.call(this,this.H&255,this.H>>8&255);this.H=this.H&-256|a},function(a){a=a.call(this,this.H&255,this.D>>8&255);this.H=this.H&-256|a},function(a){a=a.call(this,this.D&255,this.F&255);this.D=this.D&-256|a},function(a){a=a.call(this,this.D&255,this.G&255);this.D=this.D&-256|a},function(a){a=a.call(this,this.D&255,this.H&255);this.D=this.D&-256|a},function(a){a=
        a.call(this,this.D&255,this.D&255);this.D=this.D&-256|a},function(a){a=a.call(this,this.D&255,this.F>>8&255);this.D=this.D&-256|a},function(a){a=a.call(this,this.D&255,this.G>>8&255);this.D=this.D&-256|a},function(a){a=a.call(this,this.D&255,this.H>>8&255);this.D=this.D&-256|a},function(a){a=a.call(this,this.D&255,this.D>>8&255);this.D=this.D&-256|a},function(a){a=a.call(this,this.F>>8&255,this.F&255);this.F=this.F&-65281|a<<8},function(a){a=a.call(this,this.F>>8&255,this.G&255);this.F=this.F&-65281|
        a<<8},function(a){a=a.call(this,this.F>>8&255,this.H&255);this.F=this.F&-65281|a<<8},function(a){a=a.call(this,this.F>>8&255,this.D&255);this.F=this.F&-65281|a<<8},function(a){a=a.call(this,this.F>>8&255,this.F>>8&255);this.F=this.F&-65281|a<<8},function(a){a=a.call(this,this.F>>8&255,this.G>>8&255);this.F=this.F&-65281|a<<8},function(a){a=a.call(this,this.F>>8&255,this.H>>8&255);this.F=this.F&-65281|a<<8},function(a){a=a.call(this,this.F>>8&255,this.D>>8&255);this.F=this.F&-65281|a<<8},function(a){a=
        a.call(this,this.G>>8&255,this.F&255);this.G=this.G&-65281|a<<8},function(a){a=a.call(this,this.G>>8&255,this.G&255);this.G=this.G&-65281|a<<8},function(a){a=a.call(this,this.G>>8&255,this.H&255);this.G=this.G&-65281|a<<8},function(a){a=a.call(this,this.G>>8&255,this.D&255);this.G=this.G&-65281|a<<8},function(a){a=a.call(this,this.G>>8&255,this.F>>8&255);this.G=this.G&-65281|a<<8},function(a){a=a.call(this,this.G>>8&255,this.G>>8&255);this.G=this.G&-65281|a<<8},function(a){a=a.call(this,this.G>>8&
        255,this.H>>8&255);this.G=this.G&-65281|a<<8},function(a){a=a.call(this,this.G>>8&255,this.D>>8&255);this.G=this.G&-65281|a<<8},function(a){a=a.call(this,this.H>>8&255,this.F&255);this.H=this.H&-65281|a<<8},function(a){a=a.call(this,this.H>>8&255,this.G&255);this.H=this.H&-65281|a<<8},function(a){a=a.call(this,this.H>>8&255,this.H&255);this.H=this.H&-65281|a<<8},function(a){a=a.call(this,this.H>>8&255,this.D&255);this.H=this.H&-65281|a<<8},function(a){a=a.call(this,this.H>>8&255,this.F>>8&255);this.H=
        this.H&-65281|a<<8},function(a){a=a.call(this,this.H>>8&255,this.G>>8&255);this.H=this.H&-65281|a<<8},function(a){a=a.call(this,this.H>>8&255,this.H>>8&255);this.H=this.H&-65281|a<<8},function(a){a=a.call(this,this.H>>8&255,this.D>>8&255);this.H=this.H&-65281|a<<8},function(a){a=a.call(this,this.D>>8&255,this.F&255);this.D=this.D&-65281|a<<8},function(a){a=a.call(this,this.D>>8&255,this.G&255);this.D=this.D&-65281|a<<8},function(a){a=a.call(this,this.D>>8&255,this.H&255);this.D=this.D&-65281|a<<8},
        function(a){a=a.call(this,this.D>>8&255,this.D&255);this.D=this.D&-65281|a<<8},function(a){a=a.call(this,this.D>>8&255,this.F>>8&255);this.D=this.D&-65281|a<<8},function(a){a=a.call(this,this.D>>8&255,this.G>>8&255);this.D=this.D&-65281|a<<8},function(a){a=a.call(this,this.D>>8&255,this.H>>8&255);this.D=this.D&-65281|a<<8},function(a){a=a.call(this,this.D>>8&255,this.D>>8&255);this.D=this.D&-65281|a<<8}],Ld=[function(a){a=a.call(this,J(this,this.D+this.K),this.F&255);P(this,a);this.A-=this.B.Y},function(a){a=
        a.call(this,J(this,this.D+this.J),this.F&255);P(this,a);this.A-=this.B.Z},function(a){a=a.call(this,K(this,this.L+this.K),this.F&255);P(this,a);this.A-=this.B.Z},function(a){a=a.call(this,K(this,this.L+this.J),this.F&255);P(this,a);this.A-=this.B.Y},function(a){a=a.call(this,J(this,this.K),this.F&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,this.J),this.F&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,R(this)),this.F&255);P(this,a);this.A-=this.B.aa},function(a){a=
        a.call(this,J(this,this.D),this.F&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,this.D+this.K),this.G&255);P(this,a);this.A-=this.B.Y},function(a){a=a.call(this,J(this,this.D+this.J),this.G&255);P(this,a);this.A-=this.B.Z},function(a){a=a.call(this,K(this,this.L+this.K),this.G&255);P(this,a);this.A-=this.B.Z},function(a){a=a.call(this,K(this,this.L+this.J),this.G&255);P(this,a);this.A-=this.B.Y},function(a){a=a.call(this,J(this,this.K),this.G&255);P(this,a);this.A-=this.B.N},function(a){a=
        a.call(this,J(this,this.J),this.G&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,R(this)),this.G&255);P(this,a);this.A-=this.B.aa},function(a){a=a.call(this,J(this,this.D),this.G&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,this.D+this.K),this.H&255);P(this,a);this.A-=this.B.Y},function(a){a=a.call(this,J(this,this.D+this.J),this.H&255);P(this,a);this.A-=this.B.Z},function(a){a=a.call(this,K(this,this.L+this.K),this.H&255);P(this,a);this.A-=this.B.Z},function(a){a=
        a.call(this,K(this,this.L+this.J),this.H&255);P(this,a);this.A-=this.B.Y},function(a){a=a.call(this,J(this,this.K),this.H&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,this.J),this.H&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,R(this)),this.H&255);P(this,a);this.A-=this.B.aa},function(a){a=a.call(this,J(this,this.D),this.H&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,this.D+this.K),this.D&255);P(this,a);this.A-=this.B.Y},function(a){a=
        a.call(this,J(this,this.D+this.J),this.D&255);P(this,a);this.A-=this.B.Z},function(a){a=a.call(this,K(this,this.L+this.K),this.D&255);P(this,a);this.A-=this.B.Z},function(a){a=a.call(this,K(this,this.L+this.J),this.D&255);P(this,a);this.A-=this.B.Y},function(a){a=a.call(this,J(this,this.K),this.D&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,this.J),this.D&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,R(this)),this.D&255);P(this,a);this.A-=this.B.aa},function(a){a=
        a.call(this,J(this,this.D),this.D&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,this.D+this.K),this.F>>8&255);P(this,a);this.A-=this.B.Y},function(a){a=a.call(this,J(this,this.D+this.J),this.F>>8&255);P(this,a);this.A-=this.B.Z},function(a){a=a.call(this,K(this,this.L+this.K),this.F>>8&255);P(this,a);this.A-=this.B.Z},function(a){a=a.call(this,K(this,this.L+this.J),this.F>>8&255);P(this,a);this.A-=this.B.Y},function(a){a=a.call(this,J(this,this.K),this.F>>8&255);P(this,a);this.A-=
        this.B.N},function(a){a=a.call(this,J(this,this.J),this.F>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,R(this)),this.F>>8&255);P(this,a);this.A-=this.B.aa},function(a){a=a.call(this,J(this,this.D),this.F>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,this.D+this.K),this.G>>8&255);P(this,a);this.A-=this.B.Y},function(a){a=a.call(this,J(this,this.D+this.J),this.G>>8&255);P(this,a);this.A-=this.B.Z},function(a){a=a.call(this,K(this,this.L+this.K),this.G>>
        8&255);P(this,a);this.A-=this.B.Z},function(a){a=a.call(this,K(this,this.L+this.J),this.G>>8&255);P(this,a);this.A-=this.B.Y},function(a){a=a.call(this,J(this,this.K),this.G>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,this.J),this.G>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,R(this)),this.G>>8&255);P(this,a);this.A-=this.B.aa},function(a){a=a.call(this,J(this,this.D),this.G>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,this.D+
        this.K),this.H>>8&255);P(this,a);this.A-=this.B.Y},function(a){a=a.call(this,J(this,this.D+this.J),this.H>>8&255);P(this,a);this.A-=this.B.Z},function(a){a=a.call(this,K(this,this.L+this.K),this.H>>8&255);P(this,a);this.A-=this.B.Z},function(a){a=a.call(this,K(this,this.L+this.J),this.H>>8&255);P(this,a);this.A-=this.B.Y},function(a){a=a.call(this,J(this,this.K),this.H>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,this.J),this.H>>8&255);P(this,a);this.A-=this.B.N},function(a){a=
        a.call(this,J(this,R(this)),this.H>>8&255);P(this,a);this.A-=this.B.aa},function(a){a=a.call(this,J(this,this.D),this.H>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,this.D+this.K),this.D>>8&255);P(this,a);this.A-=this.B.Y},function(a){a=a.call(this,J(this,this.D+this.J),this.D>>8&255);P(this,a);this.A-=this.B.Z},function(a){a=a.call(this,K(this,this.L+this.K),this.D>>8&255);P(this,a);this.A-=this.B.Z},function(a){a=a.call(this,K(this,this.L+this.J),this.D>>8&255);P(this,a);
        this.A-=this.B.Y},function(a){a=a.call(this,J(this,this.K),this.D>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,this.J),this.D>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,R(this)),this.D>>8&255);P(this,a);this.A-=this.B.aa},function(a){a=a.call(this,J(this,this.D),this.D>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,this.D+this.K+this.M()),this.F&255);P(this,a);this.A-=this.B.O},function(a){a=a.call(this,J(this,this.D+this.J+this.M()),
        this.F&255);P(this,a);this.A-=this.B.P},function(a){a=a.call(this,K(this,this.L+this.K+this.M()),this.F&255);P(this,a);this.A-=this.B.P},function(a){a=a.call(this,K(this,this.L+this.J+this.M()),this.F&255);P(this,a);this.A-=this.B.O},function(a){a=a.call(this,J(this,this.K+this.M()),this.F&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.J+this.M()),this.F&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,K(this,this.L+this.M()),this.F&255);P(this,a);this.A-=this.B.I},
        function(a){a=a.call(this,J(this,this.D+this.M()),this.F&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.D+this.K+this.M()),this.G&255);P(this,a);this.A-=this.B.O},function(a){a=a.call(this,J(this,this.D+this.J+this.M()),this.G&255);P(this,a);this.A-=this.B.P},function(a){a=a.call(this,K(this,this.L+this.K+this.M()),this.G&255);P(this,a);this.A-=this.B.P},function(a){a=a.call(this,K(this,this.L+this.J+this.M()),this.G&255);P(this,a);this.A-=this.B.O},function(a){a=a.call(this,
        J(this,this.K+this.M()),this.G&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.J+this.M()),this.G&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,K(this,this.L+this.M()),this.G&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.D+this.M()),this.G&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.D+this.K+this.M()),this.H&255);P(this,a);this.A-=this.B.O},function(a){a=a.call(this,J(this,this.D+this.J+this.M()),this.H&255);P(this,
        a);this.A-=this.B.P},function(a){a=a.call(this,K(this,this.L+this.K+this.M()),this.H&255);P(this,a);this.A-=this.B.P},function(a){a=a.call(this,K(this,this.L+this.J+this.M()),this.H&255);P(this,a);this.A-=this.B.O},function(a){a=a.call(this,J(this,this.K+this.M()),this.H&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.J+this.M()),this.H&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,K(this,this.L+this.M()),this.H&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,
        J(this,this.D+this.M()),this.H&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.D+this.K+this.M()),this.D&255);P(this,a);this.A-=this.B.O},function(a){a=a.call(this,J(this,this.D+this.J+this.M()),this.D&255);P(this,a);this.A-=this.B.P},function(a){a=a.call(this,K(this,this.L+this.K+this.M()),this.D&255);P(this,a);this.A-=this.B.P},function(a){a=a.call(this,K(this,this.L+this.J+this.M()),this.D&255);P(this,a);this.A-=this.B.O},function(a){a=a.call(this,J(this,this.K+this.M()),
        this.D&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.J+this.M()),this.D&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,K(this,this.L+this.M()),this.D&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.D+this.M()),this.D&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.D+this.K+this.M()),this.F>>8&255);P(this,a);this.A-=this.B.O},function(a){a=a.call(this,J(this,this.D+this.J+this.M()),this.F>>8&255);P(this,a);this.A-=this.B.P},
        function(a){a=a.call(this,K(this,this.L+this.K+this.M()),this.F>>8&255);P(this,a);this.A-=this.B.P},function(a){a=a.call(this,K(this,this.L+this.J+this.M()),this.F>>8&255);P(this,a);this.A-=this.B.O},function(a){a=a.call(this,J(this,this.K+this.M()),this.F>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.J+this.M()),this.F>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,K(this,this.L+this.M()),this.F>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,
        J(this,this.D+this.M()),this.F>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.D+this.K+this.M()),this.G>>8&255);P(this,a);this.A-=this.B.O},function(a){a=a.call(this,J(this,this.D+this.J+this.M()),this.G>>8&255);P(this,a);this.A-=this.B.P},function(a){a=a.call(this,K(this,this.L+this.K+this.M()),this.G>>8&255);P(this,a);this.A-=this.B.P},function(a){a=a.call(this,K(this,this.L+this.J+this.M()),this.G>>8&255);P(this,a);this.A-=this.B.O},function(a){a=a.call(this,J(this,this.K+
        this.M()),this.G>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.J+this.M()),this.G>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,K(this,this.L+this.M()),this.G>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.D+this.M()),this.G>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.D+this.K+this.M()),this.H>>8&255);P(this,a);this.A-=this.B.O},function(a){a=a.call(this,J(this,this.D+this.J+this.M()),this.H>>8&255);
        P(this,a);this.A-=this.B.P},function(a){a=a.call(this,K(this,this.L+this.K+this.M()),this.H>>8&255);P(this,a);this.A-=this.B.P},function(a){a=a.call(this,K(this,this.L+this.J+this.M()),this.H>>8&255);P(this,a);this.A-=this.B.O},function(a){a=a.call(this,J(this,this.K+this.M()),this.H>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.J+this.M()),this.H>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,K(this,this.L+this.M()),this.H>>8&255);P(this,a);this.A-=this.B.I},
        function(a){a=a.call(this,J(this,this.D+this.M()),this.H>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.D+this.K+this.M()),this.D>>8&255);P(this,a);this.A-=this.B.O},function(a){a=a.call(this,J(this,this.D+this.J+this.M()),this.D>>8&255);P(this,a);this.A-=this.B.P},function(a){a=a.call(this,K(this,this.L+this.K+this.M()),this.D>>8&255);P(this,a);this.A-=this.B.P},function(a){a=a.call(this,K(this,this.L+this.J+this.M()),this.D>>8&255);P(this,a);this.A-=this.B.O},function(a){a=
        a.call(this,J(this,this.K+this.M()),this.D>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.J+this.M()),this.D>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,K(this,this.L+this.M()),this.D>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.D+this.M()),this.D>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.D+this.K+R(this)),this.F&255);P(this,a);this.A-=this.B.O},function(a){a=a.call(this,J(this,this.D+this.J+
        R(this)),this.F&255);P(this,a);this.A-=this.B.P},function(a){a=a.call(this,K(this,this.L+this.K+R(this)),this.F&255);P(this,a);this.A-=this.B.P},function(a){a=a.call(this,K(this,this.L+this.J+R(this)),this.F&255);P(this,a);this.A-=this.B.O},function(a){a=a.call(this,J(this,this.K+R(this)),this.F&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.J+R(this)),this.F&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,K(this,this.L+R(this)),this.F&255);P(this,a);this.A-=this.B.I},
        function(a){a=a.call(this,J(this,this.D+R(this)),this.F&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.D+this.K+R(this)),this.G&255);P(this,a);this.A-=this.B.O},function(a){a=a.call(this,J(this,this.D+this.J+R(this)),this.G&255);P(this,a);this.A-=this.B.P},function(a){a=a.call(this,K(this,this.L+this.K+R(this)),this.G&255);P(this,a);this.A-=this.B.P},function(a){a=a.call(this,K(this,this.L+this.J+R(this)),this.G&255);P(this,a);this.A-=this.B.O},function(a){a=a.call(this,J(this,
        this.K+R(this)),this.G&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.J+R(this)),this.G&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,K(this,this.L+R(this)),this.G&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.D+R(this)),this.G&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.D+this.K+R(this)),this.H&255);P(this,a);this.A-=this.B.O},function(a){a=a.call(this,J(this,this.D+this.J+R(this)),this.H&255);P(this,a);this.A-=
        this.B.P},function(a){a=a.call(this,K(this,this.L+this.K+R(this)),this.H&255);P(this,a);this.A-=this.B.P},function(a){a=a.call(this,K(this,this.L+this.J+R(this)),this.H&255);P(this,a);this.A-=this.B.O},function(a){a=a.call(this,J(this,this.K+R(this)),this.H&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.J+R(this)),this.H&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,K(this,this.L+R(this)),this.H&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,
        this.D+R(this)),this.H&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.D+this.K+R(this)),this.D&255);P(this,a);this.A-=this.B.O},function(a){a=a.call(this,J(this,this.D+this.J+R(this)),this.D&255);P(this,a);this.A-=this.B.P},function(a){a=a.call(this,K(this,this.L+this.K+R(this)),this.D&255);P(this,a);this.A-=this.B.P},function(a){a=a.call(this,K(this,this.L+this.J+R(this)),this.D&255);P(this,a);this.A-=this.B.O},function(a){a=a.call(this,J(this,this.K+R(this)),this.D&255);
        P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.J+R(this)),this.D&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,K(this,this.L+R(this)),this.D&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.D+R(this)),this.D&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.D+this.K+R(this)),this.F>>8&255);P(this,a);this.A-=this.B.O},function(a){a=a.call(this,J(this,this.D+this.J+R(this)),this.F>>8&255);P(this,a);this.A-=this.B.P},function(a){a=
        a.call(this,K(this,this.L+this.K+R(this)),this.F>>8&255);P(this,a);this.A-=this.B.P},function(a){a=a.call(this,K(this,this.L+this.J+R(this)),this.F>>8&255);P(this,a);this.A-=this.B.O},function(a){a=a.call(this,J(this,this.K+R(this)),this.F>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.J+R(this)),this.F>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,K(this,this.L+R(this)),this.F>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.D+R(this)),
        this.F>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.D+this.K+R(this)),this.G>>8&255);P(this,a);this.A-=this.B.O},function(a){a=a.call(this,J(this,this.D+this.J+R(this)),this.G>>8&255);P(this,a);this.A-=this.B.P},function(a){a=a.call(this,K(this,this.L+this.K+R(this)),this.G>>8&255);P(this,a);this.A-=this.B.P},function(a){a=a.call(this,K(this,this.L+this.J+R(this)),this.G>>8&255);P(this,a);this.A-=this.B.O},function(a){a=a.call(this,J(this,this.K+R(this)),this.G>>8&255);
        P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.J+R(this)),this.G>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,K(this,this.L+R(this)),this.G>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.D+R(this)),this.G>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.D+this.K+R(this)),this.H>>8&255);P(this,a);this.A-=this.B.O},function(a){a=a.call(this,J(this,this.D+this.J+R(this)),this.H>>8&255);P(this,a);this.A-=this.B.P},
        function(a){a=a.call(this,K(this,this.L+this.K+R(this)),this.H>>8&255);P(this,a);this.A-=this.B.P},function(a){a=a.call(this,K(this,this.L+this.J+R(this)),this.H>>8&255);P(this,a);this.A-=this.B.O},function(a){a=a.call(this,J(this,this.K+R(this)),this.H>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.J+R(this)),this.H>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,K(this,this.L+R(this)),this.H>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,
        this.D+R(this)),this.H>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.D+this.K+R(this)),this.D>>8&255);P(this,a);this.A-=this.B.O},function(a){a=a.call(this,J(this,this.D+this.J+R(this)),this.D>>8&255);P(this,a);this.A-=this.B.P},function(a){a=a.call(this,K(this,this.L+this.K+R(this)),this.D>>8&255);P(this,a);this.A-=this.B.P},function(a){a=a.call(this,K(this,this.L+this.J+R(this)),this.D>>8&255);P(this,a);this.A-=this.B.O},function(a){a=a.call(this,J(this,this.K+R(this)),
        this.D>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.J+R(this)),this.D>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,K(this,this.L+R(this)),this.D>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.D+R(this)),this.D>>8&255);P(this,a);this.A-=this.B.I},y[192],y[200],y[208],y[216],y[224],y[232],y[240],y[248],y[193],y[201],y[209],y[217],y[225],y[233],y[241],y[249],y[194],y[202],y[210],y[218],y[226],y[234],y[242],y[250],y[195],y[203],
        y[211],y[219],y[227],y[235],y[243],y[251],y[196],y[204],y[212],y[220],y[228],y[236],y[244],y[252],y[197],y[205],y[213],y[221],y[229],y[237],y[245],y[253],y[198],y[206],y[214],y[222],y[230],y[238],y[246],y[254],y[199],y[207],y[215],y[223],y[231],y[239],y[247],y[255]],Md=[function(a,b){var c=a[0].call(this,J(this,this.D+this.K),b.call(this));P(this,c);this.A-=this.B.Y},function(a,b){var c=a[0].call(this,J(this,this.D+this.J),b.call(this));P(this,c);this.A-=this.B.Z},function(a,b){var c=a[0].call(this,
        K(this,this.L+this.K),b.call(this));P(this,c);this.A-=this.B.Z},function(a,b){var c=a[0].call(this,K(this,this.L+this.J),b.call(this));P(this,c);this.A-=this.B.Y},function(a,b){var c=a[0].call(this,J(this,this.K),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[0].call(this,J(this,this.J),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[0].call(this,J(this,R(this)),b.call(this));P(this,c);this.A-=this.B.aa},function(a,b){var c=a[0].call(this,J(this,this.D),b.call(this));
        P(this,c);this.A-=this.B.N},function(a,b){var c=a[1].call(this,J(this,this.D+this.K),b.call(this));P(this,c);this.A-=this.B.Y},function(a,b){var c=a[1].call(this,J(this,this.D+this.J),b.call(this));P(this,c);this.A-=this.B.Z},function(a,b){var c=a[1].call(this,K(this,this.L+this.K),b.call(this));P(this,c);this.A-=this.B.Z},function(a,b){var c=a[1].call(this,K(this,this.L+this.J),b.call(this));P(this,c);this.A-=this.B.Y},function(a,b){var c=a[1].call(this,J(this,this.K),b.call(this));P(this,c);this.A-=
        this.B.N},function(a,b){var c=a[1].call(this,J(this,this.J),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[1].call(this,J(this,R(this)),b.call(this));P(this,c);this.A-=this.B.aa},function(a,b){var c=a[1].call(this,J(this,this.D),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[2].call(this,J(this,this.D+this.K),b.call(this));P(this,c);this.A-=this.B.Y},function(a,b){var c=a[2].call(this,J(this,this.D+this.J),b.call(this));P(this,c);this.A-=this.B.Z},function(a,b){var c=
        a[2].call(this,K(this,this.L+this.K),b.call(this));P(this,c);this.A-=this.B.Z},function(a,b){var c=a[2].call(this,K(this,this.L+this.J),b.call(this));P(this,c);this.A-=this.B.Y},function(a,b){var c=a[2].call(this,J(this,this.K),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[2].call(this,J(this,this.J),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[2].call(this,J(this,R(this)),b.call(this));P(this,c);this.A-=this.B.aa},function(a,b){var c=a[2].call(this,J(this,this.D),
        b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[3].call(this,J(this,this.D+this.K),b.call(this));P(this,c);this.A-=this.B.Y},function(a,b){var c=a[3].call(this,J(this,this.D+this.J),b.call(this));P(this,c);this.A-=this.B.Z},function(a,b){var c=a[3].call(this,K(this,this.L+this.K),b.call(this));P(this,c);this.A-=this.B.Z},function(a,b){var c=a[3].call(this,K(this,this.L+this.J),b.call(this));P(this,c);this.A-=this.B.Y},function(a,b){var c=a[3].call(this,J(this,this.K),b.call(this));
        P(this,c);this.A-=this.B.N},function(a,b){var c=a[3].call(this,J(this,this.J),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[3].call(this,J(this,R(this)),b.call(this));P(this,c);this.A-=this.B.aa},function(a,b){var c=a[3].call(this,J(this,this.D),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[4].call(this,J(this,this.D+this.K),b.call(this));P(this,c);this.A-=this.B.Y},function(a,b){var c=a[4].call(this,J(this,this.D+this.J),b.call(this));P(this,c);this.A-=this.B.Z},
        function(a,b){var c=a[4].call(this,K(this,this.L+this.K),b.call(this));P(this,c);this.A-=this.B.Z},function(a,b){var c=a[4].call(this,K(this,this.L+this.J),b.call(this));P(this,c);this.A-=this.B.Y},function(a,b){var c=a[4].call(this,J(this,this.K),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[4].call(this,J(this,this.J),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[4].call(this,J(this,R(this)),b.call(this));P(this,c);this.A-=this.B.aa},function(a,b){var c=a[4].call(this,
        J(this,this.D),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[5].call(this,J(this,this.D+this.K),b.call(this));P(this,c);this.A-=this.B.Y},function(a,b){var c=a[5].call(this,J(this,this.D+this.J),b.call(this));P(this,c);this.A-=this.B.Z},function(a,b){var c=a[5].call(this,K(this,this.L+this.K),b.call(this));P(this,c);this.A-=this.B.Z},function(a,b){var c=a[5].call(this,K(this,this.L+this.J),b.call(this));P(this,c);this.A-=this.B.Y},function(a,b){var c=a[5].call(this,J(this,this.K),
        b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[5].call(this,J(this,this.J),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[5].call(this,J(this,R(this)),b.call(this));P(this,c);this.A-=this.B.aa},function(a,b){var c=a[5].call(this,J(this,this.D),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[6].call(this,J(this,this.D+this.K),b.call(this));P(this,c);this.A-=this.B.Y},function(a,b){var c=a[6].call(this,J(this,this.D+this.J),b.call(this));P(this,c);this.A-=
        this.B.Z},function(a,b){var c=a[6].call(this,K(this,this.L+this.K),b.call(this));P(this,c);this.A-=this.B.Z},function(a,b){var c=a[6].call(this,K(this,this.L+this.J),b.call(this));P(this,c);this.A-=this.B.Y},function(a,b){var c=a[6].call(this,J(this,this.K),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[6].call(this,J(this,this.J),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[6].call(this,J(this,R(this)),b.call(this));P(this,c);this.A-=this.B.aa},function(a,b){var c=
        a[6].call(this,J(this,this.D),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[7].call(this,J(this,this.D+this.K),b.call(this));P(this,c);this.A-=this.B.Y},function(a,b){var c=a[7].call(this,J(this,this.D+this.J),b.call(this));P(this,c);this.A-=this.B.Z},function(a,b){var c=a[7].call(this,K(this,this.L+this.K),b.call(this));P(this,c);this.A-=this.B.Z},function(a,b){var c=a[7].call(this,K(this,this.L+this.J),b.call(this));P(this,c);this.A-=this.B.Y},function(a,b){var c=a[7].call(this,
        J(this,this.K),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[7].call(this,J(this,this.J),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[7].call(this,J(this,R(this)),b.call(this));P(this,c);this.A-=this.B.aa},function(a,b){var c=a[7].call(this,J(this,this.D),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[0].call(this,J(this,this.D+this.K+this.M()),b.call(this));P(this,c);this.A-=this.B.O},function(a,b){var c=a[0].call(this,J(this,this.D+this.J+this.M()),
        b.call(this));P(this,c);this.A-=this.B.P},function(a,b){var c=a[0].call(this,K(this,this.L+this.K+this.M()),b.call(this));P(this,c);this.A-=this.B.P},function(a,b){var c=a[0].call(this,K(this,this.L+this.J+this.M()),b.call(this));P(this,c);this.A-=this.B.O},function(a,b){var c=a[0].call(this,J(this,this.K+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,J(this,this.J+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,K(this,
        this.L+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,J(this,this.D+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,J(this,this.D+this.K+this.M()),b.call(this));P(this,c);this.A-=this.B.O},function(a,b){var c=a[1].call(this,J(this,this.D+this.J+this.M()),b.call(this));P(this,c);this.A-=this.B.P},function(a,b){var c=a[1].call(this,K(this,this.L+this.K+this.M()),b.call(this));P(this,c);this.A-=this.B.P},function(a,b){var c=
        a[1].call(this,K(this,this.L+this.J+this.M()),b.call(this));P(this,c);this.A-=this.B.O},function(a,b){var c=a[1].call(this,J(this,this.K+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,J(this,this.J+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,K(this,this.L+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,J(this,this.D+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,
        b){var c=a[2].call(this,J(this,this.D+this.K+this.M()),b.call(this));P(this,c);this.A-=this.B.O},function(a,b){var c=a[2].call(this,J(this,this.D+this.J+this.M()),b.call(this));P(this,c);this.A-=this.B.P},function(a,b){var c=a[2].call(this,K(this,this.L+this.K+this.M()),b.call(this));P(this,c);this.A-=this.B.P},function(a,b){var c=a[2].call(this,K(this,this.L+this.J+this.M()),b.call(this));P(this,c);this.A-=this.B.O},function(a,b){var c=a[2].call(this,J(this,this.K+this.M()),b.call(this));P(this,
        c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,J(this,this.J+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,K(this,this.L+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,J(this,this.D+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,J(this,this.D+this.K+this.M()),b.call(this));P(this,c);this.A-=this.B.O},function(a,b){var c=a[3].call(this,J(this,this.D+this.J+this.M()),b.call(this));
        P(this,c);this.A-=this.B.P},function(a,b){var c=a[3].call(this,K(this,this.L+this.K+this.M()),b.call(this));P(this,c);this.A-=this.B.P},function(a,b){var c=a[3].call(this,K(this,this.L+this.J+this.M()),b.call(this));P(this,c);this.A-=this.B.O},function(a,b){var c=a[3].call(this,J(this,this.K+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,J(this,this.J+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,K(this,this.L+this.M()),
        b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,J(this,this.D+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,J(this,this.D+this.K+this.M()),b.call(this));P(this,c);this.A-=this.B.O},function(a,b){var c=a[4].call(this,J(this,this.D+this.J+this.M()),b.call(this));P(this,c);this.A-=this.B.P},function(a,b){var c=a[4].call(this,K(this,this.L+this.K+this.M()),b.call(this));P(this,c);this.A-=this.B.P},function(a,b){var c=a[4].call(this,
        K(this,this.L+this.J+this.M()),b.call(this));P(this,c);this.A-=this.B.O},function(a,b){var c=a[4].call(this,J(this,this.K+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,J(this,this.J+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,K(this,this.L+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,J(this,this.D+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,
        J(this,this.D+this.K+this.M()),b.call(this));P(this,c);this.A-=this.B.O},function(a,b){var c=a[5].call(this,J(this,this.D+this.J+this.M()),b.call(this));P(this,c);this.A-=this.B.P},function(a,b){var c=a[5].call(this,K(this,this.L+this.K+this.M()),b.call(this));P(this,c);this.A-=this.B.P},function(a,b){var c=a[5].call(this,K(this,this.L+this.J+this.M()),b.call(this));P(this,c);this.A-=this.B.O},function(a,b){var c=a[5].call(this,J(this,this.K+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,
        b){var c=a[5].call(this,J(this,this.J+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,K(this,this.L+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,J(this,this.D+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,J(this,this.D+this.K+this.M()),b.call(this));P(this,c);this.A-=this.B.O},function(a,b){var c=a[6].call(this,J(this,this.D+this.J+this.M()),b.call(this));P(this,c);this.A-=this.B.P},
        function(a,b){var c=a[6].call(this,K(this,this.L+this.K+this.M()),b.call(this));P(this,c);this.A-=this.B.P},function(a,b){var c=a[6].call(this,K(this,this.L+this.J+this.M()),b.call(this));P(this,c);this.A-=this.B.O},function(a,b){var c=a[6].call(this,J(this,this.K+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,J(this,this.J+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,K(this,this.L+this.M()),b.call(this));P(this,c);
        this.A-=this.B.I},function(a,b){var c=a[6].call(this,J(this,this.D+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,J(this,this.D+this.K+this.M()),b.call(this));P(this,c);this.A-=this.B.O},function(a,b){var c=a[7].call(this,J(this,this.D+this.J+this.M()),b.call(this));P(this,c);this.A-=this.B.P},function(a,b){var c=a[7].call(this,K(this,this.L+this.K+this.M()),b.call(this));P(this,c);this.A-=this.B.P},function(a,b){var c=a[7].call(this,K(this,this.L+this.J+this.M()),
        b.call(this));P(this,c);this.A-=this.B.O},function(a,b){var c=a[7].call(this,J(this,this.K+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,J(this,this.J+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,K(this,this.L+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,J(this,this.D+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,J(this,this.D+this.K+
        R(this)),b.call(this));P(this,c);this.A-=this.B.O},function(a,b){var c=a[0].call(this,J(this,this.D+this.J+R(this)),b.call(this));P(this,c);this.A-=this.B.P},function(a,b){var c=a[0].call(this,K(this,this.L+this.K+R(this)),b.call(this));P(this,c);this.A-=this.B.P},function(a,b){var c=a[0].call(this,K(this,this.L+this.J+R(this)),b.call(this));P(this,c);this.A-=this.B.O},function(a,b){var c=a[0].call(this,J(this,this.K+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,
        J(this,this.J+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,K(this,this.L+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,J(this,this.D+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,J(this,this.D+this.K+R(this)),b.call(this));P(this,c);this.A-=this.B.O},function(a,b){var c=a[1].call(this,J(this,this.D+this.J+R(this)),b.call(this));P(this,c);this.A-=this.B.P},function(a,b){var c=a[1].call(this,
        K(this,this.L+this.K+R(this)),b.call(this));P(this,c);this.A-=this.B.P},function(a,b){var c=a[1].call(this,K(this,this.L+this.J+R(this)),b.call(this));P(this,c);this.A-=this.B.O},function(a,b){var c=a[1].call(this,J(this,this.K+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,J(this,this.J+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,K(this,this.L+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,
        J(this,this.D+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,J(this,this.D+this.K+R(this)),b.call(this));P(this,c);this.A-=this.B.O},function(a,b){var c=a[2].call(this,J(this,this.D+this.J+R(this)),b.call(this));P(this,c);this.A-=this.B.P},function(a,b){var c=a[2].call(this,K(this,this.L+this.K+R(this)),b.call(this));P(this,c);this.A-=this.B.P},function(a,b){var c=a[2].call(this,K(this,this.L+this.J+R(this)),b.call(this));P(this,c);this.A-=this.B.O},function(a,
        b){var c=a[2].call(this,J(this,this.K+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,J(this,this.J+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,K(this,this.L+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,J(this,this.D+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,J(this,this.D+this.K+R(this)),b.call(this));P(this,c);this.A-=this.B.O},function(a,
        b){var c=a[3].call(this,J(this,this.D+this.J+R(this)),b.call(this));P(this,c);this.A-=this.B.P},function(a,b){var c=a[3].call(this,K(this,this.L+this.K+R(this)),b.call(this));P(this,c);this.A-=this.B.P},function(a,b){var c=a[3].call(this,K(this,this.L+this.J+R(this)),b.call(this));P(this,c);this.A-=this.B.O},function(a,b){var c=a[3].call(this,J(this,this.K+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,J(this,this.J+R(this)),b.call(this));P(this,c);this.A-=this.B.I},
        function(a,b){var c=a[3].call(this,K(this,this.L+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,J(this,this.D+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,J(this,this.D+this.K+R(this)),b.call(this));P(this,c);this.A-=this.B.O},function(a,b){var c=a[4].call(this,J(this,this.D+this.J+R(this)),b.call(this));P(this,c);this.A-=this.B.P},function(a,b){var c=a[4].call(this,K(this,this.L+this.K+R(this)),b.call(this));P(this,c);
        this.A-=this.B.P},function(a,b){var c=a[4].call(this,K(this,this.L+this.J+R(this)),b.call(this));P(this,c);this.A-=this.B.O},function(a,b){var c=a[4].call(this,J(this,this.K+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,J(this,this.J+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,K(this,this.L+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,J(this,this.D+R(this)),b.call(this));P(this,
        c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,J(this,this.D+this.K+R(this)),b.call(this));P(this,c);this.A-=this.B.O},function(a,b){var c=a[5].call(this,J(this,this.D+this.J+R(this)),b.call(this));P(this,c);this.A-=this.B.P},function(a,b){var c=a[5].call(this,K(this,this.L+this.K+R(this)),b.call(this));P(this,c);this.A-=this.B.P},function(a,b){var c=a[5].call(this,K(this,this.L+this.J+R(this)),b.call(this));P(this,c);this.A-=this.B.O},function(a,b){var c=a[5].call(this,J(this,this.K+R(this)),
        b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,J(this,this.J+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,K(this,this.L+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,J(this,this.D+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,J(this,this.D+this.K+R(this)),b.call(this));P(this,c);this.A-=this.B.O},function(a,b){var c=a[6].call(this,J(this,this.D+this.J+
        R(this)),b.call(this));P(this,c);this.A-=this.B.P},function(a,b){var c=a[6].call(this,K(this,this.L+this.K+R(this)),b.call(this));P(this,c);this.A-=this.B.P},function(a,b){var c=a[6].call(this,K(this,this.L+this.J+R(this)),b.call(this));P(this,c);this.A-=this.B.O},function(a,b){var c=a[6].call(this,J(this,this.K+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,J(this,this.J+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,K(this,
        this.L+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,J(this,this.D+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,J(this,this.D+this.K+R(this)),b.call(this));P(this,c);this.A-=this.B.O},function(a,b){var c=a[7].call(this,J(this,this.D+this.J+R(this)),b.call(this));P(this,c);this.A-=this.B.P},function(a,b){var c=a[7].call(this,K(this,this.L+this.K+R(this)),b.call(this));P(this,c);this.A-=this.B.P},function(a,b){var c=a[7].call(this,
        K(this,this.L+this.J+R(this)),b.call(this));P(this,c);this.A-=this.B.O},function(a,b){var c=a[7].call(this,J(this,this.K+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,J(this,this.J+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,K(this,this.L+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,J(this,this.D+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,
        this.F&255,b.call(this));this.F=this.F&-256|c},function(a,b){var c=a[0].call(this,this.G&255,b.call(this));this.G=this.G&-256|c},function(a,b){var c=a[0].call(this,this.H&255,b.call(this));this.H=this.H&-256|c},function(a,b){var c=a[0].call(this,this.D&255,b.call(this));this.D=this.D&-256|c},function(a,b){var c=a[0].call(this,this.F>>8&255,b.call(this));this.F=this.F&-65281|c<<8},function(a,b){var c=a[0].call(this,this.G>>8&255,b.call(this));this.G=this.G&-65281|c<<8},function(a,b){var c=a[0].call(this,
        this.H>>8&255,b.call(this));this.H=this.H&-65281|c<<8},function(a,b){var c=a[0].call(this,this.D>>8&255,b.call(this));this.D=this.D&-65281|c<<8},function(a,b){var c=a[1].call(this,this.F&255,b.call(this));this.F=this.F&-256|c},function(a,b){var c=a[1].call(this,this.G&255,b.call(this));this.G=this.G&-256|c},function(a,b){var c=a[1].call(this,this.H&255,b.call(this));this.H=this.H&-256|c},function(a,b){var c=a[1].call(this,this.D&255,b.call(this));this.D=this.D&-256|c},function(a,b){var c=a[1].call(this,
        this.F>>8&255,b.call(this));this.F=this.F&-65281|c<<8},function(a,b){var c=a[1].call(this,this.G>>8&255,b.call(this));this.G=this.G&-65281|c<<8},function(a,b){var c=a[1].call(this,this.H>>8&255,b.call(this));this.H=this.H&-65281|c<<8},function(a,b){var c=a[1].call(this,this.D>>8&255,b.call(this));this.D=this.D&-65281|c<<8},function(a,b){var c=a[2].call(this,this.F&255,b.call(this));this.F=this.F&-256|c},function(a,b){var c=a[2].call(this,this.G&255,b.call(this));this.G=this.G&-256|c},function(a,b){var c=
        a[2].call(this,this.H&255,b.call(this));this.H=this.H&-256|c},function(a,b){var c=a[2].call(this,this.D&255,b.call(this));this.D=this.D&-256|c},function(a,b){var c=a[2].call(this,this.F>>8&255,b.call(this));this.F=this.F&-65281|c<<8},function(a,b){var c=a[2].call(this,this.G>>8&255,b.call(this));this.G=this.G&-65281|c<<8},function(a,b){var c=a[2].call(this,this.H>>8&255,b.call(this));this.H=this.H&-65281|c<<8},function(a,b){var c=a[2].call(this,this.D>>8&255,b.call(this));this.D=this.D&-65281|c<<
        8},function(a,b){var c=a[3].call(this,this.F&255,b.call(this));this.F=this.F&-256|c},function(a,b){var c=a[3].call(this,this.G&255,b.call(this));this.G=this.G&-256|c},function(a,b){var c=a[3].call(this,this.H&255,b.call(this));this.H=this.H&-256|c},function(a,b){var c=a[3].call(this,this.D&255,b.call(this));this.D=this.D&-256|c},function(a,b){var c=a[3].call(this,this.F>>8&255,b.call(this));this.F=this.F&-65281|c<<8},function(a,b){var c=a[3].call(this,this.G>>8&255,b.call(this));this.G=this.G&-65281|
        c<<8},function(a,b){var c=a[3].call(this,this.H>>8&255,b.call(this));this.H=this.H&-65281|c<<8},function(a,b){var c=a[3].call(this,this.D>>8&255,b.call(this));this.D=this.D&-65281|c<<8},function(a,b){var c=a[4].call(this,this.F&255,b.call(this));this.F=this.F&-256|c},function(a,b){var c=a[4].call(this,this.G&255,b.call(this));this.G=this.G&-256|c},function(a,b){var c=a[4].call(this,this.H&255,b.call(this));this.H=this.H&-256|c},function(a,b){var c=a[4].call(this,this.D&255,b.call(this));this.D=this.D&
        -256|c},function(a,b){var c=a[4].call(this,this.F>>8&255,b.call(this));this.F=this.F&-65281|c<<8},function(a,b){var c=a[4].call(this,this.G>>8&255,b.call(this));this.G=this.G&-65281|c<<8},function(a,b){var c=a[4].call(this,this.H>>8&255,b.call(this));this.H=this.H&-65281|c<<8},function(a,b){var c=a[4].call(this,this.D>>8&255,b.call(this));this.D=this.D&-65281|c<<8},function(a,b){var c=a[5].call(this,this.F&255,b.call(this));this.F=this.F&-256|c},function(a,b){var c=a[5].call(this,this.G&255,b.call(this));
        this.G=this.G&-256|c},function(a,b){var c=a[5].call(this,this.H&255,b.call(this));this.H=this.H&-256|c},function(a,b){var c=a[5].call(this,this.D&255,b.call(this));this.D=this.D&-256|c},function(a,b){var c=a[5].call(this,this.F>>8&255,b.call(this));this.F=this.F&-65281|c<<8},function(a,b){var c=a[5].call(this,this.G>>8&255,b.call(this));this.G=this.G&-65281|c<<8},function(a,b){var c=a[5].call(this,this.H>>8&255,b.call(this));this.H=this.H&-65281|c<<8},function(a,b){var c=a[5].call(this,this.D>>8&
        255,b.call(this));this.D=this.D&-65281|c<<8},function(a,b){var c=a[6].call(this,this.F&255,b.call(this));this.F=this.F&-256|c},function(a,b){var c=a[6].call(this,this.G&255,b.call(this));this.G=this.G&-256|c},function(a,b){var c=a[6].call(this,this.H&255,b.call(this));this.H=this.H&-256|c},function(a,b){var c=a[6].call(this,this.D&255,b.call(this));this.D=this.D&-256|c},function(a,b){var c=a[6].call(this,this.F>>8&255,b.call(this));this.F=this.F&-65281|c<<8},function(a,b){var c=a[6].call(this,this.G>>
        8&255,b.call(this));this.G=this.G&-65281|c<<8},function(a,b){var c=a[6].call(this,this.H>>8&255,b.call(this));this.H=this.H&-65281|c<<8},function(a,b){var c=a[6].call(this,this.D>>8&255,b.call(this));this.D=this.D&-65281|c<<8},function(a,b){var c=a[7].call(this,this.F&255,b.call(this));this.F=this.F&-256|c},function(a,b){var c=a[7].call(this,this.G&255,b.call(this));this.G=this.G&-256|c},function(a,b){var c=a[7].call(this,this.H&255,b.call(this));this.H=this.H&-256|c},function(a,b){var c=a[7].call(this,
        this.D&255,b.call(this));this.D=this.D&-256|c},function(a,b){var c=a[7].call(this,this.F>>8&255,b.call(this));this.F=this.F&-65281|c<<8},function(a,b){var c=a[7].call(this,this.G>>8&255,b.call(this));this.G=this.G&-65281|c<<8},function(a,b){var c=a[7].call(this,this.H>>8&255,b.call(this));this.H=this.H&-65281|c<<8},function(a,b){var c=a[7].call(this,this.D>>8&255,b.call(this));this.D=this.D&-65281|c<<8}],z=[function(a){a=a.call(this,this.F&this.C,H(this,this.D+this.K));this.F=this.F&~this.C|a;this.A-=
        this.B.Y},function(a){a=a.call(this,this.F&this.C,H(this,this.D+this.J));this.F=this.F&~this.C|a;this.A-=this.B.Z},function(a){a=a.call(this,this.F&this.C,I(this,this.L+this.K));this.F=this.F&~this.C|a;this.A-=this.B.Z},function(a){a=a.call(this,this.F&this.C,I(this,this.L+this.J));this.F=this.F&~this.C|a;this.A-=this.B.Y},function(a){a=a.call(this,this.F&this.C,H(this,this.K));this.F=this.F&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.F&this.C,H(this,this.J));this.F=this.F&~this.C|
        a;this.A-=this.B.N},function(a){a=a.call(this,this.F&this.C,H(this,R(this)));this.F=this.F&~this.C|a;this.A-=this.B.aa},function(a){a=a.call(this,this.F&this.C,H(this,this.D));this.F=this.F&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.G&this.C,H(this,this.D+this.K));this.G=this.G&~this.C|a;this.A-=this.B.Y},function(a){a=a.call(this,this.G&this.C,H(this,this.D+this.J));this.G=this.G&~this.C|a;this.A-=this.B.Z},function(a){a=a.call(this,this.G&this.C,I(this,this.L+this.K));this.G=this.G&
        ~this.C|a;this.A-=this.B.Z},function(a){a=a.call(this,this.G&this.C,I(this,this.L+this.J));this.G=this.G&~this.C|a;this.A-=this.B.Y},function(a){a=a.call(this,this.G&this.C,H(this,this.K));this.G=this.G&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.G&this.C,H(this,this.J));this.G=this.G&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.G&this.C,H(this,R(this)));this.G=this.G&~this.C|a;this.A-=this.B.aa},function(a){a=a.call(this,this.G&this.C,H(this,this.D));this.G=this.G&~this.C|
        a;this.A-=this.B.N},function(a){a=a.call(this,this.H&this.C,H(this,this.D+this.K));this.H=this.H&~this.C|a;this.A-=this.B.Y},function(a){a=a.call(this,this.H&this.C,H(this,this.D+this.J));this.H=this.H&~this.C|a;this.A-=this.B.Z},function(a){a=a.call(this,this.H&this.C,I(this,this.L+this.K));this.H=this.H&~this.C|a;this.A-=this.B.Z},function(a){a=a.call(this,this.H&this.C,I(this,this.L+this.J));this.H=this.H&~this.C|a;this.A-=this.B.Y},function(a){a=a.call(this,this.H&this.C,H(this,this.K));this.H=
        this.H&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.H&this.C,H(this,this.J));this.H=this.H&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.H&this.C,H(this,R(this)));this.H=this.H&~this.C|a;this.A-=this.B.aa},function(a){a=a.call(this,this.H&this.C,H(this,this.D));this.H=this.H&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.D&this.C,H(this,this.D+this.K));this.D=this.D&~this.C|a;this.A-=this.B.Y},function(a){a=a.call(this,this.D&this.C,H(this,this.D+this.J));this.D=
        this.D&~this.C|a;this.A-=this.B.Z},function(a){a=a.call(this,this.D&this.C,I(this,this.L+this.K));this.D=this.D&~this.C|a;this.A-=this.B.Z},function(a){a=a.call(this,this.D&this.C,I(this,this.L+this.J));this.D=this.D&~this.C|a;this.A-=this.B.Y},function(a){a=a.call(this,this.D&this.C,H(this,this.K));this.D=this.D&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.D&this.C,H(this,this.J));this.D=this.D&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.D&this.C,H(this,R(this)));this.D=
        this.D&~this.C|a;this.A-=this.B.aa},function(a){a=a.call(this,this.D&this.C,H(this,this.D));this.D=this.D&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,q(this)&this.C,H(this,this.D+this.K));t(this,q(this)&~this.C|a);this.A-=this.B.Y},function(a){a=a.call(this,q(this)&this.C,H(this,this.D+this.J));t(this,q(this)&~this.C|a);this.A-=this.B.Z},function(a){a=a.call(this,q(this)&this.C,I(this,this.L+this.K));t(this,q(this)&~this.C|a);this.A-=this.B.Z},function(a){a=a.call(this,q(this)&this.C,I(this,
        this.L+this.J));t(this,q(this)&~this.C|a);this.A-=this.B.Y},function(a){a=a.call(this,q(this)&this.C,H(this,this.K));t(this,q(this)&~this.C|a);this.A-=this.B.N},function(a){a=a.call(this,q(this)&this.C,H(this,this.J));t(this,q(this)&~this.C|a);this.A-=this.B.N},function(a){a=a.call(this,q(this)&this.C,H(this,R(this)));t(this,q(this)&~this.C|a);this.A-=this.B.aa},function(a){a=a.call(this,q(this)&this.C,H(this,this.D));t(this,q(this)&~this.C|a);this.A-=this.B.N},function(a){a=a.call(this,this.L&this.C,
        H(this,this.D+this.K));this.L=this.L&~this.C|a;this.A-=this.B.Y},function(a){a=a.call(this,this.L&this.C,H(this,this.D+this.J));this.L=this.L&~this.C|a;this.A-=this.B.Z},function(a){a=a.call(this,this.L&this.C,I(this,this.L+this.K));this.L=this.L&~this.C|a;this.A-=this.B.Z},function(a){a=a.call(this,this.L&this.C,I(this,this.L+this.J));this.L=this.L&~this.C|a;this.A-=this.B.Y},function(a){a=a.call(this,this.L&this.C,H(this,this.K));this.L=this.L&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,
        this.L&this.C,H(this,this.J));this.L=this.L&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.L&this.C,H(this,R(this)));this.L=this.L&~this.C|a;this.A-=this.B.aa},function(a){a=a.call(this,this.L&this.C,H(this,this.D));this.L=this.L&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.K&this.C,H(this,this.D+this.K));this.K=this.K&~this.C|a;this.A-=this.B.Y},function(a){a=a.call(this,this.K&this.C,H(this,this.D+this.J));this.K=this.K&~this.C|a;this.A-=this.B.Z},function(a){a=a.call(this,
        this.K&this.C,I(this,this.L+this.K));this.K=this.K&~this.C|a;this.A-=this.B.Z},function(a){a=a.call(this,this.K&this.C,I(this,this.L+this.J));this.K=this.K&~this.C|a;this.A-=this.B.Y},function(a){a=a.call(this,this.K&this.C,H(this,this.K));this.K=this.K&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.K&this.C,H(this,this.J));this.K=this.K&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.K&this.C,H(this,R(this)));this.K=this.K&~this.C|a;this.A-=this.B.aa},function(a){a=a.call(this,
        this.K&this.C,H(this,this.D));this.K=this.K&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.J&this.C,H(this,this.D+this.K));this.J=this.J&~this.C|a;this.A-=this.B.Y},function(a){a=a.call(this,this.J&this.C,H(this,this.D+this.J));this.J=this.J&~this.C|a;this.A-=this.B.Z},function(a){a=a.call(this,this.J&this.C,I(this,this.L+this.K));this.J=this.J&~this.C|a;this.A-=this.B.Z},function(a){a=a.call(this,this.J&this.C,I(this,this.L+this.J));this.J=this.J&~this.C|a;this.A-=this.B.Y},function(a){a=
        a.call(this,this.J&this.C,H(this,this.K));this.J=this.J&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.J&this.C,H(this,this.J));this.J=this.J&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.J&this.C,H(this,R(this)));this.J=this.J&~this.C|a;this.A-=this.B.aa},function(a){a=a.call(this,this.J&this.C,H(this,this.D));this.J=this.J&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.F&this.C,H(this,this.D+this.K+this.M()));this.F=this.F&~this.C|a;this.A-=this.B.O},function(a){a=
        a.call(this,this.F&this.C,H(this,this.D+this.J+this.M()));this.F=this.F&~this.C|a;this.A-=this.B.P},function(a){a=a.call(this,this.F&this.C,I(this,this.L+this.K+this.M()));this.F=this.F&~this.C|a;this.A-=this.B.P},function(a){a=a.call(this,this.F&this.C,I(this,this.L+this.J+this.M()));this.F=this.F&~this.C|a;this.A-=this.B.O},function(a){a=a.call(this,this.F&this.C,H(this,this.K+this.M()));this.F=this.F&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&this.C,H(this,this.J+this.M()));this.F=
        this.F&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&this.C,I(this,this.L+this.M()));this.F=this.F&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&this.C,H(this,this.D+this.M()));this.F=this.F&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&this.C,H(this,this.D+this.K+this.M()));this.G=this.G&~this.C|a;this.A-=this.B.O},function(a){a=a.call(this,this.G&this.C,H(this,this.D+this.J+this.M()));this.G=this.G&~this.C|a;this.A-=this.B.P},function(a){a=a.call(this,
        this.G&this.C,I(this,this.L+this.K+this.M()));this.G=this.G&~this.C|a;this.A-=this.B.P},function(a){a=a.call(this,this.G&this.C,I(this,this.L+this.J+this.M()));this.G=this.G&~this.C|a;this.A-=this.B.O},function(a){a=a.call(this,this.G&this.C,H(this,this.K+this.M()));this.G=this.G&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&this.C,H(this,this.J+this.M()));this.G=this.G&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&this.C,I(this,this.L+this.M()));this.G=this.G&~this.C|
        a;this.A-=this.B.I},function(a){a=a.call(this,this.G&this.C,H(this,this.D+this.M()));this.G=this.G&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&this.C,H(this,this.D+this.K+this.M()));this.H=this.H&~this.C|a;this.A-=this.B.O},function(a){a=a.call(this,this.H&this.C,H(this,this.D+this.J+this.M()));this.H=this.H&~this.C|a;this.A-=this.B.P},function(a){a=a.call(this,this.H&this.C,I(this,this.L+this.K+this.M()));this.H=this.H&~this.C|a;this.A-=this.B.P},function(a){a=a.call(this,this.H&
        this.C,I(this,this.L+this.J+this.M()));this.H=this.H&~this.C|a;this.A-=this.B.O},function(a){a=a.call(this,this.H&this.C,H(this,this.K+this.M()));this.H=this.H&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&this.C,H(this,this.J+this.M()));this.H=this.H&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&this.C,I(this,this.L+this.M()));this.H=this.H&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&this.C,H(this,this.D+this.M()));this.H=this.H&~this.C|a;this.A-=this.B.I},
        function(a){a=a.call(this,this.D&this.C,H(this,this.D+this.K+this.M()));this.D=this.D&~this.C|a;this.A-=this.B.O},function(a){a=a.call(this,this.D&this.C,H(this,this.D+this.J+this.M()));this.D=this.D&~this.C|a;this.A-=this.B.P},function(a){a=a.call(this,this.D&this.C,I(this,this.L+this.K+this.M()));this.D=this.D&~this.C|a;this.A-=this.B.P},function(a){a=a.call(this,this.D&this.C,I(this,this.L+this.J+this.M()));this.D=this.D&~this.C|a;this.A-=this.B.O},function(a){a=a.call(this,this.D&this.C,H(this,
        this.K+this.M()));this.D=this.D&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&this.C,H(this,this.J+this.M()));this.D=this.D&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&this.C,I(this,this.L+this.M()));this.D=this.D&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&this.C,H(this,this.D+this.M()));this.D=this.D&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,q(this)&this.C,H(this,this.D+this.K+this.M()));t(this,q(this)&~this.C|a);this.A-=this.B.O},function(a){a=
        a.call(this,q(this)&this.C,H(this,this.D+this.J+this.M()));t(this,q(this)&~this.C|a);this.A-=this.B.P},function(a){a=a.call(this,q(this)&this.C,I(this,this.L+this.K+this.M()));t(this,q(this)&~this.C|a);this.A-=this.B.P},function(a){a=a.call(this,q(this)&this.C,I(this,this.L+this.J+this.M()));t(this,q(this)&~this.C|a);this.A-=this.B.O},function(a){a=a.call(this,q(this)&this.C,H(this,this.K+this.M()));t(this,q(this)&~this.C|a);this.A-=this.B.I},function(a){a=a.call(this,q(this)&this.C,H(this,this.J+
        this.M()));t(this,q(this)&~this.C|a);this.A-=this.B.I},function(a){a=a.call(this,q(this)&this.C,I(this,this.L+this.M()));t(this,q(this)&~this.C|a);this.A-=this.B.I},function(a){a=a.call(this,q(this)&this.C,H(this,this.D+this.M()));t(this,q(this)&~this.C|a);this.A-=this.B.I},function(a){a=a.call(this,this.L&this.C,H(this,this.D+this.K+this.M()));this.L=this.L&~this.C|a;this.A-=this.B.O},function(a){a=a.call(this,this.L&this.C,H(this,this.D+this.J+this.M()));this.L=this.L&~this.C|a;this.A-=this.B.P},
        function(a){a=a.call(this,this.L&this.C,I(this,this.L+this.K+this.M()));this.L=this.L&~this.C|a;this.A-=this.B.P},function(a){a=a.call(this,this.L&this.C,I(this,this.L+this.J+this.M()));this.L=this.L&~this.C|a;this.A-=this.B.O},function(a){a=a.call(this,this.L&this.C,H(this,this.K+this.M()));this.L=this.L&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.L&this.C,H(this,this.J+this.M()));this.L=this.L&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.L&this.C,I(this,this.L+this.M()));
        this.L=this.L&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.L&this.C,H(this,this.D+this.M()));this.L=this.L&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.K&this.C,H(this,this.D+this.K+this.M()));this.K=this.K&~this.C|a;this.A-=this.B.O},function(a){a=a.call(this,this.K&this.C,H(this,this.D+this.J+this.M()));this.K=this.K&~this.C|a;this.A-=this.B.P},function(a){a=a.call(this,this.K&this.C,I(this,this.L+this.K+this.M()));this.K=this.K&~this.C|a;this.A-=this.B.P},function(a){a=
        a.call(this,this.K&this.C,I(this,this.L+this.J+this.M()));this.K=this.K&~this.C|a;this.A-=this.B.O},function(a){a=a.call(this,this.K&this.C,H(this,this.K+this.M()));this.K=this.K&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.K&this.C,H(this,this.J+this.M()));this.K=this.K&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.K&this.C,I(this,this.L+this.M()));this.K=this.K&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.K&this.C,H(this,this.D+this.M()));this.K=this.K&~this.C|
        a;this.A-=this.B.I},function(a){a=a.call(this,this.J&this.C,H(this,this.D+this.K+this.M()));this.J=this.J&~this.C|a;this.A-=this.B.O},function(a){a=a.call(this,this.J&this.C,H(this,this.D+this.J+this.M()));this.J=this.J&~this.C|a;this.A-=this.B.P},function(a){a=a.call(this,this.J&this.C,I(this,this.L+this.K+this.M()));this.J=this.J&~this.C|a;this.A-=this.B.P},function(a){a=a.call(this,this.J&this.C,I(this,this.L+this.J+this.M()));this.J=this.J&~this.C|a;this.A-=this.B.O},function(a){a=a.call(this,
        this.J&this.C,H(this,this.K+this.M()));this.J=this.J&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.J&this.C,H(this,this.J+this.M()));this.J=this.J&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.J&this.C,I(this,this.L+this.M()));this.J=this.J&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.J&this.C,H(this,this.D+this.M()));this.J=this.J&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&this.C,H(this,this.D+this.K+R(this)));this.F=this.F&~this.C|a;this.A-=
        this.B.O},function(a){a=a.call(this,this.F&this.C,H(this,this.D+this.J+R(this)));this.F=this.F&~this.C|a;this.A-=this.B.P},function(a){a=a.call(this,this.F&this.C,I(this,this.L+this.K+R(this)));this.F=this.F&~this.C|a;this.A-=this.B.P},function(a){a=a.call(this,this.F&this.C,I(this,this.L+this.J+R(this)));this.F=this.F&~this.C|a;this.A-=this.B.O},function(a){a=a.call(this,this.F&this.C,H(this,this.K+R(this)));this.F=this.F&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&this.C,H(this,
        this.J+R(this)));this.F=this.F&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&this.C,I(this,this.L+R(this)));this.F=this.F&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&this.C,H(this,this.D+R(this)));this.F=this.F&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&this.C,H(this,this.D+this.K+R(this)));this.G=this.G&~this.C|a;this.A-=this.B.O},function(a){a=a.call(this,this.G&this.C,H(this,this.D+this.J+R(this)));this.G=this.G&~this.C|a;this.A-=this.B.P},function(a){a=
        a.call(this,this.G&this.C,I(this,this.L+this.K+R(this)));this.G=this.G&~this.C|a;this.A-=this.B.P},function(a){a=a.call(this,this.G&this.C,I(this,this.L+this.J+R(this)));this.G=this.G&~this.C|a;this.A-=this.B.O},function(a){a=a.call(this,this.G&this.C,H(this,this.K+R(this)));this.G=this.G&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&this.C,H(this,this.J+R(this)));this.G=this.G&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&this.C,I(this,this.L+R(this)));this.G=this.G&
        ~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&this.C,H(this,this.D+R(this)));this.G=this.G&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&this.C,H(this,this.D+this.K+R(this)));this.H=this.H&~this.C|a;this.A-=this.B.O},function(a){a=a.call(this,this.H&this.C,H(this,this.D+this.J+R(this)));this.H=this.H&~this.C|a;this.A-=this.B.P},function(a){a=a.call(this,this.H&this.C,I(this,this.L+this.K+R(this)));this.H=this.H&~this.C|a;this.A-=this.B.P},function(a){a=a.call(this,this.H&
        this.C,I(this,this.L+this.J+R(this)));this.H=this.H&~this.C|a;this.A-=this.B.O},function(a){a=a.call(this,this.H&this.C,H(this,this.K+R(this)));this.H=this.H&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&this.C,H(this,this.J+R(this)));this.H=this.H&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&this.C,I(this,this.L+R(this)));this.H=this.H&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&this.C,H(this,this.D+R(this)));this.H=this.H&~this.C|a;this.A-=this.B.I},
        function(a){a=a.call(this,this.D&this.C,H(this,this.D+this.K+R(this)));this.D=this.D&~this.C|a;this.A-=this.B.O},function(a){a=a.call(this,this.D&this.C,H(this,this.D+this.J+R(this)));this.D=this.D&~this.C|a;this.A-=this.B.P},function(a){a=a.call(this,this.D&this.C,I(this,this.L+this.K+R(this)));this.D=this.D&~this.C|a;this.A-=this.B.P},function(a){a=a.call(this,this.D&this.C,I(this,this.L+this.J+R(this)));this.D=this.D&~this.C|a;this.A-=this.B.O},function(a){a=a.call(this,this.D&this.C,H(this,this.K+
        R(this)));this.D=this.D&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&this.C,H(this,this.J+R(this)));this.D=this.D&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&this.C,I(this,this.L+R(this)));this.D=this.D&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&this.C,H(this,this.D+R(this)));this.D=this.D&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,q(this)&this.C,H(this,this.D+this.K+R(this)));t(this,q(this)&~this.C|a);this.A-=this.B.O},function(a){a=a.call(this,
        q(this)&this.C,H(this,this.D+this.J+R(this)));t(this,q(this)&~this.C|a);this.A-=this.B.P},function(a){a=a.call(this,q(this)&this.C,I(this,this.L+this.K+R(this)));t(this,q(this)&~this.C|a);this.A-=this.B.P},function(a){a=a.call(this,q(this)&this.C,I(this,this.L+this.J+R(this)));t(this,q(this)&~this.C|a);this.A-=this.B.O},function(a){a=a.call(this,q(this)&this.C,H(this,this.K+R(this)));t(this,q(this)&~this.C|a);this.A-=this.B.I},function(a){a=a.call(this,q(this)&this.C,H(this,this.J+R(this)));t(this,
        q(this)&~this.C|a);this.A-=this.B.I},function(a){a=a.call(this,q(this)&this.C,I(this,this.L+R(this)));t(this,q(this)&~this.C|a);this.A-=this.B.I},function(a){a=a.call(this,q(this)&this.C,H(this,this.D+R(this)));t(this,q(this)&~this.C|a);this.A-=this.B.I},function(a){a=a.call(this,this.L&this.C,H(this,this.D+this.K+R(this)));this.L=this.L&~this.C|a;this.A-=this.B.O},function(a){a=a.call(this,this.L&this.C,H(this,this.D+this.J+R(this)));this.L=this.L&~this.C|a;this.A-=this.B.P},function(a){a=a.call(this,
        this.L&this.C,I(this,this.L+this.K+R(this)));this.L=this.L&~this.C|a;this.A-=this.B.P},function(a){a=a.call(this,this.L&this.C,I(this,this.L+this.J+R(this)));this.L=this.L&~this.C|a;this.A-=this.B.O},function(a){a=a.call(this,this.L&this.C,H(this,this.K+R(this)));this.L=this.L&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.L&this.C,H(this,this.J+R(this)));this.L=this.L&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.L&this.C,I(this,this.L+R(this)));this.L=this.L&~this.C|a;this.A-=
        this.B.I},function(a){a=a.call(this,this.L&this.C,H(this,this.D+R(this)));this.L=this.L&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.K&this.C,H(this,this.D+this.K+R(this)));this.K=this.K&~this.C|a;this.A-=this.B.O},function(a){a=a.call(this,this.K&this.C,H(this,this.D+this.J+R(this)));this.K=this.K&~this.C|a;this.A-=this.B.P},function(a){a=a.call(this,this.K&this.C,I(this,this.L+this.K+R(this)));this.K=this.K&~this.C|a;this.A-=this.B.P},function(a){a=a.call(this,this.K&this.C,I(this,
        this.L+this.J+R(this)));this.K=this.K&~this.C|a;this.A-=this.B.O},function(a){a=a.call(this,this.K&this.C,H(this,this.K+R(this)));this.K=this.K&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.K&this.C,H(this,this.J+R(this)));this.K=this.K&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.K&this.C,I(this,this.L+R(this)));this.K=this.K&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.K&this.C,H(this,this.D+R(this)));this.K=this.K&~this.C|a;this.A-=this.B.I},function(a){a=
        a.call(this,this.J&this.C,H(this,this.D+this.K+R(this)));this.J=this.J&~this.C|a;this.A-=this.B.O},function(a){a=a.call(this,this.J&this.C,H(this,this.D+this.J+R(this)));this.J=this.J&~this.C|a;this.A-=this.B.P},function(a){a=a.call(this,this.J&this.C,I(this,this.L+this.K+R(this)));this.J=this.J&~this.C|a;this.A-=this.B.P},function(a){a=a.call(this,this.J&this.C,I(this,this.L+this.J+R(this)));this.J=this.J&~this.C|a;this.A-=this.B.O},function(a){a=a.call(this,this.J&this.C,H(this,this.K+R(this)));
        this.J=this.J&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.J&this.C,H(this,this.J+R(this)));this.J=this.J&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.J&this.C,I(this,this.L+R(this)));this.J=this.J&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.J&this.C,H(this,this.D+R(this)));this.J=this.J&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&this.C,this.F&this.C);this.F=this.F&~this.C|a},function(a){a=a.call(this,this.F&this.C,this.G&this.C);this.F=
        this.F&~this.C|a},function(a){a=a.call(this,this.F&this.C,this.H&this.C);this.F=this.F&~this.C|a},function(a){a=a.call(this,this.F&this.C,this.D&this.C);this.F=this.F&~this.C|a},function(a){a=a.call(this,this.F&this.C,q(this)&this.C);this.F=this.F&~this.C|a},function(a){a=a.call(this,this.F&this.C,this.L&this.C);this.F=this.F&~this.C|a},function(a){a=a.call(this,this.F&this.C,this.K&this.C);this.F=this.F&~this.C|a},function(a){a=a.call(this,this.F&this.C,this.J&this.C);this.F=this.F&~this.C|a},function(a){a=
        a.call(this,this.G&this.C,this.F&this.C);this.G=this.G&~this.C|a},function(a){a=a.call(this,this.G&this.C,this.G&this.C);this.G=this.G&~this.C|a},function(a){a=a.call(this,this.G&this.C,this.H&this.C);this.G=this.G&~this.C|a},function(a){a=a.call(this,this.G&this.C,this.D&this.C);this.G=this.G&~this.C|a},function(a){a=a.call(this,this.G&this.C,q(this)&this.C);this.G=this.G&~this.C|a},function(a){a=a.call(this,this.G&this.C,this.L&this.C);this.G=this.G&~this.C|a},function(a){a=a.call(this,this.G&this.C,
        this.K&this.C);this.G=this.G&~this.C|a},function(a){a=a.call(this,this.G&this.C,this.J&this.C);this.G=this.G&~this.C|a},function(a){a=a.call(this,this.H&this.C,this.F&this.C);this.H=this.H&~this.C|a},function(a){a=a.call(this,this.H&this.C,this.G&this.C);this.H=this.H&~this.C|a},function(a){a=a.call(this,this.H&this.C,this.H&this.C);this.H=this.H&~this.C|a},function(a){a=a.call(this,this.H&this.C,this.D&this.C);this.H=this.H&~this.C|a},function(a){a=a.call(this,this.H&this.C,q(this)&this.C);this.H=
        this.H&~this.C|a},function(a){a=a.call(this,this.H&this.C,this.L&this.C);this.H=this.H&~this.C|a},function(a){a=a.call(this,this.H&this.C,this.K&this.C);this.H=this.H&~this.C|a},function(a){a=a.call(this,this.H&this.C,this.J&this.C);this.H=this.H&~this.C|a},function(a){a=a.call(this,this.D&this.C,this.F&this.C);this.D=this.D&~this.C|a},function(a){a=a.call(this,this.D&this.C,this.G&this.C);this.D=this.D&~this.C|a},function(a){a=a.call(this,this.D&this.C,this.H&this.C);this.D=this.D&~this.C|a},function(a){a=
        a.call(this,this.D&this.C,this.D&this.C);this.D=this.D&~this.C|a},function(a){a=a.call(this,this.D&this.C,q(this)&this.C);this.D=this.D&~this.C|a},function(a){a=a.call(this,this.D&this.C,this.L&this.C);this.D=this.D&~this.C|a},function(a){a=a.call(this,this.D&this.C,this.K&this.C);this.D=this.D&~this.C|a},function(a){a=a.call(this,this.D&this.C,this.J&this.C);this.D=this.D&~this.C|a},function(a){a=a.call(this,q(this)&this.C,this.F&this.C);t(this,q(this)&~this.C|a)},function(a){a=a.call(this,q(this)&
        this.C,this.G&this.C);t(this,q(this)&~this.C|a)},function(a){a=a.call(this,q(this)&this.C,this.H&this.C);t(this,q(this)&~this.C|a)},function(a){a=a.call(this,q(this)&this.C,this.D&this.C);t(this,q(this)&~this.C|a)},function(a){a=a.call(this,q(this)&this.C,q(this)&this.C);t(this,q(this)&~this.C|a)},function(a){a=a.call(this,q(this)&this.C,this.L&this.C);t(this,q(this)&~this.C|a)},function(a){a=a.call(this,q(this)&this.C,this.K&this.C);t(this,q(this)&~this.C|a)},function(a){a=a.call(this,q(this)&this.C,
        this.J&this.C);t(this,q(this)&~this.C|a)},function(a){a=a.call(this,this.L&this.C,this.F&this.C);this.L=this.L&~this.C|a},function(a){a=a.call(this,this.L&this.C,this.G&this.C);this.L=this.L&~this.C|a},function(a){a=a.call(this,this.L&this.C,this.H&this.C);this.L=this.L&~this.C|a},function(a){a=a.call(this,this.L&this.C,this.D&this.C);this.L=this.L&~this.C|a},function(a){a=a.call(this,this.L&this.C,q(this)&this.C);this.L=this.L&~this.C|a},function(a){a=a.call(this,this.L&this.C,this.L&this.C);this.L=
        this.L&~this.C|a},function(a){a=a.call(this,this.L&this.C,this.K&this.C);this.L=this.L&~this.C|a},function(a){a=a.call(this,this.L&this.C,this.J&this.C);this.L=this.L&~this.C|a},function(a){a=a.call(this,this.K&this.C,this.F&this.C);this.K=this.K&~this.C|a},function(a){a=a.call(this,this.K&this.C,this.G&this.C);this.K=this.K&~this.C|a},function(a){a=a.call(this,this.K&this.C,this.H&this.C);this.K=this.K&~this.C|a},function(a){a=a.call(this,this.K&this.C,this.D&this.C);this.K=this.K&~this.C|a},function(a){a=
        a.call(this,this.K&this.C,q(this)&this.C);this.K=this.K&~this.C|a},function(a){a=a.call(this,this.K&this.C,this.L&this.C);this.K=this.K&~this.C|a},function(a){a=a.call(this,this.K&this.C,this.K&this.C);this.K=this.K&~this.C|a},function(a){a=a.call(this,this.K&this.C,this.J&this.C);this.K=this.K&~this.C|a},function(a){a=a.call(this,this.J&this.C,this.F&this.C);this.J=this.J&~this.C|a},function(a){a=a.call(this,this.J&this.C,this.G&this.C);this.J=this.J&~this.C|a},function(a){a=a.call(this,this.J&this.C,
        this.H&this.C);this.J=this.J&~this.C|a},function(a){a=a.call(this,this.J&this.C,this.D&this.C);this.J=this.J&~this.C|a},function(a){a=a.call(this,this.J&this.C,q(this)&this.C);this.J=this.J&~this.C|a},function(a){a=a.call(this,this.J&this.C,this.L&this.C);this.J=this.J&~this.C|a},function(a){a=a.call(this,this.J&this.C,this.K&this.C);this.J=this.J&~this.C|a},function(a){a=a.call(this,this.J&this.C,this.J&this.C);this.J=this.J&~this.C|a}],Nd=[function(a){a=a.call(this,M(this,this.D+this.K),this.F&
        this.C);Q(this,a);this.A-=this.B.Y},function(a){a=a.call(this,M(this,this.D+this.J),this.F&this.C);Q(this,a);this.A-=this.B.Z},function(a){a=a.call(this,O(this,this.L+this.K),this.F&this.C);Q(this,a);this.A-=this.B.Z},function(a){a=a.call(this,O(this,this.L+this.J),this.F&this.C);Q(this,a);this.A-=this.B.Y},function(a){a=a.call(this,M(this,this.K),this.F&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,this.J),this.F&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,
        M(this,R(this)),this.F&this.C);Q(this,a);this.A-=this.B.aa},function(a){a=a.call(this,M(this,this.D),this.F&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,this.D+this.K),this.G&this.C);Q(this,a);this.A-=this.B.Y},function(a){a=a.call(this,M(this,this.D+this.J),this.G&this.C);Q(this,a);this.A-=this.B.Z},function(a){a=a.call(this,O(this,this.L+this.K),this.G&this.C);Q(this,a);this.A-=this.B.Z},function(a){a=a.call(this,O(this,this.L+this.J),this.G&this.C);Q(this,a);this.A-=this.B.Y},
        function(a){a=a.call(this,M(this,this.K),this.G&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,this.J),this.G&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,R(this)),this.G&this.C);Q(this,a);this.A-=this.B.aa},function(a){a=a.call(this,M(this,this.D),this.G&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,this.D+this.K),this.H&this.C);Q(this,a);this.A-=this.B.Y},function(a){a=a.call(this,M(this,this.D+this.J),this.H&this.C);Q(this,a);
        this.A-=this.B.Z},function(a){a=a.call(this,O(this,this.L+this.K),this.H&this.C);Q(this,a);this.A-=this.B.Z},function(a){a=a.call(this,O(this,this.L+this.J),this.H&this.C);Q(this,a);this.A-=this.B.Y},function(a){a=a.call(this,M(this,this.K),this.H&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,this.J),this.H&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,R(this)),this.H&this.C);Q(this,a);this.A-=this.B.aa},function(a){a=a.call(this,M(this,this.D),this.H&
        this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,this.D+this.K),this.D&this.C);Q(this,a);this.A-=this.B.Y},function(a){a=a.call(this,M(this,this.D+this.J),this.D&this.C);Q(this,a);this.A-=this.B.Z},function(a){a=a.call(this,O(this,this.L+this.K),this.D&this.C);Q(this,a);this.A-=this.B.Z},function(a){a=a.call(this,O(this,this.L+this.J),this.D&this.C);Q(this,a);this.A-=this.B.Y},function(a){a=a.call(this,M(this,this.K),this.D&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,
        M(this,this.J),this.D&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,R(this)),this.D&this.C);Q(this,a);this.A-=this.B.aa},function(a){a=a.call(this,M(this,this.D),this.D&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,this.D+this.K),q(this)&this.C);Q(this,a);this.A-=this.B.Y},function(a){a=a.call(this,M(this,this.D+this.J),q(this)&this.C);Q(this,a);this.A-=this.B.Z},function(a){a=a.call(this,O(this,this.L+this.K),q(this)&this.C);Q(this,a);this.A-=this.B.Z},
        function(a){a=a.call(this,O(this,this.L+this.J),q(this)&this.C);Q(this,a);this.A-=this.B.Y},function(a){a=a.call(this,M(this,this.K),q(this)&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,this.J),q(this)&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,R(this)),q(this)&this.C);Q(this,a);this.A-=this.B.aa},function(a){a=a.call(this,M(this,this.D),q(this)&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,this.D+this.K),this.L&this.C);Q(this,
        a);this.A-=this.B.Y},function(a){a=a.call(this,M(this,this.D+this.J),this.L&this.C);Q(this,a);this.A-=this.B.Z},function(a){a=a.call(this,O(this,this.L+this.K),this.L&this.C);Q(this,a);this.A-=this.B.Z},function(a){a=a.call(this,O(this,this.L+this.J),this.L&this.C);Q(this,a);this.A-=this.B.Y},function(a){a=a.call(this,M(this,this.K),this.L&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,this.J),this.L&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,R(this)),
        this.L&this.C);Q(this,a);this.A-=this.B.aa},function(a){a=a.call(this,M(this,this.D),this.L&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,this.D+this.K),this.K&this.C);Q(this,a);this.A-=this.B.Y},function(a){a=a.call(this,M(this,this.D+this.J),this.K&this.C);Q(this,a);this.A-=this.B.Z},function(a){a=a.call(this,O(this,this.L+this.K),this.K&this.C);Q(this,a);this.A-=this.B.Z},function(a){a=a.call(this,O(this,this.L+this.J),this.K&this.C);Q(this,a);this.A-=this.B.Y},function(a){a=
        a.call(this,M(this,this.K),this.K&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,this.J),this.K&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,R(this)),this.K&this.C);Q(this,a);this.A-=this.B.aa},function(a){a=a.call(this,M(this,this.D),this.K&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,this.D+this.K),this.J&this.C);Q(this,a);this.A-=this.B.Y},function(a){a=a.call(this,M(this,this.D+this.J),this.J&this.C);Q(this,a);this.A-=this.B.Z},
        function(a){a=a.call(this,O(this,this.L+this.K),this.J&this.C);Q(this,a);this.A-=this.B.Z},function(a){a=a.call(this,O(this,this.L+this.J),this.J&this.C);Q(this,a);this.A-=this.B.Y},function(a){a=a.call(this,M(this,this.K),this.J&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,this.J),this.J&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,R(this)),this.J&this.C);Q(this,a);this.A-=this.B.aa},function(a){a=a.call(this,M(this,this.D),this.J&this.C);Q(this,a);
        this.A-=this.B.N},function(a){a=a.call(this,M(this,this.D+this.K+this.M()),this.F&this.C);Q(this,a);this.A-=this.B.O},function(a){a=a.call(this,M(this,this.D+this.J+this.M()),this.F&this.C);Q(this,a);this.A-=this.B.P},function(a){a=a.call(this,O(this,this.L+this.K+this.M()),this.F&this.C);Q(this,a);this.A-=this.B.P},function(a){a=a.call(this,O(this,this.L+this.J+this.M()),this.F&this.C);Q(this,a);this.A-=this.B.O},function(a){a=a.call(this,M(this,this.K+this.M()),this.F&this.C);Q(this,a);this.A-=
        this.B.I},function(a){a=a.call(this,M(this,this.J+this.M()),this.F&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,O(this,this.L+this.M()),this.F&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.D+this.M()),this.F&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.D+this.K+this.M()),this.G&this.C);Q(this,a);this.A-=this.B.O},function(a){a=a.call(this,M(this,this.D+this.J+this.M()),this.G&this.C);Q(this,a);this.A-=this.B.P},function(a){a=
        a.call(this,O(this,this.L+this.K+this.M()),this.G&this.C);Q(this,a);this.A-=this.B.P},function(a){a=a.call(this,O(this,this.L+this.J+this.M()),this.G&this.C);Q(this,a);this.A-=this.B.O},function(a){a=a.call(this,M(this,this.K+this.M()),this.G&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.J+this.M()),this.G&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,O(this,this.L+this.M()),this.G&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.D+
        this.M()),this.G&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.D+this.K+this.M()),this.H&this.C);Q(this,a);this.A-=this.B.O},function(a){a=a.call(this,M(this,this.D+this.J+this.M()),this.H&this.C);Q(this,a);this.A-=this.B.P},function(a){a=a.call(this,O(this,this.L+this.K+this.M()),this.H&this.C);Q(this,a);this.A-=this.B.P},function(a){a=a.call(this,O(this,this.L+this.J+this.M()),this.H&this.C);Q(this,a);this.A-=this.B.O},function(a){a=a.call(this,M(this,this.K+this.M()),
        this.H&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.J+this.M()),this.H&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,O(this,this.L+this.M()),this.H&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.D+this.M()),this.H&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.D+this.K+this.M()),this.D&this.C);Q(this,a);this.A-=this.B.O},function(a){a=a.call(this,M(this,this.D+this.J+this.M()),this.D&this.C);Q(this,
        a);this.A-=this.B.P},function(a){a=a.call(this,O(this,this.L+this.K+this.M()),this.D&this.C);Q(this,a);this.A-=this.B.P},function(a){a=a.call(this,O(this,this.L+this.J+this.M()),this.D&this.C);Q(this,a);this.A-=this.B.O},function(a){a=a.call(this,M(this,this.K+this.M()),this.D&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.J+this.M()),this.D&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,O(this,this.L+this.M()),this.D&this.C);Q(this,a);this.A-=this.B.I},function(a){a=
        a.call(this,M(this,this.D+this.M()),this.D&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.D+this.K+this.M()),q(this)&this.C);Q(this,a);this.A-=this.B.O},function(a){a=a.call(this,M(this,this.D+this.J+this.M()),q(this)&this.C);Q(this,a);this.A-=this.B.P},function(a){a=a.call(this,O(this,this.L+this.K+this.M()),q(this)&this.C);Q(this,a);this.A-=this.B.P},function(a){a=a.call(this,O(this,this.L+this.J+this.M()),q(this)&this.C);Q(this,a);this.A-=this.B.O},function(a){a=a.call(this,
        M(this,this.K+this.M()),q(this)&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.J+this.M()),q(this)&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,O(this,this.L+this.M()),q(this)&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.D+this.M()),q(this)&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.D+this.K+this.M()),this.L&this.C);Q(this,a);this.A-=this.B.O},function(a){a=a.call(this,M(this,this.D+this.J+this.M()),
        this.L&this.C);Q(this,a);this.A-=this.B.P},function(a){a=a.call(this,O(this,this.L+this.K+this.M()),this.L&this.C);Q(this,a);this.A-=this.B.P},function(a){a=a.call(this,O(this,this.L+this.J+this.M()),this.L&this.C);Q(this,a);this.A-=this.B.O},function(a){a=a.call(this,M(this,this.K+this.M()),this.L&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.J+this.M()),this.L&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,O(this,this.L+this.M()),this.L&this.C);Q(this,
        a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.D+this.M()),this.L&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.D+this.K+this.M()),this.K&this.C);Q(this,a);this.A-=this.B.O},function(a){a=a.call(this,M(this,this.D+this.J+this.M()),this.K&this.C);Q(this,a);this.A-=this.B.P},function(a){a=a.call(this,O(this,this.L+this.K+this.M()),this.K&this.C);Q(this,a);this.A-=this.B.P},function(a){a=a.call(this,O(this,this.L+this.J+this.M()),this.K&this.C);Q(this,a);this.A-=
        this.B.O},function(a){a=a.call(this,M(this,this.K+this.M()),this.K&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.J+this.M()),this.K&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,O(this,this.L+this.M()),this.K&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.D+this.M()),this.K&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.D+this.K+this.M()),this.J&this.C);Q(this,a);this.A-=this.B.O},function(a){a=a.call(this,
        M(this,this.D+this.J+this.M()),this.J&this.C);Q(this,a);this.A-=this.B.P},function(a){a=a.call(this,O(this,this.L+this.K+this.M()),this.J&this.C);Q(this,a);this.A-=this.B.P},function(a){a=a.call(this,O(this,this.L+this.J+this.M()),this.J&this.C);Q(this,a);this.A-=this.B.O},function(a){a=a.call(this,M(this,this.K+this.M()),this.J&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.J+this.M()),this.J&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,O(this,this.L+this.M()),
        this.J&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.D+this.M()),this.J&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.D+this.K+R(this)),this.F&this.C);Q(this,a);this.A-=this.B.O},function(a){a=a.call(this,M(this,this.D+this.J+R(this)),this.F&this.C);Q(this,a);this.A-=this.B.P},function(a){a=a.call(this,O(this,this.L+this.K+R(this)),this.F&this.C);Q(this,a);this.A-=this.B.P},function(a){a=a.call(this,O(this,this.L+this.J+R(this)),this.F&this.C);
        Q(this,a);this.A-=this.B.O},function(a){a=a.call(this,M(this,this.K+R(this)),this.F&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.J+R(this)),this.F&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,O(this,this.L+R(this)),this.F&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.D+R(this)),this.F&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.D+this.K+R(this)),this.G&this.C);Q(this,a);this.A-=this.B.O},function(a){a=
        a.call(this,M(this,this.D+this.J+R(this)),this.G&this.C);Q(this,a);this.A-=this.B.P},function(a){a=a.call(this,O(this,this.L+this.K+R(this)),this.G&this.C);Q(this,a);this.A-=this.B.P},function(a){a=a.call(this,O(this,this.L+this.J+R(this)),this.G&this.C);Q(this,a);this.A-=this.B.O},function(a){a=a.call(this,M(this,this.K+R(this)),this.G&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.J+R(this)),this.G&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,O(this,this.L+
        R(this)),this.G&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.D+R(this)),this.G&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.D+this.K+R(this)),this.H&this.C);Q(this,a);this.A-=this.B.O},function(a){a=a.call(this,M(this,this.D+this.J+R(this)),this.H&this.C);Q(this,a);this.A-=this.B.P},function(a){a=a.call(this,O(this,this.L+this.K+R(this)),this.H&this.C);Q(this,a);this.A-=this.B.P},function(a){a=a.call(this,O(this,this.L+this.J+R(this)),this.H&
        this.C);Q(this,a);this.A-=this.B.O},function(a){a=a.call(this,M(this,this.K+R(this)),this.H&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.J+R(this)),this.H&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,O(this,this.L+R(this)),this.H&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.D+R(this)),this.H&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.D+this.K+R(this)),this.D&this.C);Q(this,a);this.A-=this.B.O},
        function(a){a=a.call(this,M(this,this.D+this.J+R(this)),this.D&this.C);Q(this,a);this.A-=this.B.P},function(a){a=a.call(this,O(this,this.L+this.K+R(this)),this.D&this.C);Q(this,a);this.A-=this.B.P},function(a){a=a.call(this,O(this,this.L+this.J+R(this)),this.D&this.C);Q(this,a);this.A-=this.B.O},function(a){a=a.call(this,M(this,this.K+R(this)),this.D&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.J+R(this)),this.D&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,
        O(this,this.L+R(this)),this.D&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.D+R(this)),this.D&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.D+this.K+R(this)),q(this)&this.C);Q(this,a);this.A-=this.B.O},function(a){a=a.call(this,M(this,this.D+this.J+R(this)),q(this)&this.C);Q(this,a);this.A-=this.B.P},function(a){a=a.call(this,O(this,this.L+this.K+R(this)),q(this)&this.C);Q(this,a);this.A-=this.B.P},function(a){a=a.call(this,O(this,this.L+this.J+
        R(this)),q(this)&this.C);Q(this,a);this.A-=this.B.O},function(a){a=a.call(this,M(this,this.K+R(this)),q(this)&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.J+R(this)),q(this)&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,O(this,this.L+R(this)),q(this)&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.D+R(this)),q(this)&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.D+this.K+R(this)),this.L&this.C);Q(this,
        a);this.A-=this.B.O},function(a){a=a.call(this,M(this,this.D+this.J+R(this)),this.L&this.C);Q(this,a);this.A-=this.B.P},function(a){a=a.call(this,O(this,this.L+this.K+R(this)),this.L&this.C);Q(this,a);this.A-=this.B.P},function(a){a=a.call(this,O(this,this.L+this.J+R(this)),this.L&this.C);Q(this,a);this.A-=this.B.O},function(a){a=a.call(this,M(this,this.K+R(this)),this.L&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.J+R(this)),this.L&this.C);Q(this,a);this.A-=this.B.I},
        function(a){a=a.call(this,O(this,this.L+R(this)),this.L&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.D+R(this)),this.L&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.D+this.K+R(this)),this.K&this.C);Q(this,a);this.A-=this.B.O},function(a){a=a.call(this,M(this,this.D+this.J+R(this)),this.K&this.C);Q(this,a);this.A-=this.B.P},function(a){a=a.call(this,O(this,this.L+this.K+R(this)),this.K&this.C);Q(this,a);this.A-=this.B.P},function(a){a=a.call(this,
        O(this,this.L+this.J+R(this)),this.K&this.C);Q(this,a);this.A-=this.B.O},function(a){a=a.call(this,M(this,this.K+R(this)),this.K&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.J+R(this)),this.K&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,O(this,this.L+R(this)),this.K&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.D+R(this)),this.K&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.D+this.K+R(this)),this.J&
        this.C);Q(this,a);this.A-=this.B.O},function(a){a=a.call(this,M(this,this.D+this.J+R(this)),this.J&this.C);Q(this,a);this.A-=this.B.P},function(a){a=a.call(this,O(this,this.L+this.K+R(this)),this.J&this.C);Q(this,a);this.A-=this.B.P},function(a){a=a.call(this,O(this,this.L+this.J+R(this)),this.J&this.C);Q(this,a);this.A-=this.B.O},function(a){a=a.call(this,M(this,this.K+R(this)),this.J&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.J+R(this)),this.J&this.C);Q(this,a);this.A-=
        this.B.I},function(a){a=a.call(this,O(this,this.L+R(this)),this.J&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.D+R(this)),this.J&this.C);Q(this,a);this.A-=this.B.I},z[192],z[200],z[208],z[216],z[224],z[232],z[240],z[248],z[193],z[201],z[209],z[217],z[225],z[233],z[241],z[249],z[194],z[202],z[210],z[218],z[226],z[234],z[242],z[250],z[195],z[203],z[211],z[219],z[227],z[235],z[243],z[251],z[196],z[204],z[212],z[220],z[228],z[236],z[244],z[252],z[197],z[205],z[213],z[221],
        z[229],z[237],z[245],z[253],z[198],z[206],z[214],z[222],z[230],z[238],z[246],z[254],z[199],z[207],z[215],z[223],z[231],z[239],z[247],z[255]],Od=[function(a,b){var c=a[0].call(this,M(this,this.D+this.K),b.call(this));Q(this,c);this.A-=this.B.Y},function(a,b){var c=a[0].call(this,M(this,this.D+this.J),b.call(this));Q(this,c);this.A-=this.B.Z},function(a,b){var c=a[0].call(this,O(this,this.L+this.K),b.call(this));Q(this,c);this.A-=this.B.Z},function(a,b){var c=a[0].call(this,O(this,this.L+this.J),b.call(this));
        Q(this,c);this.A-=this.B.Y},function(a,b){var c=a[0].call(this,M(this,this.K),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[0].call(this,M(this,this.J),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[0].call(this,M(this,R(this)),b.call(this));Q(this,c);this.A-=this.B.aa},function(a,b){var c=a[0].call(this,M(this,this.D),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[1].call(this,M(this,this.D+this.K),b.call(this));Q(this,c);this.A-=this.B.Y},function(a,
        b){var c=a[1].call(this,M(this,this.D+this.J),b.call(this));Q(this,c);this.A-=this.B.Z},function(a,b){var c=a[1].call(this,O(this,this.L+this.K),b.call(this));Q(this,c);this.A-=this.B.Z},function(a,b){var c=a[1].call(this,O(this,this.L+this.J),b.call(this));Q(this,c);this.A-=this.B.Y},function(a,b){var c=a[1].call(this,M(this,this.K),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[1].call(this,M(this,this.J),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[1].call(this,
        M(this,R(this)),b.call(this));Q(this,c);this.A-=this.B.aa},function(a,b){var c=a[1].call(this,M(this,this.D),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[2].call(this,M(this,this.D+this.K),b.call(this));Q(this,c);this.A-=this.B.Y},function(a,b){var c=a[2].call(this,M(this,this.D+this.J),b.call(this));Q(this,c);this.A-=this.B.Z},function(a,b){var c=a[2].call(this,O(this,this.L+this.K),b.call(this));Q(this,c);this.A-=this.B.Z},function(a,b){var c=a[2].call(this,O(this,this.L+this.J),
        b.call(this));Q(this,c);this.A-=this.B.Y},function(a,b){var c=a[2].call(this,M(this,this.K),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[2].call(this,M(this,this.J),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[2].call(this,M(this,R(this)),b.call(this));Q(this,c);this.A-=this.B.aa},function(a,b){var c=a[2].call(this,M(this,this.D),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[3].call(this,M(this,this.D+this.K),b.call(this));Q(this,c);this.A-=
        this.B.Y},function(a,b){var c=a[3].call(this,M(this,this.D+this.J),b.call(this));Q(this,c);this.A-=this.B.Z},function(a,b){var c=a[3].call(this,O(this,this.L+this.K),b.call(this));Q(this,c);this.A-=this.B.Z},function(a,b){var c=a[3].call(this,O(this,this.L+this.J),b.call(this));Q(this,c);this.A-=this.B.Y},function(a,b){var c=a[3].call(this,M(this,this.K),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[3].call(this,M(this,this.J),b.call(this));Q(this,c);this.A-=this.B.N},function(a,
        b){var c=a[3].call(this,M(this,R(this)),b.call(this));Q(this,c);this.A-=this.B.aa},function(a,b){var c=a[3].call(this,M(this,this.D),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[4].call(this,M(this,this.D+this.K),b.call(this));Q(this,c);this.A-=this.B.Y},function(a,b){var c=a[4].call(this,M(this,this.D+this.J),b.call(this));Q(this,c);this.A-=this.B.Z},function(a,b){var c=a[4].call(this,O(this,this.L+this.K),b.call(this));Q(this,c);this.A-=this.B.Z},function(a,b){var c=a[4].call(this,
        O(this,this.L+this.J),b.call(this));Q(this,c);this.A-=this.B.Y},function(a,b){var c=a[4].call(this,M(this,this.K),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[4].call(this,M(this,this.J),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[4].call(this,M(this,R(this)),b.call(this));Q(this,c);this.A-=this.B.aa},function(a,b){var c=a[4].call(this,M(this,this.D),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[5].call(this,M(this,this.D+this.K),b.call(this));
        Q(this,c);this.A-=this.B.Y},function(a,b){var c=a[5].call(this,M(this,this.D+this.J),b.call(this));Q(this,c);this.A-=this.B.Z},function(a,b){var c=a[5].call(this,O(this,this.L+this.K),b.call(this));Q(this,c);this.A-=this.B.Z},function(a,b){var c=a[5].call(this,O(this,this.L+this.J),b.call(this));Q(this,c);this.A-=this.B.Y},function(a,b){var c=a[5].call(this,M(this,this.K),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[5].call(this,M(this,this.J),b.call(this));Q(this,c);this.A-=this.B.N},
        function(a,b){var c=a[5].call(this,M(this,R(this)),b.call(this));Q(this,c);this.A-=this.B.aa},function(a,b){var c=a[5].call(this,M(this,this.D),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[6].call(this,M(this,this.D+this.K),b.call(this));Q(this,c);this.A-=this.B.Y},function(a,b){var c=a[6].call(this,M(this,this.D+this.J),b.call(this));Q(this,c);this.A-=this.B.Z},function(a,b){var c=a[6].call(this,O(this,this.L+this.K),b.call(this));Q(this,c);this.A-=this.B.Z},function(a,b){var c=
        a[6].call(this,O(this,this.L+this.J),b.call(this));Q(this,c);this.A-=this.B.Y},function(a,b){var c=a[6].call(this,M(this,this.K),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[6].call(this,M(this,this.J),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[6].call(this,M(this,R(this)),b.call(this));Q(this,c);this.A-=this.B.aa},function(a,b){var c=a[6].call(this,M(this,this.D),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[7].call(this,M(this,this.D+this.K),
        b.call(this));Q(this,c);this.A-=this.B.Y},function(a,b){var c=a[7].call(this,M(this,this.D+this.J),b.call(this));Q(this,c);this.A-=this.B.Z},function(a,b){var c=a[7].call(this,O(this,this.L+this.K),b.call(this));Q(this,c);this.A-=this.B.Z},function(a,b){var c=a[7].call(this,O(this,this.L+this.J),b.call(this));Q(this,c);this.A-=this.B.Y},function(a,b){var c=a[7].call(this,M(this,this.K),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[7].call(this,M(this,this.J),b.call(this));Q(this,
        c);this.A-=this.B.N},function(a,b){var c=a[7].call(this,M(this,R(this)),b.call(this));Q(this,c);this.A-=this.B.aa},function(a,b){var c=a[7].call(this,M(this,this.D),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[0].call(this,M(this,this.D+this.K+this.M()),b.call(this));Q(this,c);this.A-=this.B.O},function(a,b){var c=a[0].call(this,M(this,this.D+this.J+this.M()),b.call(this));Q(this,c);this.A-=this.B.P},function(a,b){var c=a[0].call(this,O(this,this.L+this.K+this.M()),b.call(this));
        Q(this,c);this.A-=this.B.P},function(a,b){var c=a[0].call(this,O(this,this.L+this.J+this.M()),b.call(this));Q(this,c);this.A-=this.B.O},function(a,b){var c=a[0].call(this,M(this,this.K+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,M(this,this.J+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,O(this,this.L+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,M(this,this.D+this.M()),b.call(this));
        Q(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,M(this,this.D+this.K+this.M()),b.call(this));Q(this,c);this.A-=this.B.O},function(a,b){var c=a[1].call(this,M(this,this.D+this.J+this.M()),b.call(this));Q(this,c);this.A-=this.B.P},function(a,b){var c=a[1].call(this,O(this,this.L+this.K+this.M()),b.call(this));Q(this,c);this.A-=this.B.P},function(a,b){var c=a[1].call(this,O(this,this.L+this.J+this.M()),b.call(this));Q(this,c);this.A-=this.B.O},function(a,b){var c=a[1].call(this,M(this,
        this.K+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,M(this,this.J+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,O(this,this.L+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,M(this,this.D+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,M(this,this.D+this.K+this.M()),b.call(this));Q(this,c);this.A-=this.B.O},function(a,b){var c=a[2].call(this,
        M(this,this.D+this.J+this.M()),b.call(this));Q(this,c);this.A-=this.B.P},function(a,b){var c=a[2].call(this,O(this,this.L+this.K+this.M()),b.call(this));Q(this,c);this.A-=this.B.P},function(a,b){var c=a[2].call(this,O(this,this.L+this.J+this.M()),b.call(this));Q(this,c);this.A-=this.B.O},function(a,b){var c=a[2].call(this,M(this,this.K+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,M(this,this.J+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,
        b){var c=a[2].call(this,O(this,this.L+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,M(this,this.D+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,M(this,this.D+this.K+this.M()),b.call(this));Q(this,c);this.A-=this.B.O},function(a,b){var c=a[3].call(this,M(this,this.D+this.J+this.M()),b.call(this));Q(this,c);this.A-=this.B.P},function(a,b){var c=a[3].call(this,O(this,this.L+this.K+this.M()),b.call(this));Q(this,c);this.A-=
        this.B.P},function(a,b){var c=a[3].call(this,O(this,this.L+this.J+this.M()),b.call(this));Q(this,c);this.A-=this.B.O},function(a,b){var c=a[3].call(this,M(this,this.K+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,M(this,this.J+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,O(this,this.L+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,M(this,this.D+this.M()),b.call(this));Q(this,
        c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,M(this,this.D+this.K+this.M()),b.call(this));Q(this,c);this.A-=this.B.O},function(a,b){var c=a[4].call(this,M(this,this.D+this.J+this.M()),b.call(this));Q(this,c);this.A-=this.B.P},function(a,b){var c=a[4].call(this,O(this,this.L+this.K+this.M()),b.call(this));Q(this,c);this.A-=this.B.P},function(a,b){var c=a[4].call(this,O(this,this.L+this.J+this.M()),b.call(this));Q(this,c);this.A-=this.B.O},function(a,b){var c=a[4].call(this,M(this,this.K+
        this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,M(this,this.J+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,O(this,this.L+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,M(this,this.D+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,M(this,this.D+this.K+this.M()),b.call(this));Q(this,c);this.A-=this.B.O},function(a,b){var c=a[5].call(this,M(this,
        this.D+this.J+this.M()),b.call(this));Q(this,c);this.A-=this.B.P},function(a,b){var c=a[5].call(this,O(this,this.L+this.K+this.M()),b.call(this));Q(this,c);this.A-=this.B.P},function(a,b){var c=a[5].call(this,O(this,this.L+this.J+this.M()),b.call(this));Q(this,c);this.A-=this.B.O},function(a,b){var c=a[5].call(this,M(this,this.K+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,M(this,this.J+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=
        a[5].call(this,O(this,this.L+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,M(this,this.D+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,M(this,this.D+this.K+this.M()),b.call(this));Q(this,c);this.A-=this.B.O},function(a,b){var c=a[6].call(this,M(this,this.D+this.J+this.M()),b.call(this));Q(this,c);this.A-=this.B.P},function(a,b){var c=a[6].call(this,O(this,this.L+this.K+this.M()),b.call(this));Q(this,c);this.A-=this.B.P},
        function(a,b){var c=a[6].call(this,O(this,this.L+this.J+this.M()),b.call(this));Q(this,c);this.A-=this.B.O},function(a,b){var c=a[6].call(this,M(this,this.K+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,M(this,this.J+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,O(this,this.L+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,M(this,this.D+this.M()),b.call(this));Q(this,c);this.A-=
        this.B.I},function(a,b){var c=a[7].call(this,M(this,this.D+this.K+this.M()),b.call(this));Q(this,c);this.A-=this.B.O},function(a,b){var c=a[7].call(this,M(this,this.D+this.J+this.M()),b.call(this));Q(this,c);this.A-=this.B.P},function(a,b){var c=a[7].call(this,O(this,this.L+this.K+this.M()),b.call(this));Q(this,c);this.A-=this.B.P},function(a,b){var c=a[7].call(this,O(this,this.L+this.J+this.M()),b.call(this));Q(this,c);this.A-=this.B.O},function(a,b){var c=a[7].call(this,M(this,this.K+this.M()),
        b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,M(this,this.J+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,O(this,this.L+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,M(this,this.D+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,M(this,this.D+this.K+R(this)),b.call(this));Q(this,c);this.A-=this.B.O},function(a,b){var c=a[0].call(this,M(this,this.D+
        this.J+R(this)),b.call(this));Q(this,c);this.A-=this.B.P},function(a,b){var c=a[0].call(this,O(this,this.L+this.K+R(this)),b.call(this));Q(this,c);this.A-=this.B.P},function(a,b){var c=a[0].call(this,O(this,this.L+this.J+R(this)),b.call(this));Q(this,c);this.A-=this.B.O},function(a,b){var c=a[0].call(this,M(this,this.K+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,M(this,this.J+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,
        O(this,this.L+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,M(this,this.D+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,M(this,this.D+this.K+R(this)),b.call(this));Q(this,c);this.A-=this.B.O},function(a,b){var c=a[1].call(this,M(this,this.D+this.J+R(this)),b.call(this));Q(this,c);this.A-=this.B.P},function(a,b){var c=a[1].call(this,O(this,this.L+this.K+R(this)),b.call(this));Q(this,c);this.A-=this.B.P},function(a,b){var c=
        a[1].call(this,O(this,this.L+this.J+R(this)),b.call(this));Q(this,c);this.A-=this.B.O},function(a,b){var c=a[1].call(this,M(this,this.K+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,M(this,this.J+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,O(this,this.L+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,M(this,this.D+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=
        a[2].call(this,M(this,this.D+this.K+R(this)),b.call(this));Q(this,c);this.A-=this.B.O},function(a,b){var c=a[2].call(this,M(this,this.D+this.J+R(this)),b.call(this));Q(this,c);this.A-=this.B.P},function(a,b){var c=a[2].call(this,O(this,this.L+this.K+R(this)),b.call(this));Q(this,c);this.A-=this.B.P},function(a,b){var c=a[2].call(this,O(this,this.L+this.J+R(this)),b.call(this));Q(this,c);this.A-=this.B.O},function(a,b){var c=a[2].call(this,M(this,this.K+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},
        function(a,b){var c=a[2].call(this,M(this,this.J+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,O(this,this.L+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,M(this,this.D+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,M(this,this.D+this.K+R(this)),b.call(this));Q(this,c);this.A-=this.B.O},function(a,b){var c=a[3].call(this,M(this,this.D+this.J+R(this)),b.call(this));Q(this,c);this.A-=
        this.B.P},function(a,b){var c=a[3].call(this,O(this,this.L+this.K+R(this)),b.call(this));Q(this,c);this.A-=this.B.P},function(a,b){var c=a[3].call(this,O(this,this.L+this.J+R(this)),b.call(this));Q(this,c);this.A-=this.B.O},function(a,b){var c=a[3].call(this,M(this,this.K+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,M(this,this.J+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,O(this,this.L+R(this)),b.call(this));Q(this,
        c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,M(this,this.D+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,M(this,this.D+this.K+R(this)),b.call(this));Q(this,c);this.A-=this.B.O},function(a,b){var c=a[4].call(this,M(this,this.D+this.J+R(this)),b.call(this));Q(this,c);this.A-=this.B.P},function(a,b){var c=a[4].call(this,O(this,this.L+this.K+R(this)),b.call(this));Q(this,c);this.A-=this.B.P},function(a,b){var c=a[4].call(this,O(this,this.L+this.J+R(this)),
        b.call(this));Q(this,c);this.A-=this.B.O},function(a,b){var c=a[4].call(this,M(this,this.K+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,M(this,this.J+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,O(this,this.L+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,M(this,this.D+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,M(this,this.D+this.K+R(this)),
        b.call(this));Q(this,c);this.A-=this.B.O},function(a,b){var c=a[5].call(this,M(this,this.D+this.J+R(this)),b.call(this));Q(this,c);this.A-=this.B.P},function(a,b){var c=a[5].call(this,O(this,this.L+this.K+R(this)),b.call(this));Q(this,c);this.A-=this.B.P},function(a,b){var c=a[5].call(this,O(this,this.L+this.J+R(this)),b.call(this));Q(this,c);this.A-=this.B.O},function(a,b){var c=a[5].call(this,M(this,this.K+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,M(this,
        this.J+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,O(this,this.L+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,M(this,this.D+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,M(this,this.D+this.K+R(this)),b.call(this));Q(this,c);this.A-=this.B.O},function(a,b){var c=a[6].call(this,M(this,this.D+this.J+R(this)),b.call(this));Q(this,c);this.A-=this.B.P},function(a,b){var c=a[6].call(this,
        O(this,this.L+this.K+R(this)),b.call(this));Q(this,c);this.A-=this.B.P},function(a,b){var c=a[6].call(this,O(this,this.L+this.J+R(this)),b.call(this));Q(this,c);this.A-=this.B.O},function(a,b){var c=a[6].call(this,M(this,this.K+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,M(this,this.J+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,O(this,this.L+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,
        M(this,this.D+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,M(this,this.D+this.K+R(this)),b.call(this));Q(this,c);this.A-=this.B.O},function(a,b){var c=a[7].call(this,M(this,this.D+this.J+R(this)),b.call(this));Q(this,c);this.A-=this.B.P},function(a,b){var c=a[7].call(this,O(this,this.L+this.K+R(this)),b.call(this));Q(this,c);this.A-=this.B.P},function(a,b){var c=a[7].call(this,O(this,this.L+this.J+R(this)),b.call(this));Q(this,c);this.A-=this.B.O},function(a,
        b){var c=a[7].call(this,M(this,this.K+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,M(this,this.J+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,O(this,this.L+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,M(this,this.D+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,this.F&this.C,b.call(this));this.F=this.F&~this.C|c},function(a,b){var c=a[0].call(this,
        this.G&this.C,b.call(this));this.G=this.G&~this.C|c},function(a,b){var c=a[0].call(this,this.H&this.C,b.call(this));this.H=this.H&~this.C|c},function(a,b){var c=a[0].call(this,this.D&this.C,b.call(this));this.D=this.D&~this.C|c},function(a,b){var c=a[0].call(this,q(this)&this.C,b.call(this));t(this,q(this)&~this.C|c)},function(a,b){var c=a[0].call(this,this.L&this.C,b.call(this));this.L=this.L&~this.C|c},function(a,b){var c=a[0].call(this,this.K&this.C,b.call(this));this.K=this.K&~this.C|c},function(a,
        b){var c=a[0].call(this,this.J&this.C,b.call(this));this.J=this.J&~this.C|c},function(a,b){var c=a[1].call(this,this.F&this.C,b.call(this));this.F=this.F&~this.C|c},function(a,b){var c=a[1].call(this,this.G&this.C,b.call(this));this.G=this.G&~this.C|c},function(a,b){var c=a[1].call(this,this.H&this.C,b.call(this));this.H=this.H&~this.C|c},function(a,b){var c=a[1].call(this,this.D&this.C,b.call(this));this.D=this.D&~this.C|c},function(a,b){var c=a[1].call(this,q(this)&this.C,b.call(this));t(this,q(this)&
        ~this.C|c)},function(a,b){var c=a[1].call(this,this.L&this.C,b.call(this));this.L=this.L&~this.C|c},function(a,b){var c=a[1].call(this,this.K&this.C,b.call(this));this.K=this.K&~this.C|c},function(a,b){var c=a[1].call(this,this.J&this.C,b.call(this));this.J=this.J&~this.C|c},function(a,b){var c=a[2].call(this,this.F&this.C,b.call(this));this.F=this.F&~this.C|c},function(a,b){var c=a[2].call(this,this.G&this.C,b.call(this));this.G=this.G&~this.C|c},function(a,b){var c=a[2].call(this,this.H&this.C,
        b.call(this));this.H=this.H&~this.C|c},function(a,b){var c=a[2].call(this,this.D&this.C,b.call(this));this.D=this.D&~this.C|c},function(a,b){var c=a[2].call(this,q(this)&this.C,b.call(this));t(this,q(this)&~this.C|c)},function(a,b){var c=a[2].call(this,this.L&this.C,b.call(this));this.L=this.L&~this.C|c},function(a,b){var c=a[2].call(this,this.K&this.C,b.call(this));this.K=this.K&~this.C|c},function(a,b){var c=a[2].call(this,this.J&this.C,b.call(this));this.J=this.J&~this.C|c},function(a,b){var c=
        a[3].call(this,this.F&this.C,b.call(this));this.F=this.F&~this.C|c},function(a,b){var c=a[3].call(this,this.G&this.C,b.call(this));this.G=this.G&~this.C|c},function(a,b){var c=a[3].call(this,this.H&this.C,b.call(this));this.H=this.H&~this.C|c},function(a,b){var c=a[3].call(this,this.D&this.C,b.call(this));this.D=this.D&~this.C|c},function(a,b){var c=a[3].call(this,q(this)&this.C,b.call(this));t(this,q(this)&~this.C|c)},function(a,b){var c=a[3].call(this,this.L&this.C,b.call(this));this.L=this.L&~this.C|
        c},function(a,b){var c=a[3].call(this,this.K&this.C,b.call(this));this.K=this.K&~this.C|c},function(a,b){var c=a[3].call(this,this.J&this.C,b.call(this));this.J=this.J&~this.C|c},function(a,b){var c=a[4].call(this,this.F&this.C,b.call(this));this.F=this.F&~this.C|c},function(a,b){var c=a[4].call(this,this.G&this.C,b.call(this));this.G=this.G&~this.C|c},function(a,b){var c=a[4].call(this,this.H&this.C,b.call(this));this.H=this.H&~this.C|c},function(a,b){var c=a[4].call(this,this.D&this.C,b.call(this));
        this.D=this.D&~this.C|c},function(a,b){var c=a[4].call(this,q(this)&this.C,b.call(this));t(this,q(this)&~this.C|c)},function(a,b){var c=a[4].call(this,this.L&this.C,b.call(this));this.L=this.L&~this.C|c},function(a,b){var c=a[4].call(this,this.K&this.C,b.call(this));this.K=this.K&~this.C|c},function(a,b){var c=a[4].call(this,this.J&this.C,b.call(this));this.J=this.J&~this.C|c},function(a,b){var c=a[5].call(this,this.F&this.C,b.call(this));this.F=this.F&~this.C|c},function(a,b){var c=a[5].call(this,
        this.G&this.C,b.call(this));this.G=this.G&~this.C|c},function(a,b){var c=a[5].call(this,this.H&this.C,b.call(this));this.H=this.H&~this.C|c},function(a,b){var c=a[5].call(this,this.D&this.C,b.call(this));this.D=this.D&~this.C|c},function(a,b){var c=a[5].call(this,q(this)&this.C,b.call(this));t(this,q(this)&~this.C|c)},function(a,b){var c=a[5].call(this,this.L&this.C,b.call(this));this.L=this.L&~this.C|c},function(a,b){var c=a[5].call(this,this.K&this.C,b.call(this));this.K=this.K&~this.C|c},function(a,
        b){var c=a[5].call(this,this.J&this.C,b.call(this));this.J=this.J&~this.C|c},function(a,b){var c=a[6].call(this,this.F&this.C,b.call(this));this.F=this.F&~this.C|c},function(a,b){var c=a[6].call(this,this.G&this.C,b.call(this));this.G=this.G&~this.C|c},function(a,b){var c=a[6].call(this,this.H&this.C,b.call(this));this.H=this.H&~this.C|c},function(a,b){var c=a[6].call(this,this.D&this.C,b.call(this));this.D=this.D&~this.C|c},function(a,b){var c=a[6].call(this,q(this)&this.C,b.call(this));t(this,q(this)&
        ~this.C|c)},function(a,b){var c=a[6].call(this,this.L&this.C,b.call(this));this.L=this.L&~this.C|c},function(a,b){var c=a[6].call(this,this.K&this.C,b.call(this));this.K=this.K&~this.C|c},function(a,b){var c=a[6].call(this,this.J&this.C,b.call(this));this.J=this.J&~this.C|c},function(a,b){var c=a[7].call(this,this.F&this.C,b.call(this));this.F=this.F&~this.C|c},function(a,b){var c=a[7].call(this,this.G&this.C,b.call(this));this.G=this.G&~this.C|c},function(a,b){var c=a[7].call(this,this.H&this.C,
        b.call(this));this.H=this.H&~this.C|c},function(a,b){var c=a[7].call(this,this.D&this.C,b.call(this));this.D=this.D&~this.C|c},function(a,b){var c=a[7].call(this,q(this)&this.C,b.call(this));t(this,q(this)&~this.C|c)},function(a,b){var c=a[7].call(this,this.L&this.C,b.call(this));this.L=this.L&~this.C|c},function(a,b){var c=a[7].call(this,this.K&this.C,b.call(this));this.K=this.K&~this.C|c},function(a,b){var c=a[7].call(this,this.J&this.C,b.call(this));this.J=this.J&~this.C|c}],A=[function(a){a=a.call(this,
        this.F&255,E(this,this.F));this.F=this.F&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.F&255,E(this,this.G));this.F=this.F&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.F&255,E(this,this.H));this.F=this.F&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.F&255,E(this,this.D));this.F=this.F&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.F&255,E(this,S(this,0)));this.F=this.F&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.F&255,E(this,R(this)));this.F=this.F&
        -256|a;this.A-=this.B.aa},function(a){a=a.call(this,this.F&255,E(this,this.K));this.F=this.F&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.F&255,E(this,this.J));this.F=this.F&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.G&255,E(this,this.F));this.G=this.G&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.G&255,E(this,this.G));this.G=this.G&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.G&255,E(this,this.H));this.G=this.G&-256|a;this.A-=this.B.N},function(a){a=a.call(this,
        this.G&255,E(this,this.D));this.G=this.G&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.G&255,E(this,S(this,0)));this.G=this.G&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.G&255,E(this,R(this)));this.G=this.G&-256|a;this.A-=this.B.aa},function(a){a=a.call(this,this.G&255,E(this,this.K));this.G=this.G&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.G&255,E(this,this.J));this.G=this.G&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.H&255,E(this,this.F));this.H=this.H&
        -256|a;this.A-=this.B.N},function(a){a=a.call(this,this.H&255,E(this,this.G));this.H=this.H&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.H&255,E(this,this.H));this.H=this.H&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.H&255,E(this,this.D));this.H=this.H&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.H&255,E(this,S(this,0)));this.H=this.H&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.H&255,E(this,R(this)));this.H=this.H&-256|a;this.A-=this.B.aa},function(a){a=
        a.call(this,this.H&255,E(this,this.K));this.H=this.H&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.H&255,E(this,this.J));this.H=this.H&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.D&255,E(this,this.F));this.D=this.D&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.D&255,E(this,this.G));this.D=this.D&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.D&255,E(this,this.H));this.D=this.D&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.D&255,E(this,this.D));this.D=
        this.D&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.D&255,E(this,S(this,0)));this.D=this.D&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.D&255,E(this,R(this)));this.D=this.D&-256|a;this.A-=this.B.aa},function(a){a=a.call(this,this.D&255,E(this,this.K));this.D=this.D&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.D&255,E(this,this.J));this.D=this.D&-256|a;this.A-=this.B.N},function(a){a=a.call(this,this.F>>8&255,E(this,this.F));this.F=this.F&-65281|a<<8;this.A-=this.B.N},
        function(a){a=a.call(this,this.F>>8&255,E(this,this.G));this.F=this.F&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.F>>8&255,E(this,this.H));this.F=this.F&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.F>>8&255,E(this,this.D));this.F=this.F&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.F>>8&255,E(this,S(this,0)));this.F=this.F&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.F>>8&255,E(this,R(this)));this.F=this.F&-65281|a<<8;this.A-=this.B.aa},
        function(a){a=a.call(this,this.F>>8&255,E(this,this.K));this.F=this.F&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.F>>8&255,E(this,this.J));this.F=this.F&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.G>>8&255,E(this,this.F));this.G=this.G&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.G>>8&255,E(this,this.G));this.G=this.G&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.G>>8&255,E(this,this.H));this.G=this.G&-65281|a<<8;this.A-=this.B.N},function(a){a=
        a.call(this,this.G>>8&255,E(this,this.D));this.G=this.G&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.G>>8&255,E(this,S(this,0)));this.G=this.G&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.G>>8&255,E(this,R(this)));this.G=this.G&-65281|a<<8;this.A-=this.B.aa},function(a){a=a.call(this,this.G>>8&255,E(this,this.K));this.G=this.G&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.G>>8&255,E(this,this.J));this.G=this.G&-65281|a<<8;this.A-=this.B.N},function(a){a=
        a.call(this,this.H>>8&255,E(this,this.F));this.H=this.H&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.H>>8&255,E(this,this.G));this.H=this.H&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.H>>8&255,E(this,this.H));this.H=this.H&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.H>>8&255,E(this,this.D));this.H=this.H&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.H>>8&255,E(this,S(this,0)));this.H=this.H&-65281|a<<8;this.A-=this.B.N},function(a){a=
        a.call(this,this.H>>8&255,E(this,R(this)));this.H=this.H&-65281|a<<8;this.A-=this.B.aa},function(a){a=a.call(this,this.H>>8&255,E(this,this.K));this.H=this.H&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.H>>8&255,E(this,this.J));this.H=this.H&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.D>>8&255,E(this,this.F));this.D=this.D&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.D>>8&255,E(this,this.G));this.D=this.D&-65281|a<<8;this.A-=this.B.N},function(a){a=
        a.call(this,this.D>>8&255,E(this,this.H));this.D=this.D&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.D>>8&255,E(this,this.D));this.D=this.D&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.D>>8&255,E(this,S(this,0)));this.D=this.D&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.D>>8&255,E(this,R(this)));this.D=this.D&-65281|a<<8;this.A-=this.B.aa},function(a){a=a.call(this,this.D>>8&255,E(this,this.K));this.D=this.D&-65281|a<<8;this.A-=this.B.N},function(a){a=
        a.call(this,this.D>>8&255,E(this,this.J));this.D=this.D&-65281|a<<8;this.A-=this.B.N},function(a){a=a.call(this,this.F&255,E(this,this.F+this.M()));this.F=this.F&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&255,E(this,this.G+this.M()));this.F=this.F&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&255,E(this,this.H+this.M()));this.F=this.F&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&255,E(this,this.D+this.M()));this.F=this.F&-256|a;this.A-=this.B.I},function(a){a=
        a.call(this,this.F&255,E(this,S(this,1)+this.M()));this.F=this.F&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&255,F(this,this.L+this.M()));this.F=this.F&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&255,E(this,this.K+this.M()));this.F=this.F&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&255,E(this,this.J+this.M()));this.F=this.F&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&255,E(this,this.F+this.M()));this.G=this.G&-256|a;this.A-=this.B.I},function(a){a=
        a.call(this,this.G&255,E(this,this.G+this.M()));this.G=this.G&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&255,E(this,this.H+this.M()));this.G=this.G&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&255,E(this,this.D+this.M()));this.G=this.G&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&255,E(this,S(this,1)+this.M()));this.G=this.G&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&255,F(this,this.L+this.M()));this.G=this.G&-256|a;this.A-=this.B.I},function(a){a=
        a.call(this,this.G&255,E(this,this.K+this.M()));this.G=this.G&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&255,E(this,this.J+this.M()));this.G=this.G&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&255,E(this,this.F+this.M()));this.H=this.H&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&255,E(this,this.G+this.M()));this.H=this.H&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&255,E(this,this.H+this.M()));this.H=this.H&-256|a;this.A-=this.B.I},function(a){a=
        a.call(this,this.H&255,E(this,this.D+this.M()));this.H=this.H&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&255,E(this,S(this,1)+this.M()));this.H=this.H&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&255,F(this,this.L+this.M()));this.H=this.H&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&255,E(this,this.K+this.M()));this.H=this.H&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&255,E(this,this.J+this.M()));this.H=this.H&-256|a;this.A-=this.B.I},function(a){a=
        a.call(this,this.D&255,E(this,this.F+this.M()));this.D=this.D&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&255,E(this,this.G+this.M()));this.D=this.D&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&255,E(this,this.H+this.M()));this.D=this.D&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&255,E(this,this.D+this.M()));this.D=this.D&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&255,E(this,S(this,1)+this.M()));this.D=this.D&-256|a;this.A-=this.B.I},function(a){a=
        a.call(this,this.D&255,F(this,this.L+this.M()));this.D=this.D&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&255,E(this,this.K+this.M()));this.D=this.D&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&255,E(this,this.J+this.M()));this.D=this.D&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.F>>8&255,E(this,this.F+this.M()));this.F=this.F&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.F>>8&255,E(this,this.G+this.M()));this.F=this.F&-65281|a<<8;this.A-=this.B.I},
        function(a){a=a.call(this,this.F>>8&255,E(this,this.H+this.M()));this.F=this.F&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.F>>8&255,E(this,this.D+this.M()));this.F=this.F&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.F>>8&255,E(this,S(this,1)+this.M()));this.F=this.F&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.F>>8&255,F(this,this.L+this.M()));this.F=this.F&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.F>>8&255,E(this,this.K+this.M()));
        this.F=this.F&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.F>>8&255,E(this,this.J+this.M()));this.F=this.F&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.G>>8&255,E(this,this.F+this.M()));this.G=this.G&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.G>>8&255,E(this,this.G+this.M()));this.G=this.G&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.G>>8&255,E(this,this.H+this.M()));this.G=this.G&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,
        this.G>>8&255,E(this,this.D+this.M()));this.G=this.G&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.G>>8&255,E(this,S(this,1)+this.M()));this.G=this.G&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.G>>8&255,F(this,this.L+this.M()));this.G=this.G&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.G>>8&255,E(this,this.K+this.M()));this.G=this.G&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.G>>8&255,E(this,this.J+this.M()));this.G=this.G&-65281|a<<
        8;this.A-=this.B.I},function(a){a=a.call(this,this.H>>8&255,E(this,this.F+this.M()));this.H=this.H&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.H>>8&255,E(this,this.G+this.M()));this.H=this.H&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.H>>8&255,E(this,this.H+this.M()));this.H=this.H&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.H>>8&255,E(this,this.D+this.M()));this.H=this.H&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.H>>8&255,E(this,
        S(this,1)+this.M()));this.H=this.H&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.H>>8&255,F(this,this.L+this.M()));this.H=this.H&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.H>>8&255,E(this,this.K+this.M()));this.H=this.H&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.H>>8&255,E(this,this.J+this.M()));this.H=this.H&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.D>>8&255,E(this,this.F+this.M()));this.D=this.D&-65281|a<<8;this.A-=this.B.I},
        function(a){a=a.call(this,this.D>>8&255,E(this,this.G+this.M()));this.D=this.D&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.D>>8&255,E(this,this.H+this.M()));this.D=this.D&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.D>>8&255,E(this,this.D+this.M()));this.D=this.D&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.D>>8&255,E(this,S(this,1)+this.M()));this.D=this.D&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.D>>8&255,F(this,this.L+this.M()));
        this.D=this.D&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.D>>8&255,E(this,this.K+this.M()));this.D=this.D&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.D>>8&255,E(this,this.J+this.M()));this.D=this.D&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.F&255,E(this,this.F+R(this)));this.F=this.F&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&255,E(this,this.G+R(this)));this.F=this.F&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&255,E(this,
        this.H+R(this)));this.F=this.F&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&255,E(this,this.D+R(this)));this.F=this.F&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&255,E(this,S(this,2)+R(this)));this.F=this.F&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&255,F(this,this.L+R(this)));this.F=this.F&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&255,E(this,this.K+R(this)));this.F=this.F&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&255,E(this,
        this.J+R(this)));this.F=this.F&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&255,E(this,this.F+R(this)));this.G=this.G&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&255,E(this,this.G+R(this)));this.G=this.G&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&255,E(this,this.H+R(this)));this.G=this.G&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&255,E(this,this.D+R(this)));this.G=this.G&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&255,E(this,S(this,
        2)+R(this)));this.G=this.G&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&255,F(this,this.L+R(this)));this.G=this.G&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&255,E(this,this.K+R(this)));this.G=this.G&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&255,E(this,this.J+R(this)));this.G=this.G&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&255,E(this,this.F+R(this)));this.H=this.H&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&255,E(this,this.G+
        R(this)));this.H=this.H&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&255,E(this,this.H+R(this)));this.H=this.H&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&255,E(this,this.D+R(this)));this.H=this.H&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&255,E(this,S(this,2)+R(this)));this.H=this.H&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&255,F(this,this.L+R(this)));this.H=this.H&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&255,E(this,this.K+
        R(this)));this.H=this.H&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&255,E(this,this.J+R(this)));this.H=this.H&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&255,E(this,this.F+R(this)));this.D=this.D&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&255,E(this,this.G+R(this)));this.D=this.D&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&255,E(this,this.H+R(this)));this.D=this.D&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&255,E(this,this.D+R(this)));
        this.D=this.D&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&255,E(this,S(this,2)+R(this)));this.D=this.D&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&255,F(this,this.L+R(this)));this.D=this.D&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&255,E(this,this.K+R(this)));this.D=this.D&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&255,E(this,this.J+R(this)));this.D=this.D&-256|a;this.A-=this.B.I},function(a){a=a.call(this,this.F>>8&255,E(this,this.F+R(this)));
        this.F=this.F&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.F>>8&255,E(this,this.G+R(this)));this.F=this.F&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.F>>8&255,E(this,this.H+R(this)));this.F=this.F&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.F>>8&255,E(this,this.D+R(this)));this.F=this.F&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.F>>8&255,E(this,S(this,2)+R(this)));this.F=this.F&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,
        this.F>>8&255,F(this,this.L+R(this)));this.F=this.F&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.F>>8&255,E(this,this.K+R(this)));this.F=this.F&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.F>>8&255,E(this,this.J+R(this)));this.F=this.F&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.G>>8&255,E(this,this.F+R(this)));this.G=this.G&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.G>>8&255,E(this,this.G+R(this)));this.G=this.G&-65281|a<<8;this.A-=
        this.B.I},function(a){a=a.call(this,this.G>>8&255,E(this,this.H+R(this)));this.G=this.G&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.G>>8&255,E(this,this.D+R(this)));this.G=this.G&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.G>>8&255,E(this,S(this,2)+R(this)));this.G=this.G&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.G>>8&255,F(this,this.L+R(this)));this.G=this.G&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.G>>8&255,E(this,this.K+R(this)));
        this.G=this.G&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.G>>8&255,E(this,this.J+R(this)));this.G=this.G&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.H>>8&255,E(this,this.F+R(this)));this.H=this.H&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.H>>8&255,E(this,this.G+R(this)));this.H=this.H&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.H>>8&255,E(this,this.H+R(this)));this.H=this.H&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,
        this.H>>8&255,E(this,this.D+R(this)));this.H=this.H&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.H>>8&255,E(this,S(this,2)+R(this)));this.H=this.H&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.H>>8&255,F(this,this.L+R(this)));this.H=this.H&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.H>>8&255,E(this,this.K+R(this)));this.H=this.H&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.H>>8&255,E(this,this.J+R(this)));this.H=this.H&-65281|a<<8;this.A-=
        this.B.I},function(a){a=a.call(this,this.D>>8&255,E(this,this.F+R(this)));this.D=this.D&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.D>>8&255,E(this,this.G+R(this)));this.D=this.D&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.D>>8&255,E(this,this.H+R(this)));this.D=this.D&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.D>>8&255,E(this,this.D+R(this)));this.D=this.D&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.D>>8&255,E(this,S(this,2)+R(this)));
        this.D=this.D&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.D>>8&255,F(this,this.L+R(this)));this.D=this.D&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.D>>8&255,E(this,this.K+R(this)));this.D=this.D&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.D>>8&255,E(this,this.J+R(this)));this.D=this.D&-65281|a<<8;this.A-=this.B.I},function(a){a=a.call(this,this.F&255,this.F&255);this.F=this.F&-256|a},function(a){a=a.call(this,this.F&255,this.G&255);this.F=this.F&
        -256|a},function(a){a=a.call(this,this.F&255,this.H&255);this.F=this.F&-256|a},function(a){a=a.call(this,this.F&255,this.D&255);this.F=this.F&-256|a},function(a){a=a.call(this,this.F&255,this.F>>8&255);this.F=this.F&-256|a},function(a){a=a.call(this,this.F&255,this.G>>8&255);this.F=this.F&-256|a},function(a){a=a.call(this,this.F&255,this.H>>8&255);this.F=this.F&-256|a},function(a){a=a.call(this,this.F&255,this.D>>8&255);this.F=this.F&-256|a},function(a){a=a.call(this,this.G&255,this.F&255);this.G=
        this.G&-256|a},function(a){a=a.call(this,this.G&255,this.G&255);this.G=this.G&-256|a},function(a){a=a.call(this,this.G&255,this.H&255);this.G=this.G&-256|a},function(a){a=a.call(this,this.G&255,this.D&255);this.G=this.G&-256|a},function(a){a=a.call(this,this.G&255,this.F>>8&255);this.G=this.G&-256|a},function(a){a=a.call(this,this.G&255,this.G>>8&255);this.G=this.G&-256|a},function(a){a=a.call(this,this.G&255,this.H>>8&255);this.G=this.G&-256|a},function(a){a=a.call(this,this.G&255,this.D>>8&255);
        this.G=this.G&-256|a},function(a){a=a.call(this,this.H&255,this.F&255);this.H=this.H&-256|a},function(a){a=a.call(this,this.H&255,this.G&255);this.H=this.H&-256|a},function(a){a=a.call(this,this.H&255,this.H&255);this.H=this.H&-256|a},function(a){a=a.call(this,this.H&255,this.D&255);this.H=this.H&-256|a},function(a){a=a.call(this,this.H&255,this.F>>8&255);this.H=this.H&-256|a},function(a){a=a.call(this,this.H&255,this.G>>8&255);this.H=this.H&-256|a},function(a){a=a.call(this,this.H&255,this.H>>8&
        255);this.H=this.H&-256|a},function(a){a=a.call(this,this.H&255,this.D>>8&255);this.H=this.H&-256|a},function(a){a=a.call(this,this.D&255,this.F&255);this.D=this.D&-256|a},function(a){a=a.call(this,this.D&255,this.G&255);this.D=this.D&-256|a},function(a){a=a.call(this,this.D&255,this.H&255);this.D=this.D&-256|a},function(a){a=a.call(this,this.D&255,this.D&255);this.D=this.D&-256|a},function(a){a=a.call(this,this.D&255,this.F>>8&255);this.D=this.D&-256|a},function(a){a=a.call(this,this.D&255,this.G>>
        8&255);this.D=this.D&-256|a},function(a){a=a.call(this,this.D&255,this.H>>8&255);this.D=this.D&-256|a},function(a){a=a.call(this,this.D&255,this.D>>8&255);this.D=this.D&-256|a},function(a){a=a.call(this,this.F>>8&255,this.F&255);this.F=this.F&-65281|a<<8},function(a){a=a.call(this,this.F>>8&255,this.G&255);this.F=this.F&-65281|a<<8},function(a){a=a.call(this,this.F>>8&255,this.H&255);this.F=this.F&-65281|a<<8},function(a){a=a.call(this,this.F>>8&255,this.D&255);this.F=this.F&-65281|a<<8},function(a){a=
        a.call(this,this.F>>8&255,this.F>>8&255);this.F=this.F&-65281|a<<8},function(a){a=a.call(this,this.F>>8&255,this.G>>8&255);this.F=this.F&-65281|a<<8},function(a){a=a.call(this,this.F>>8&255,this.H>>8&255);this.F=this.F&-65281|a<<8},function(a){a=a.call(this,this.F>>8&255,this.D>>8&255);this.F=this.F&-65281|a<<8},function(a){a=a.call(this,this.G>>8&255,this.F&255);this.G=this.G&-65281|a<<8},function(a){a=a.call(this,this.G>>8&255,this.G&255);this.G=this.G&-65281|a<<8},function(a){a=a.call(this,this.G>>
        8&255,this.H&255);this.G=this.G&-65281|a<<8},function(a){a=a.call(this,this.G>>8&255,this.D&255);this.G=this.G&-65281|a<<8},function(a){a=a.call(this,this.G>>8&255,this.F>>8&255);this.G=this.G&-65281|a<<8},function(a){a=a.call(this,this.G>>8&255,this.G>>8&255);this.G=this.G&-65281|a<<8},function(a){a=a.call(this,this.G>>8&255,this.H>>8&255);this.G=this.G&-65281|a<<8},function(a){a=a.call(this,this.G>>8&255,this.D>>8&255);this.G=this.G&-65281|a<<8},function(a){a=a.call(this,this.H>>8&255,this.F&255);
        this.H=this.H&-65281|a<<8},function(a){a=a.call(this,this.H>>8&255,this.G&255);this.H=this.H&-65281|a<<8},function(a){a=a.call(this,this.H>>8&255,this.H&255);this.H=this.H&-65281|a<<8},function(a){a=a.call(this,this.H>>8&255,this.D&255);this.H=this.H&-65281|a<<8},function(a){a=a.call(this,this.H>>8&255,this.F>>8&255);this.H=this.H&-65281|a<<8},function(a){a=a.call(this,this.H>>8&255,this.G>>8&255);this.H=this.H&-65281|a<<8},function(a){a=a.call(this,this.H>>8&255,this.H>>8&255);this.H=this.H&-65281|
        a<<8},function(a){a=a.call(this,this.H>>8&255,this.D>>8&255);this.H=this.H&-65281|a<<8},function(a){a=a.call(this,this.D>>8&255,this.F&255);this.D=this.D&-65281|a<<8},function(a){a=a.call(this,this.D>>8&255,this.G&255);this.D=this.D&-65281|a<<8},function(a){a=a.call(this,this.D>>8&255,this.H&255);this.D=this.D&-65281|a<<8},function(a){a=a.call(this,this.D>>8&255,this.D&255);this.D=this.D&-65281|a<<8},function(a){a=a.call(this,this.D>>8&255,this.F>>8&255);this.D=this.D&-65281|a<<8},function(a){a=a.call(this,
        this.D>>8&255,this.G>>8&255);this.D=this.D&-65281|a<<8},function(a){a=a.call(this,this.D>>8&255,this.H>>8&255);this.D=this.D&-65281|a<<8},function(a){a=a.call(this,this.D>>8&255,this.D>>8&255);this.D=this.D&-65281|a<<8}],Pd=[function(a){a=a.call(this,J(this,this.F),this.F&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,this.G),this.F&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,this.H),this.F&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,
        this.D),this.F&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,S(this,0)),this.F&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,R(this)),this.F&255);P(this,a);this.A-=this.B.aa},function(a){a=a.call(this,J(this,this.K),this.F&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,this.J),this.F&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,this.F),this.G&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,this.G),this.G&
        255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,this.H),this.G&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,this.D),this.G&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,S(this,0)),this.G&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,R(this)),this.G&255);P(this,a);this.A-=this.B.aa},function(a){a=a.call(this,J(this,this.K),this.G&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,this.J),this.G&255);P(this,
        a);this.A-=this.B.N},function(a){a=a.call(this,J(this,this.F),this.H&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,this.G),this.H&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,this.H),this.H&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,this.D),this.H&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,S(this,0)),this.H&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,R(this)),this.H&255);P(this,a);this.A-=
        this.B.aa},function(a){a=a.call(this,J(this,this.K),this.H&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,this.J),this.H&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,this.F),this.D&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,this.G),this.D&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,this.H),this.D&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,this.D),this.D&255);P(this,a);this.A-=this.B.N},function(a){a=
        a.call(this,J(this,S(this,0)),this.D&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,R(this)),this.D&255);P(this,a);this.A-=this.B.aa},function(a){a=a.call(this,J(this,this.K),this.D&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,this.J),this.D&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,this.F),this.F>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,this.G),this.F>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,
        J(this,this.H),this.F>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,this.D),this.F>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,S(this,0)),this.F>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,R(this)),this.F>>8&255);P(this,a);this.A-=this.B.aa},function(a){a=a.call(this,J(this,this.K),this.F>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,this.J),this.F>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,
        J(this,this.F),this.G>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,this.G),this.G>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,this.H),this.G>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,this.D),this.G>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,S(this,0)),this.G>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,R(this)),this.G>>8&255);P(this,a);this.A-=this.B.aa},function(a){a=a.call(this,
        J(this,this.K),this.G>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,this.J),this.G>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,this.F),this.H>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,this.G),this.H>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,this.H),this.H>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,this.D),this.H>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,
        J(this,S(this,0)),this.H>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,R(this)),this.H>>8&255);P(this,a);this.A-=this.B.aa},function(a){a=a.call(this,J(this,this.K),this.H>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,this.J),this.H>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,this.F),this.D>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,this.G),this.D>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,
        J(this,this.H),this.D>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,this.D),this.D>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,S(this,0)),this.D>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,R(this)),this.D>>8&255);P(this,a);this.A-=this.B.aa},function(a){a=a.call(this,J(this,this.K),this.D>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,J(this,this.J),this.D>>8&255);P(this,a);this.A-=this.B.N},function(a){a=a.call(this,
        J(this,this.F+this.M()),this.F&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.G+this.M()),this.F&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.H+this.M()),this.F&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.D+this.M()),this.F&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,S(this,1)+this.M()),this.F&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,K(this,this.L+this.M()),this.F&255);P(this,a);this.A-=
        this.B.I},function(a){a=a.call(this,J(this,this.K+this.M()),this.F&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.J+this.M()),this.F&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.F+this.M()),this.G&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.G+this.M()),this.G&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.H+this.M()),this.G&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.D+this.M()),
        this.G&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,S(this,1)+this.M()),this.G&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,K(this,this.L+this.M()),this.G&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.K+this.M()),this.G&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.J+this.M()),this.G&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.F+this.M()),this.H&255);P(this,a);this.A-=this.B.I},function(a){a=
        a.call(this,J(this,this.G+this.M()),this.H&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.H+this.M()),this.H&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.D+this.M()),this.H&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,S(this,1)+this.M()),this.H&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,K(this,this.L+this.M()),this.H&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.K+this.M()),this.H&255);
        P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.J+this.M()),this.H&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.F+this.M()),this.D&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.G+this.M()),this.D&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.H+this.M()),this.D&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.D+this.M()),this.D&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,
        J(this,S(this,1)+this.M()),this.D&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,K(this,this.L+this.M()),this.D&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.K+this.M()),this.D&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.J+this.M()),this.D&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.F+this.M()),this.F>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.G+this.M()),this.F>>8&255);P(this,
        a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.H+this.M()),this.F>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.D+this.M()),this.F>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,S(this,1)+this.M()),this.F>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,K(this,this.L+this.M()),this.F>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.K+this.M()),this.F>>8&255);P(this,a);this.A-=this.B.I},function(a){a=
        a.call(this,J(this,this.J+this.M()),this.F>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.F+this.M()),this.G>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.G+this.M()),this.G>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.H+this.M()),this.G>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.D+this.M()),this.G>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,S(this,1)+this.M()),
        this.G>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,K(this,this.L+this.M()),this.G>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.K+this.M()),this.G>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.J+this.M()),this.G>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.F+this.M()),this.H>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.G+this.M()),this.H>>8&255);P(this,a);this.A-=this.B.I},
        function(a){a=a.call(this,J(this,this.H+this.M()),this.H>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.D+this.M()),this.H>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,S(this,1)+this.M()),this.H>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,K(this,this.L+this.M()),this.H>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.K+this.M()),this.H>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,
        this.J+this.M()),this.H>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.F+this.M()),this.D>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.G+this.M()),this.D>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.H+this.M()),this.D>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.D+this.M()),this.D>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,S(this,1)+this.M()),this.D>>8&255);P(this,
        a);this.A-=this.B.I},function(a){a=a.call(this,K(this,this.L+this.M()),this.D>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.K+this.M()),this.D>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.J+this.M()),this.D>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.F+R(this)),this.F&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.G+R(this)),this.F&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,
        J(this,this.H+R(this)),this.F&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.D+R(this)),this.F&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,S(this,2)+R(this)),this.F&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,K(this,this.L+R(this)),this.F&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.K+R(this)),this.F&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.J+R(this)),this.F&255);P(this,a);this.A-=
        this.B.I},function(a){a=a.call(this,J(this,this.F+R(this)),this.G&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.G+R(this)),this.G&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.H+R(this)),this.G&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.D+R(this)),this.G&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,S(this,2)+R(this)),this.G&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,K(this,this.L+R(this)),
        this.G&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.K+R(this)),this.G&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.J+R(this)),this.G&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.F+R(this)),this.H&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.G+R(this)),this.H&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.H+R(this)),this.H&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,
        J(this,this.D+R(this)),this.H&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,S(this,2)+R(this)),this.H&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,K(this,this.L+R(this)),this.H&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.K+R(this)),this.H&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.J+R(this)),this.H&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.F+R(this)),this.D&255);P(this,a);this.A-=
        this.B.I},function(a){a=a.call(this,J(this,this.G+R(this)),this.D&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.H+R(this)),this.D&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.D+R(this)),this.D&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,S(this,2)+R(this)),this.D&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,K(this,this.L+R(this)),this.D&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.K+R(this)),
        this.D&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.J+R(this)),this.D&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.F+R(this)),this.F>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.G+R(this)),this.F>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.H+R(this)),this.F>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.D+R(this)),this.F>>8&255);P(this,a);this.A-=this.B.I},function(a){a=
        a.call(this,J(this,S(this,2)+R(this)),this.F>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,K(this,this.L+R(this)),this.F>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.K+R(this)),this.F>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.J+R(this)),this.F>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.F+R(this)),this.G>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.G+R(this)),this.G>>
        8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.H+R(this)),this.G>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.D+R(this)),this.G>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,S(this,2)+R(this)),this.G>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,K(this,this.L+R(this)),this.G>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.K+R(this)),this.G>>8&255);P(this,a);this.A-=this.B.I},function(a){a=
        a.call(this,J(this,this.J+R(this)),this.G>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.F+R(this)),this.H>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.G+R(this)),this.H>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.H+R(this)),this.H>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.D+R(this)),this.H>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,S(this,2)+R(this)),this.H>>
        8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,K(this,this.L+R(this)),this.H>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.K+R(this)),this.H>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.J+R(this)),this.H>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.F+R(this)),this.D>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.G+R(this)),this.D>>8&255);P(this,a);this.A-=this.B.I},function(a){a=
        a.call(this,J(this,this.H+R(this)),this.D>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.D+R(this)),this.D>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,S(this,2)+R(this)),this.D>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,K(this,this.L+R(this)),this.D>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.K+R(this)),this.D>>8&255);P(this,a);this.A-=this.B.I},function(a){a=a.call(this,J(this,this.J+R(this)),this.D>>
        8&255);P(this,a);this.A-=this.B.I},A[192],A[200],A[208],A[216],A[224],A[232],A[240],A[248],A[193],A[201],A[209],A[217],A[225],A[233],A[241],A[249],A[194],A[202],A[210],A[218],A[226],A[234],A[242],A[250],A[195],A[203],A[211],A[219],A[227],A[235],A[243],A[251],A[196],A[204],A[212],A[220],A[228],A[236],A[244],A[252],A[197],A[205],A[213],A[221],A[229],A[237],A[245],A[253],A[198],A[206],A[214],A[222],A[230],A[238],A[246],A[254],A[199],A[207],A[215],A[223],A[231],A[239],A[247],A[255]],Qd=[function(a,b){var c=
        a[0].call(this,J(this,this.F),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[0].call(this,J(this,this.G),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[0].call(this,J(this,this.H),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[0].call(this,J(this,this.D),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[0].call(this,J(this,S(this,0)),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[0].call(this,J(this,R(this)),b.call(this));
        P(this,c);this.A-=this.B.aa},function(a,b){var c=a[0].call(this,J(this,this.K),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[0].call(this,J(this,this.J),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[1].call(this,J(this,this.F),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[1].call(this,J(this,this.G),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[1].call(this,J(this,this.H),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=
        a[1].call(this,J(this,this.D),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[1].call(this,J(this,S(this,0)),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[1].call(this,J(this,R(this)),b.call(this));P(this,c);this.A-=this.B.aa},function(a,b){var c=a[1].call(this,J(this,this.K),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[1].call(this,J(this,this.J),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[2].call(this,J(this,this.F),b.call(this));
        P(this,c);this.A-=this.B.N},function(a,b){var c=a[2].call(this,J(this,this.G),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[2].call(this,J(this,this.H),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[2].call(this,J(this,this.D),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[2].call(this,J(this,S(this,0)),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[2].call(this,J(this,R(this)),b.call(this));P(this,c);this.A-=this.B.aa},function(a,
        b){var c=a[2].call(this,J(this,this.K),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[2].call(this,J(this,this.J),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[3].call(this,J(this,this.F),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[3].call(this,J(this,this.G),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[3].call(this,J(this,this.H),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[3].call(this,J(this,this.D),b.call(this));
        P(this,c);this.A-=this.B.N},function(a,b){var c=a[3].call(this,J(this,S(this,0)),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[3].call(this,J(this,R(this)),b.call(this));P(this,c);this.A-=this.B.aa},function(a,b){var c=a[3].call(this,J(this,this.K),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[3].call(this,J(this,this.J),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[4].call(this,J(this,this.F),b.call(this));P(this,c);this.A-=this.B.N},function(a,
        b){var c=a[4].call(this,J(this,this.G),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[4].call(this,J(this,this.H),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[4].call(this,J(this,this.D),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[4].call(this,J(this,S(this,0)),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[4].call(this,J(this,R(this)),b.call(this));P(this,c);this.A-=this.B.aa},function(a,b){var c=a[4].call(this,J(this,this.K),
        b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[4].call(this,J(this,this.J),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[5].call(this,J(this,this.F),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[5].call(this,J(this,this.G),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[5].call(this,J(this,this.H),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[5].call(this,J(this,this.D),b.call(this));P(this,c);this.A-=this.B.N},
        function(a,b){var c=a[5].call(this,J(this,S(this,0)),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[5].call(this,J(this,R(this)),b.call(this));P(this,c);this.A-=this.B.aa},function(a,b){var c=a[5].call(this,J(this,this.K),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[5].call(this,J(this,this.J),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[6].call(this,J(this,this.F),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[6].call(this,J(this,
        this.G),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[6].call(this,J(this,this.H),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[6].call(this,J(this,this.D),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[6].call(this,J(this,S(this,0)),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[6].call(this,J(this,R(this)),b.call(this));P(this,c);this.A-=this.B.aa},function(a,b){var c=a[6].call(this,J(this,this.K),b.call(this));P(this,c);this.A-=
        this.B.N},function(a,b){var c=a[6].call(this,J(this,this.J),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[7].call(this,J(this,this.F),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[7].call(this,J(this,this.G),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[7].call(this,J(this,this.H),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[7].call(this,J(this,this.D),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[7].call(this,
        J(this,S(this,0)),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[7].call(this,J(this,R(this)),b.call(this));P(this,c);this.A-=this.B.aa},function(a,b){var c=a[7].call(this,J(this,this.K),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[7].call(this,J(this,this.J),b.call(this));P(this,c);this.A-=this.B.N},function(a,b){var c=a[0].call(this,J(this,this.F+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,J(this,this.G+this.M()),b.call(this));
        P(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,J(this,this.H+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,J(this,this.D+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,J(this,S(this,1)+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,K(this,this.L+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,J(this,this.K+this.M()),b.call(this));
        P(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,J(this,this.J+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,J(this,this.F+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,J(this,this.G+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,J(this,this.H+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,J(this,this.D+this.M()),b.call(this));
        P(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,J(this,S(this,1)+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,K(this,this.L+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,J(this,this.K+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,J(this,this.J+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,J(this,this.F+this.M()),b.call(this));
        P(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,J(this,this.G+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,J(this,this.H+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,J(this,this.D+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,J(this,S(this,1)+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,K(this,this.L+this.M()),b.call(this));
        P(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,J(this,this.K+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,J(this,this.J+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,J(this,this.F+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,J(this,this.G+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,J(this,this.H+this.M()),b.call(this));
        P(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,J(this,this.D+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,J(this,S(this,1)+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,K(this,this.L+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,J(this,this.K+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,J(this,this.J+this.M()),b.call(this));
        P(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,J(this,this.F+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,J(this,this.G+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,J(this,this.H+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,J(this,this.D+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,J(this,S(this,1)+this.M()),b.call(this));
        P(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,K(this,this.L+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,J(this,this.K+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,J(this,this.J+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,J(this,this.F+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,J(this,this.G+this.M()),b.call(this));
        P(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,J(this,this.H+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,J(this,this.D+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,J(this,S(this,1)+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,K(this,this.L+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,J(this,this.K+this.M()),b.call(this));
        P(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,J(this,this.J+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,J(this,this.F+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,J(this,this.G+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,J(this,this.H+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,J(this,this.D+this.M()),b.call(this));
        P(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,J(this,S(this,1)+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,K(this,this.L+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,J(this,this.K+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,J(this,this.J+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,J(this,this.F+this.M()),b.call(this));
        P(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,J(this,this.G+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,J(this,this.H+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,J(this,this.D+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,J(this,S(this,1)+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,K(this,this.L+this.M()),b.call(this));
        P(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,J(this,this.K+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,J(this,this.J+this.M()),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,J(this,this.F+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,J(this,this.G+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,J(this,this.H+R(this)),b.call(this));
        P(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,J(this,this.D+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,J(this,S(this,2)+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,K(this,this.L+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,J(this,this.K+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,J(this,this.J+R(this)),b.call(this));
        P(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,J(this,this.F+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,J(this,this.G+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,J(this,this.H+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,J(this,this.D+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,J(this,S(this,2)+R(this)),b.call(this));
        P(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,K(this,this.L+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,J(this,this.K+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,J(this,this.J+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,J(this,this.F+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,J(this,this.G+R(this)),b.call(this));P(this,
        c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,J(this,this.H+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,J(this,this.D+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,J(this,S(this,2)+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,K(this,this.L+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,J(this,this.K+R(this)),b.call(this));P(this,
        c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,J(this,this.J+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,J(this,this.F+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,J(this,this.G+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,J(this,this.H+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,J(this,this.D+R(this)),b.call(this));P(this,c);
        this.A-=this.B.I},function(a,b){var c=a[3].call(this,J(this,S(this,2)+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,K(this,this.L+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,J(this,this.K+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,J(this,this.J+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,J(this,this.F+R(this)),b.call(this));P(this,c);
        this.A-=this.B.I},function(a,b){var c=a[4].call(this,J(this,this.G+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,J(this,this.H+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,J(this,this.D+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,J(this,S(this,2)+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,K(this,this.L+R(this)),b.call(this));P(this,c);
        this.A-=this.B.I},function(a,b){var c=a[4].call(this,J(this,this.K+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,J(this,this.J+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,J(this,this.F+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,J(this,this.G+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,J(this,this.H+R(this)),b.call(this));P(this,c);this.A-=
        this.B.I},function(a,b){var c=a[5].call(this,J(this,this.D+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,J(this,S(this,2)+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,K(this,this.L+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,J(this,this.K+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,J(this,this.J+R(this)),b.call(this));P(this,c);this.A-=
        this.B.I},function(a,b){var c=a[6].call(this,J(this,this.F+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,J(this,this.G+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,J(this,this.H+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,J(this,this.D+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,J(this,S(this,2)+R(this)),b.call(this));P(this,c);this.A-=
        this.B.I},function(a,b){var c=a[6].call(this,K(this,this.L+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,J(this,this.K+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,J(this,this.J+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,J(this,this.F+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,J(this,this.G+R(this)),b.call(this));P(this,c);this.A-=this.B.I},
        function(a,b){var c=a[7].call(this,J(this,this.H+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,J(this,this.D+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,J(this,S(this,2)+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,K(this,this.L+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,J(this,this.K+R(this)),b.call(this));P(this,c);this.A-=this.B.I},
        function(a,b){var c=a[7].call(this,J(this,this.J+R(this)),b.call(this));P(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,this.F&255,b.call(this));this.F=this.F&-256|c},function(a,b){var c=a[0].call(this,this.G&255,b.call(this));this.G=this.G&-256|c},function(a,b){var c=a[0].call(this,this.H&255,b.call(this));this.H=this.H&-256|c},function(a,b){var c=a[0].call(this,this.D&255,b.call(this));this.D=this.D&-256|c},function(a,b){var c=a[0].call(this,this.F>>8&255,b.call(this));this.F=this.F&
        -65281|c<<8},function(a,b){var c=a[0].call(this,this.G>>8&255,b.call(this));this.G=this.G&-65281|c<<8},function(a,b){var c=a[0].call(this,this.H>>8&255,b.call(this));this.H=this.H&-65281|c<<8},function(a,b){var c=a[0].call(this,this.D>>8&255,b.call(this));this.D=this.D&-65281|c<<8},function(a,b){var c=a[1].call(this,this.F&255,b.call(this));this.F=this.F&-256|c},function(a,b){var c=a[1].call(this,this.G&255,b.call(this));this.G=this.G&-256|c},function(a,b){var c=a[1].call(this,this.H&255,b.call(this));
        this.H=this.H&-256|c},function(a,b){var c=a[1].call(this,this.D&255,b.call(this));this.D=this.D&-256|c},function(a,b){var c=a[1].call(this,this.F>>8&255,b.call(this));this.F=this.F&-65281|c<<8},function(a,b){var c=a[1].call(this,this.G>>8&255,b.call(this));this.G=this.G&-65281|c<<8},function(a,b){var c=a[1].call(this,this.H>>8&255,b.call(this));this.H=this.H&-65281|c<<8},function(a,b){var c=a[1].call(this,this.D>>8&255,b.call(this));this.D=this.D&-65281|c<<8},function(a,b){var c=a[2].call(this,this.F&
        255,b.call(this));this.F=this.F&-256|c},function(a,b){var c=a[2].call(this,this.G&255,b.call(this));this.G=this.G&-256|c},function(a,b){var c=a[2].call(this,this.H&255,b.call(this));this.H=this.H&-256|c},function(a,b){var c=a[2].call(this,this.D&255,b.call(this));this.D=this.D&-256|c},function(a,b){var c=a[2].call(this,this.F>>8&255,b.call(this));this.F=this.F&-65281|c<<8},function(a,b){var c=a[2].call(this,this.G>>8&255,b.call(this));this.G=this.G&-65281|c<<8},function(a,b){var c=a[2].call(this,
        this.H>>8&255,b.call(this));this.H=this.H&-65281|c<<8},function(a,b){var c=a[2].call(this,this.D>>8&255,b.call(this));this.D=this.D&-65281|c<<8},function(a,b){var c=a[3].call(this,this.F&255,b.call(this));this.F=this.F&-256|c},function(a,b){var c=a[3].call(this,this.G&255,b.call(this));this.G=this.G&-256|c},function(a,b){var c=a[3].call(this,this.H&255,b.call(this));this.H=this.H&-256|c},function(a,b){var c=a[3].call(this,this.D&255,b.call(this));this.D=this.D&-256|c},function(a,b){var c=a[3].call(this,
        this.F>>8&255,b.call(this));this.F=this.F&-65281|c<<8},function(a,b){var c=a[3].call(this,this.G>>8&255,b.call(this));this.G=this.G&-65281|c<<8},function(a,b){var c=a[3].call(this,this.H>>8&255,b.call(this));this.H=this.H&-65281|c<<8},function(a,b){var c=a[3].call(this,this.D>>8&255,b.call(this));this.D=this.D&-65281|c<<8},function(a,b){var c=a[4].call(this,this.F&255,b.call(this));this.F=this.F&-256|c},function(a,b){var c=a[4].call(this,this.G&255,b.call(this));this.G=this.G&-256|c},function(a,b){var c=
        a[4].call(this,this.H&255,b.call(this));this.H=this.H&-256|c},function(a,b){var c=a[4].call(this,this.D&255,b.call(this));this.D=this.D&-256|c},function(a,b){var c=a[4].call(this,this.F>>8&255,b.call(this));this.F=this.F&-65281|c<<8},function(a,b){var c=a[4].call(this,this.G>>8&255,b.call(this));this.G=this.G&-65281|c<<8},function(a,b){var c=a[4].call(this,this.H>>8&255,b.call(this));this.H=this.H&-65281|c<<8},function(a,b){var c=a[4].call(this,this.D>>8&255,b.call(this));this.D=this.D&-65281|c<<
        8},function(a,b){var c=a[5].call(this,this.F&255,b.call(this));this.F=this.F&-256|c},function(a,b){var c=a[5].call(this,this.G&255,b.call(this));this.G=this.G&-256|c},function(a,b){var c=a[5].call(this,this.H&255,b.call(this));this.H=this.H&-256|c},function(a,b){var c=a[5].call(this,this.D&255,b.call(this));this.D=this.D&-256|c},function(a,b){var c=a[5].call(this,this.F>>8&255,b.call(this));this.F=this.F&-65281|c<<8},function(a,b){var c=a[5].call(this,this.G>>8&255,b.call(this));this.G=this.G&-65281|
        c<<8},function(a,b){var c=a[5].call(this,this.H>>8&255,b.call(this));this.H=this.H&-65281|c<<8},function(a,b){var c=a[5].call(this,this.D>>8&255,b.call(this));this.D=this.D&-65281|c<<8},function(a,b){var c=a[6].call(this,this.F&255,b.call(this));this.F=this.F&-256|c},function(a,b){var c=a[6].call(this,this.G&255,b.call(this));this.G=this.G&-256|c},function(a,b){var c=a[6].call(this,this.H&255,b.call(this));this.H=this.H&-256|c},function(a,b){var c=a[6].call(this,this.D&255,b.call(this));this.D=this.D&
        -256|c},function(a,b){var c=a[6].call(this,this.F>>8&255,b.call(this));this.F=this.F&-65281|c<<8},function(a,b){var c=a[6].call(this,this.G>>8&255,b.call(this));this.G=this.G&-65281|c<<8},function(a,b){var c=a[6].call(this,this.H>>8&255,b.call(this));this.H=this.H&-65281|c<<8},function(a,b){var c=a[6].call(this,this.D>>8&255,b.call(this));this.D=this.D&-65281|c<<8},function(a,b){var c=a[7].call(this,this.F&255,b.call(this));this.F=this.F&-256|c},function(a,b){var c=a[7].call(this,this.G&255,b.call(this));
        this.G=this.G&-256|c},function(a,b){var c=a[7].call(this,this.H&255,b.call(this));this.H=this.H&-256|c},function(a,b){var c=a[7].call(this,this.D&255,b.call(this));this.D=this.D&-256|c},function(a,b){var c=a[7].call(this,this.F>>8&255,b.call(this));this.F=this.F&-65281|c<<8},function(a,b){var c=a[7].call(this,this.G>>8&255,b.call(this));this.G=this.G&-65281|c<<8},function(a,b){var c=a[7].call(this,this.H>>8&255,b.call(this));this.H=this.H&-65281|c<<8},function(a,b){var c=a[7].call(this,this.D>>8&
        255,b.call(this));this.D=this.D&-65281|c<<8}],B=[function(a){a=a.call(this,this.F&this.C,H(this,this.F));this.F=this.F&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.F&this.C,H(this,this.G));this.F=this.F&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.F&this.C,H(this,this.H));this.F=this.F&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.F&this.C,H(this,this.D));this.F=this.F&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.F&this.C,H(this,S(this,0)));this.F=
        this.F&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.F&this.C,H(this,R(this)));this.F=this.F&~this.C|a;this.A-=this.B.aa},function(a){a=a.call(this,this.F&this.C,H(this,this.K));this.F=this.F&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.F&this.C,H(this,this.J));this.F=this.F&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.G&this.C,H(this,this.F));this.G=this.G&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.G&this.C,H(this,this.G));this.G=this.G&~this.C|
        a;this.A-=this.B.N},function(a){a=a.call(this,this.G&this.C,H(this,this.H));this.G=this.G&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.G&this.C,H(this,this.D));this.G=this.G&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.G&this.C,H(this,S(this,0)));this.G=this.G&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.G&this.C,H(this,R(this)));this.G=this.G&~this.C|a;this.A-=this.B.aa},function(a){a=a.call(this,this.G&this.C,H(this,this.K));this.G=this.G&~this.C|a;this.A-=
        this.B.N},function(a){a=a.call(this,this.G&this.C,H(this,this.J));this.G=this.G&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.H&this.C,H(this,this.F));this.H=this.H&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.H&this.C,H(this,this.G));this.H=this.H&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.H&this.C,H(this,this.H));this.H=this.H&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.H&this.C,H(this,this.D));this.H=this.H&~this.C|a;this.A-=this.B.N},function(a){a=
        a.call(this,this.H&this.C,H(this,S(this,0)));this.H=this.H&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.H&this.C,H(this,R(this)));this.H=this.H&~this.C|a;this.A-=this.B.aa},function(a){a=a.call(this,this.H&this.C,H(this,this.K));this.H=this.H&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.H&this.C,H(this,this.J));this.H=this.H&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.D&this.C,H(this,this.F));this.D=this.D&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,
        this.D&this.C,H(this,this.G));this.D=this.D&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.D&this.C,H(this,this.H));this.D=this.D&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.D&this.C,H(this,this.D));this.D=this.D&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.D&this.C,H(this,S(this,0)));this.D=this.D&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.D&this.C,H(this,R(this)));this.D=this.D&~this.C|a;this.A-=this.B.aa},function(a){a=a.call(this,this.D&
        this.C,H(this,this.K));this.D=this.D&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.D&this.C,H(this,this.J));this.D=this.D&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,q(this)&this.C,H(this,this.F));t(this,q(this)&~this.C|a);this.A-=this.B.N},function(a){a=a.call(this,q(this)&this.C,H(this,this.G));t(this,q(this)&~this.C|a);this.A-=this.B.N},function(a){a=a.call(this,q(this)&this.C,H(this,this.H));t(this,q(this)&~this.C|a);this.A-=this.B.N},function(a){a=a.call(this,q(this)&this.C,
        H(this,this.D));t(this,q(this)&~this.C|a);this.A-=this.B.N},function(a){a=a.call(this,q(this)&this.C,H(this,S(this,0)));t(this,q(this)&~this.C|a);this.A-=this.B.N},function(a){a=a.call(this,q(this)&this.C,H(this,R(this)));t(this,q(this)&~this.C|a);this.A-=this.B.aa},function(a){a=a.call(this,q(this)&this.C,H(this,this.K));t(this,q(this)&~this.C|a);this.A-=this.B.N},function(a){a=a.call(this,q(this)&this.C,H(this,this.J));t(this,q(this)&~this.C|a);this.A-=this.B.N},function(a){a=a.call(this,this.L&
        this.C,H(this,this.F));this.L=this.L&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.L&this.C,H(this,this.G));this.L=this.L&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.L&this.C,H(this,this.H));this.L=this.L&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.L&this.C,H(this,this.D));this.L=this.L&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.L&this.C,H(this,S(this,0)));this.L=this.L&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.L&this.C,H(this,
        R(this)));this.L=this.L&~this.C|a;this.A-=this.B.aa},function(a){a=a.call(this,this.L&this.C,H(this,this.K));this.L=this.L&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.L&this.C,H(this,this.J));this.L=this.L&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.K&this.C,H(this,this.F));this.K=this.K&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.K&this.C,H(this,this.G));this.K=this.K&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.K&this.C,H(this,this.H));
        this.K=this.K&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.K&this.C,H(this,this.D));this.K=this.K&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.K&this.C,H(this,S(this,0)));this.K=this.K&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.K&this.C,H(this,R(this)));this.K=this.K&~this.C|a;this.A-=this.B.aa},function(a){a=a.call(this,this.K&this.C,H(this,this.K));this.K=this.K&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.K&this.C,H(this,this.J));this.K=
        this.K&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.J&this.C,H(this,this.F));this.J=this.J&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.J&this.C,H(this,this.G));this.J=this.J&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.J&this.C,H(this,this.H));this.J=this.J&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.J&this.C,H(this,this.D));this.J=this.J&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.J&this.C,H(this,S(this,0)));this.J=this.J&~this.C|
        a;this.A-=this.B.N},function(a){a=a.call(this,this.J&this.C,H(this,R(this)));this.J=this.J&~this.C|a;this.A-=this.B.aa},function(a){a=a.call(this,this.J&this.C,H(this,this.K));this.J=this.J&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.J&this.C,H(this,this.J));this.J=this.J&~this.C|a;this.A-=this.B.N},function(a){a=a.call(this,this.F&this.C,H(this,this.F+this.M()));this.F=this.F&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&this.C,H(this,this.G+this.M()));this.F=this.F&
        ~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&this.C,H(this,this.H+this.M()));this.F=this.F&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&this.C,H(this,this.D+this.M()));this.F=this.F&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&this.C,H(this,S(this,1)+this.M()));this.F=this.F&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&this.C,I(this,this.L+this.M()));this.F=this.F&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&this.C,H(this,
        this.K+this.M()));this.F=this.F&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&this.C,H(this,this.J+this.M()));this.F=this.F&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&this.C,H(this,this.F+this.M()));this.G=this.G&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&this.C,H(this,this.G+this.M()));this.G=this.G&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&this.C,H(this,this.H+this.M()));this.G=this.G&~this.C|a;this.A-=this.B.I},function(a){a=
        a.call(this,this.G&this.C,H(this,this.D+this.M()));this.G=this.G&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&this.C,H(this,S(this,1)+this.M()));this.G=this.G&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&this.C,I(this,this.L+this.M()));this.G=this.G&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&this.C,H(this,this.K+this.M()));this.G=this.G&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&this.C,H(this,this.J+this.M()));this.G=this.G&~this.C|
        a;this.A-=this.B.I},function(a){a=a.call(this,this.H&this.C,H(this,this.F+this.M()));this.H=this.H&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&this.C,H(this,this.G+this.M()));this.H=this.H&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&this.C,H(this,this.H+this.M()));this.H=this.H&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&this.C,H(this,this.D+this.M()));this.H=this.H&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&this.C,H(this,S(this,
        1)+this.M()));this.H=this.H&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&this.C,I(this,this.L+this.M()));this.H=this.H&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&this.C,H(this,this.K+this.M()));this.H=this.H&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&this.C,H(this,this.J+this.M()));this.H=this.H&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&this.C,H(this,this.F+this.M()));this.D=this.D&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,
        this.D&this.C,H(this,this.G+this.M()));this.D=this.D&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&this.C,H(this,this.H+this.M()));this.D=this.D&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&this.C,H(this,this.D+this.M()));this.D=this.D&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&this.C,H(this,S(this,1)+this.M()));this.D=this.D&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&this.C,I(this,this.L+this.M()));this.D=this.D&~this.C|a;this.A-=
        this.B.I},function(a){a=a.call(this,this.D&this.C,H(this,this.K+this.M()));this.D=this.D&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&this.C,H(this,this.J+this.M()));this.D=this.D&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,q(this)&this.C,H(this,this.F+this.M()));t(this,q(this)&~this.C|a);this.A-=this.B.I},function(a){a=a.call(this,q(this)&this.C,H(this,this.G+this.M()));t(this,q(this)&~this.C|a);this.A-=this.B.I},function(a){a=a.call(this,q(this)&this.C,H(this,this.H+this.M()));
        t(this,q(this)&~this.C|a);this.A-=this.B.I},function(a){a=a.call(this,q(this)&this.C,H(this,this.D+this.M()));t(this,q(this)&~this.C|a);this.A-=this.B.I},function(a){a=a.call(this,q(this)&this.C,H(this,S(this,1)+this.M()));t(this,q(this)&~this.C|a);this.A-=this.B.I},function(a){a=a.call(this,q(this)&this.C,I(this,this.L+this.M()));t(this,q(this)&~this.C|a);this.A-=this.B.I},function(a){a=a.call(this,q(this)&this.C,H(this,this.K+this.M()));t(this,q(this)&~this.C|a);this.A-=this.B.I},function(a){a=
        a.call(this,q(this)&this.C,H(this,this.J+this.M()));t(this,q(this)&~this.C|a);this.A-=this.B.I},function(a){a=a.call(this,this.L&this.C,H(this,this.F+this.M()));this.L=this.L&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.L&this.C,H(this,this.G+this.M()));this.L=this.L&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.L&this.C,H(this,this.H+this.M()));this.L=this.L&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.L&this.C,H(this,this.D+this.M()));this.L=this.L&~this.C|
        a;this.A-=this.B.I},function(a){a=a.call(this,this.L&this.C,H(this,S(this,1)+this.M()));this.L=this.L&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.L&this.C,I(this,this.L+this.M()));this.L=this.L&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.L&this.C,H(this,this.K+this.M()));this.L=this.L&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.L&this.C,H(this,this.J+this.M()));this.L=this.L&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.K&this.C,H(this,this.F+
        this.M()));this.K=this.K&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.K&this.C,H(this,this.G+this.M()));this.K=this.K&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.K&this.C,H(this,this.H+this.M()));this.K=this.K&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.K&this.C,H(this,this.D+this.M()));this.K=this.K&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.K&this.C,H(this,S(this,1)+this.M()));this.K=this.K&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,
        this.K&this.C,I(this,this.L+this.M()));this.K=this.K&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.K&this.C,H(this,this.K+this.M()));this.K=this.K&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.K&this.C,H(this,this.J+this.M()));this.K=this.K&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.J&this.C,H(this,this.F+this.M()));this.J=this.J&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.J&this.C,H(this,this.G+this.M()));this.J=this.J&~this.C|a;this.A-=this.B.I},
        function(a){a=a.call(this,this.J&this.C,H(this,this.H+this.M()));this.J=this.J&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.J&this.C,H(this,this.D+this.M()));this.J=this.J&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.J&this.C,H(this,S(this,1)+this.M()));this.J=this.J&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.J&this.C,I(this,this.L+this.M()));this.J=this.J&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.J&this.C,H(this,this.K+this.M()));this.J=
        this.J&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.J&this.C,H(this,this.J+this.M()));this.J=this.J&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&this.C,H(this,this.F+R(this)));this.F=this.F&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&this.C,H(this,this.G+R(this)));this.F=this.F&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&this.C,H(this,this.H+R(this)));this.F=this.F&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&this.C,H(this,
        this.D+R(this)));this.F=this.F&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&this.C,H(this,S(this,2)+R(this)));this.F=this.F&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&this.C,I(this,this.L+R(this)));this.F=this.F&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&this.C,H(this,this.K+R(this)));this.F=this.F&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&this.C,H(this,this.J+R(this)));this.F=this.F&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,
        this.G&this.C,H(this,this.F+R(this)));this.G=this.G&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&this.C,H(this,this.G+R(this)));this.G=this.G&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&this.C,H(this,this.H+R(this)));this.G=this.G&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&this.C,H(this,this.D+R(this)));this.G=this.G&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&this.C,H(this,S(this,2)+R(this)));this.G=this.G&~this.C|a;this.A-=this.B.I},
        function(a){a=a.call(this,this.G&this.C,I(this,this.L+R(this)));this.G=this.G&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&this.C,H(this,this.K+R(this)));this.G=this.G&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.G&this.C,H(this,this.J+R(this)));this.G=this.G&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&this.C,H(this,this.F+R(this)));this.H=this.H&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&this.C,H(this,this.G+R(this)));this.H=this.H&
        ~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&this.C,H(this,this.H+R(this)));this.H=this.H&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&this.C,H(this,this.D+R(this)));this.H=this.H&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&this.C,H(this,S(this,2)+R(this)));this.H=this.H&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&this.C,I(this,this.L+R(this)));this.H=this.H&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&this.C,H(this,
        this.K+R(this)));this.H=this.H&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.H&this.C,H(this,this.J+R(this)));this.H=this.H&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&this.C,H(this,this.F+R(this)));this.D=this.D&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&this.C,H(this,this.G+R(this)));this.D=this.D&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&this.C,H(this,this.H+R(this)));this.D=this.D&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,
        this.D&this.C,H(this,this.D+R(this)));this.D=this.D&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&this.C,H(this,S(this,2)+R(this)));this.D=this.D&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&this.C,I(this,this.L+R(this)));this.D=this.D&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&this.C,H(this,this.K+R(this)));this.D=this.D&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.D&this.C,H(this,this.J+R(this)));this.D=this.D&~this.C|a;this.A-=this.B.I},
        function(a){a=a.call(this,q(this)&this.C,H(this,this.F+R(this)));t(this,q(this)&~this.C|a);this.A-=this.B.I},function(a){a=a.call(this,q(this)&this.C,H(this,this.G+R(this)));t(this,q(this)&~this.C|a);this.A-=this.B.I},function(a){a=a.call(this,q(this)&this.C,H(this,this.H+R(this)));t(this,q(this)&~this.C|a);this.A-=this.B.I},function(a){a=a.call(this,q(this)&this.C,H(this,this.D+R(this)));t(this,q(this)&~this.C|a);this.A-=this.B.I},function(a){a=a.call(this,q(this)&this.C,H(this,S(this,2)+R(this)));
        t(this,q(this)&~this.C|a);this.A-=this.B.I},function(a){a=a.call(this,q(this)&this.C,I(this,this.L+R(this)));t(this,q(this)&~this.C|a);this.A-=this.B.I},function(a){a=a.call(this,q(this)&this.C,H(this,this.K+R(this)));t(this,q(this)&~this.C|a);this.A-=this.B.I},function(a){a=a.call(this,q(this)&this.C,H(this,this.J+R(this)));t(this,q(this)&~this.C|a);this.A-=this.B.I},function(a){a=a.call(this,this.L&this.C,H(this,this.F+R(this)));this.L=this.L&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,
        this.L&this.C,H(this,this.G+R(this)));this.L=this.L&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.L&this.C,H(this,this.H+R(this)));this.L=this.L&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.L&this.C,H(this,this.D+R(this)));this.L=this.L&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.L&this.C,H(this,S(this,2)+R(this)));this.L=this.L&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.L&this.C,I(this,this.L+R(this)));this.L=this.L&~this.C|a;this.A-=this.B.I},
        function(a){a=a.call(this,this.L&this.C,H(this,this.K+R(this)));this.L=this.L&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.L&this.C,H(this,this.J+R(this)));this.L=this.L&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.K&this.C,H(this,this.F+R(this)));this.K=this.K&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.K&this.C,H(this,this.G+R(this)));this.K=this.K&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.K&this.C,H(this,this.H+R(this)));this.K=this.K&
        ~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.K&this.C,H(this,this.D+R(this)));this.K=this.K&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.K&this.C,H(this,S(this,2)+R(this)));this.K=this.K&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.K&this.C,I(this,this.L+R(this)));this.K=this.K&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.K&this.C,H(this,this.K+R(this)));this.K=this.K&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.K&this.C,H(this,
        this.J+R(this)));this.K=this.K&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.J&this.C,H(this,this.F+R(this)));this.J=this.J&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.J&this.C,H(this,this.G+R(this)));this.J=this.J&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.J&this.C,H(this,this.H+R(this)));this.J=this.J&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.J&this.C,H(this,this.D+R(this)));this.J=this.J&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,
        this.J&this.C,H(this,S(this,2)+R(this)));this.J=this.J&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.J&this.C,I(this,this.L+R(this)));this.J=this.J&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.J&this.C,H(this,this.K+R(this)));this.J=this.J&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.J&this.C,H(this,this.J+R(this)));this.J=this.J&~this.C|a;this.A-=this.B.I},function(a){a=a.call(this,this.F&this.C,this.F&this.C);this.F=this.F&~this.C|a},function(a){a=a.call(this,
        this.F&this.C,this.G&this.C);this.F=this.F&~this.C|a},function(a){a=a.call(this,this.F&this.C,this.H&this.C);this.F=this.F&~this.C|a},function(a){a=a.call(this,this.F&this.C,this.D&this.C);this.F=this.F&~this.C|a},function(a){a=a.call(this,this.F&this.C,q(this)&this.C);this.F=this.F&~this.C|a},function(a){a=a.call(this,this.F&this.C,this.L&this.C);this.F=this.F&~this.C|a},function(a){a=a.call(this,this.F&this.C,this.K&this.C);this.F=this.F&~this.C|a},function(a){a=a.call(this,this.F&this.C,this.J&
        this.C);this.F=this.F&~this.C|a},function(a){a=a.call(this,this.G&this.C,this.F&this.C);this.G=this.G&~this.C|a},function(a){a=a.call(this,this.G&this.C,this.G&this.C);this.G=this.G&~this.C|a},function(a){a=a.call(this,this.G&this.C,this.H&this.C);this.G=this.G&~this.C|a},function(a){a=a.call(this,this.G&this.C,this.D&this.C);this.G=this.G&~this.C|a},function(a){a=a.call(this,this.G&this.C,q(this)&this.C);this.G=this.G&~this.C|a},function(a){a=a.call(this,this.G&this.C,this.L&this.C);this.G=this.G&
        ~this.C|a},function(a){a=a.call(this,this.G&this.C,this.K&this.C);this.G=this.G&~this.C|a},function(a){a=a.call(this,this.G&this.C,this.J&this.C);this.G=this.G&~this.C|a},function(a){a=a.call(this,this.H&this.C,this.F&this.C);this.H=this.H&~this.C|a},function(a){a=a.call(this,this.H&this.C,this.G&this.C);this.H=this.H&~this.C|a},function(a){a=a.call(this,this.H&this.C,this.H&this.C);this.H=this.H&~this.C|a},function(a){a=a.call(this,this.H&this.C,this.D&this.C);this.H=this.H&~this.C|a},function(a){a=
        a.call(this,this.H&this.C,q(this)&this.C);this.H=this.H&~this.C|a},function(a){a=a.call(this,this.H&this.C,this.L&this.C);this.H=this.H&~this.C|a},function(a){a=a.call(this,this.H&this.C,this.K&this.C);this.H=this.H&~this.C|a},function(a){a=a.call(this,this.H&this.C,this.J&this.C);this.H=this.H&~this.C|a},function(a){a=a.call(this,this.D&this.C,this.F&this.C);this.D=this.D&~this.C|a},function(a){a=a.call(this,this.D&this.C,this.G&this.C);this.D=this.D&~this.C|a},function(a){a=a.call(this,this.D&this.C,
        this.H&this.C);this.D=this.D&~this.C|a},function(a){a=a.call(this,this.D&this.C,this.D&this.C);this.D=this.D&~this.C|a},function(a){a=a.call(this,this.D&this.C,q(this)&this.C);this.D=this.D&~this.C|a},function(a){a=a.call(this,this.D&this.C,this.L&this.C);this.D=this.D&~this.C|a},function(a){a=a.call(this,this.D&this.C,this.K&this.C);this.D=this.D&~this.C|a},function(a){a=a.call(this,this.D&this.C,this.J&this.C);this.D=this.D&~this.C|a},function(a){a=a.call(this,q(this)&this.C,this.F&this.C);t(this,
        q(this)&~this.C|a)},function(a){a=a.call(this,q(this)&this.C,this.G&this.C);t(this,q(this)&~this.C|a)},function(a){a=a.call(this,q(this)&this.C,this.H&this.C);t(this,q(this)&~this.C|a)},function(a){a=a.call(this,q(this)&this.C,this.D&this.C);t(this,q(this)&~this.C|a)},function(a){a=a.call(this,q(this)&this.C,q(this)&this.C);t(this,q(this)&~this.C|a)},function(a){a=a.call(this,q(this)&this.C,this.L&this.C);t(this,q(this)&~this.C|a)},function(a){a=a.call(this,q(this)&this.C,this.K&this.C);t(this,q(this)&
        ~this.C|a)},function(a){a=a.call(this,q(this)&this.C,this.J&this.C);t(this,q(this)&~this.C|a)},function(a){a=a.call(this,this.L&this.C,this.F&this.C);this.L=this.L&~this.C|a},function(a){a=a.call(this,this.L&this.C,this.G&this.C);this.L=this.L&~this.C|a},function(a){a=a.call(this,this.L&this.C,this.H&this.C);this.L=this.L&~this.C|a},function(a){a=a.call(this,this.L&this.C,this.D&this.C);this.L=this.L&~this.C|a},function(a){a=a.call(this,this.L&this.C,q(this)&this.C);this.L=this.L&~this.C|a},function(a){a=
        a.call(this,this.L&this.C,this.L&this.C);this.L=this.L&~this.C|a},function(a){a=a.call(this,this.L&this.C,this.K&this.C);this.L=this.L&~this.C|a},function(a){a=a.call(this,this.L&this.C,this.J&this.C);this.L=this.L&~this.C|a},function(a){a=a.call(this,this.K&this.C,this.F&this.C);this.K=this.K&~this.C|a},function(a){a=a.call(this,this.K&this.C,this.G&this.C);this.K=this.K&~this.C|a},function(a){a=a.call(this,this.K&this.C,this.H&this.C);this.K=this.K&~this.C|a},function(a){a=a.call(this,this.K&this.C,
        this.D&this.C);this.K=this.K&~this.C|a},function(a){a=a.call(this,this.K&this.C,q(this)&this.C);this.K=this.K&~this.C|a},function(a){a=a.call(this,this.K&this.C,this.L&this.C);this.K=this.K&~this.C|a},function(a){a=a.call(this,this.K&this.C,this.K&this.C);this.K=this.K&~this.C|a},function(a){a=a.call(this,this.K&this.C,this.J&this.C);this.K=this.K&~this.C|a},function(a){a=a.call(this,this.J&this.C,this.F&this.C);this.J=this.J&~this.C|a},function(a){a=a.call(this,this.J&this.C,this.G&this.C);this.J=
        this.J&~this.C|a},function(a){a=a.call(this,this.J&this.C,this.H&this.C);this.J=this.J&~this.C|a},function(a){a=a.call(this,this.J&this.C,this.D&this.C);this.J=this.J&~this.C|a},function(a){a=a.call(this,this.J&this.C,q(this)&this.C);this.J=this.J&~this.C|a},function(a){a=a.call(this,this.J&this.C,this.L&this.C);this.J=this.J&~this.C|a},function(a){a=a.call(this,this.J&this.C,this.K&this.C);this.J=this.J&~this.C|a},function(a){a=a.call(this,this.J&this.C,this.J&this.C);this.J=this.J&~this.C|a}],Rd=
        [function(a){a=a.call(this,M(this,this.F),this.F&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,this.G),this.F&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,this.H),this.F&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,this.D),this.F&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,S(this,0)),this.F&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,R(this)),this.F&this.C);Q(this,a);this.A-=this.B.aa},
        function(a){a=a.call(this,M(this,this.K),this.F&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,this.J),this.F&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,this.F),this.G&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,this.G),this.G&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,this.H),this.G&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,this.D),this.G&this.C);Q(this,a);this.A-=this.B.N},
        function(a){a=a.call(this,M(this,S(this,0)),this.G&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,R(this)),this.G&this.C);Q(this,a);this.A-=this.B.aa},function(a){a=a.call(this,M(this,this.K),this.G&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,this.J),this.G&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,this.F),this.H&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,this.G),this.H&this.C);Q(this,a);this.A-=this.B.N},
        function(a){a=a.call(this,M(this,this.H),this.H&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,this.D),this.H&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,S(this,0)),this.H&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,R(this)),this.H&this.C);Q(this,a);this.A-=this.B.aa},function(a){a=a.call(this,M(this,this.K),this.H&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,this.J),this.H&this.C);Q(this,a);this.A-=this.B.N},
        function(a){a=a.call(this,M(this,this.F),this.D&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,this.G),this.D&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,this.H),this.D&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,this.D),this.D&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,S(this,0)),this.D&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,R(this)),this.D&this.C);Q(this,a);this.A-=this.B.aa},
        function(a){a=a.call(this,M(this,this.K),this.D&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,this.J),this.D&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,this.F),q(this)&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,this.G),q(this)&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,this.H),q(this)&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,this.D),q(this)&this.C);Q(this,a);this.A-=this.B.N},
        function(a){a=a.call(this,M(this,S(this,0)),q(this)&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,R(this)),q(this)&this.C);Q(this,a);this.A-=this.B.aa},function(a){a=a.call(this,M(this,this.K),q(this)&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,this.J),q(this)&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,this.F),this.L&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,this.G),this.L&this.C);Q(this,a);this.A-=
        this.B.N},function(a){a=a.call(this,M(this,this.H),this.L&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,this.D),this.L&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,S(this,0)),this.L&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,R(this)),this.L&this.C);Q(this,a);this.A-=this.B.aa},function(a){a=a.call(this,M(this,this.K),this.L&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,this.J),this.L&this.C);Q(this,a);
        this.A-=this.B.N},function(a){a=a.call(this,M(this,this.F),this.K&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,this.G),this.K&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,this.H),this.K&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,this.D),this.K&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,S(this,0)),this.K&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,R(this)),this.K&this.C);Q(this,
        a);this.A-=this.B.aa},function(a){a=a.call(this,M(this,this.K),this.K&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,this.J),this.K&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,this.F),this.J&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,this.G),this.J&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,this.H),this.J&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,this.D),this.J&this.C);Q(this,
        a);this.A-=this.B.N},function(a){a=a.call(this,M(this,S(this,0)),this.J&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,R(this)),this.J&this.C);Q(this,a);this.A-=this.B.aa},function(a){a=a.call(this,M(this,this.K),this.J&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,this.J),this.J&this.C);Q(this,a);this.A-=this.B.N},function(a){a=a.call(this,M(this,this.F+this.M()),this.F&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.G+this.M()),
        this.F&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.H+this.M()),this.F&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.D+this.M()),this.F&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,S(this,1)+this.M()),this.F&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,O(this,this.L+this.M()),this.F&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.K+this.M()),this.F&this.C);Q(this,a);this.A-=
        this.B.I},function(a){a=a.call(this,M(this,this.J+this.M()),this.F&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.F+this.M()),this.G&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.G+this.M()),this.G&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.H+this.M()),this.G&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.D+this.M()),this.G&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,
        M(this,S(this,1)+this.M()),this.G&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,O(this,this.L+this.M()),this.G&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.K+this.M()),this.G&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.J+this.M()),this.G&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.F+this.M()),this.H&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.G+this.M()),this.H&this.C);
        Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.H+this.M()),this.H&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.D+this.M()),this.H&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,S(this,1)+this.M()),this.H&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,O(this,this.L+this.M()),this.H&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.K+this.M()),this.H&this.C);Q(this,a);this.A-=this.B.I},function(a){a=
        a.call(this,M(this,this.J+this.M()),this.H&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.F+this.M()),this.D&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.G+this.M()),this.D&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.H+this.M()),this.D&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.D+this.M()),this.D&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,S(this,1)+this.M()),
        this.D&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,O(this,this.L+this.M()),this.D&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.K+this.M()),this.D&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.J+this.M()),this.D&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.F+this.M()),q(this)&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.G+this.M()),q(this)&this.C);Q(this,a);this.A-=this.B.I},
        function(a){a=a.call(this,M(this,this.H+this.M()),q(this)&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.D+this.M()),q(this)&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,S(this,1)+this.M()),q(this)&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,O(this,this.L+this.M()),q(this)&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.K+this.M()),q(this)&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,
        this.J+this.M()),q(this)&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.F+this.M()),this.L&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.G+this.M()),this.L&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.H+this.M()),this.L&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.D+this.M()),this.L&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,S(this,1)+this.M()),this.L&this.C);
        Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,O(this,this.L+this.M()),this.L&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.K+this.M()),this.L&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.J+this.M()),this.L&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.F+this.M()),this.K&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.G+this.M()),this.K&this.C);Q(this,a);this.A-=this.B.I},function(a){a=
        a.call(this,M(this,this.H+this.M()),this.K&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.D+this.M()),this.K&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,S(this,1)+this.M()),this.K&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,O(this,this.L+this.M()),this.K&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.K+this.M()),this.K&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.J+this.M()),
        this.K&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.F+this.M()),this.J&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.G+this.M()),this.J&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.H+this.M()),this.J&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.D+this.M()),this.J&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,S(this,1)+this.M()),this.J&this.C);Q(this,a);this.A-=
        this.B.I},function(a){a=a.call(this,O(this,this.L+this.M()),this.J&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.K+this.M()),this.J&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.J+this.M()),this.J&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.F+R(this)),this.F&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.G+R(this)),this.F&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,
        this.H+R(this)),this.F&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.D+R(this)),this.F&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,S(this,2)+R(this)),this.F&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,O(this,this.L+R(this)),this.F&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.K+R(this)),this.F&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.J+R(this)),this.F&this.C);Q(this,
        a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.F+R(this)),this.G&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.G+R(this)),this.G&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.H+R(this)),this.G&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.D+R(this)),this.G&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,S(this,2)+R(this)),this.G&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,
        O(this,this.L+R(this)),this.G&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.K+R(this)),this.G&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.J+R(this)),this.G&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.F+R(this)),this.H&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.G+R(this)),this.H&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.H+R(this)),this.H&this.C);Q(this,
        a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.D+R(this)),this.H&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,S(this,2)+R(this)),this.H&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,O(this,this.L+R(this)),this.H&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.K+R(this)),this.H&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.J+R(this)),this.H&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,
        M(this,this.F+R(this)),this.D&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.G+R(this)),this.D&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.H+R(this)),this.D&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.D+R(this)),this.D&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,S(this,2)+R(this)),this.D&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,O(this,this.L+R(this)),this.D&this.C);
        Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.K+R(this)),this.D&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.J+R(this)),this.D&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.F+R(this)),q(this)&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.G+R(this)),q(this)&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.H+R(this)),q(this)&this.C);Q(this,a);this.A-=this.B.I},function(a){a=
        a.call(this,M(this,this.D+R(this)),q(this)&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,S(this,2)+R(this)),q(this)&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,O(this,this.L+R(this)),q(this)&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.K+R(this)),q(this)&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.J+R(this)),q(this)&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.F+R(this)),
        this.L&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.G+R(this)),this.L&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.H+R(this)),this.L&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.D+R(this)),this.L&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,S(this,2)+R(this)),this.L&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,O(this,this.L+R(this)),this.L&this.C);Q(this,a);this.A-=this.B.I},
        function(a){a=a.call(this,M(this,this.K+R(this)),this.L&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.J+R(this)),this.L&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.F+R(this)),this.K&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.G+R(this)),this.K&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.H+R(this)),this.K&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.D+R(this)),
        this.K&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,S(this,2)+R(this)),this.K&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,O(this,this.L+R(this)),this.K&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.K+R(this)),this.K&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.J+R(this)),this.K&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.F+R(this)),this.J&this.C);Q(this,a);this.A-=this.B.I},
        function(a){a=a.call(this,M(this,this.G+R(this)),this.J&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.H+R(this)),this.J&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.D+R(this)),this.J&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,S(this,2)+R(this)),this.J&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,O(this,this.L+R(this)),this.J&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.K+
        R(this)),this.J&this.C);Q(this,a);this.A-=this.B.I},function(a){a=a.call(this,M(this,this.J+R(this)),this.J&this.C);Q(this,a);this.A-=this.B.I},B[192],B[200],B[208],B[216],B[224],B[232],B[240],B[248],B[193],B[201],B[209],B[217],B[225],B[233],B[241],B[249],B[194],B[202],B[210],B[218],B[226],B[234],B[242],B[250],B[195],B[203],B[211],B[219],B[227],B[235],B[243],B[251],B[196],B[204],B[212],B[220],B[228],B[236],B[244],B[252],B[197],B[205],B[213],B[221],B[229],B[237],B[245],B[253],B[198],B[206],B[214],
        B[222],B[230],B[238],B[246],B[254],B[199],B[207],B[215],B[223],B[231],B[239],B[247],B[255]],Sd=[function(a,b){var c=a[0].call(this,M(this,this.F),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[0].call(this,M(this,this.G),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[0].call(this,M(this,this.H),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[0].call(this,M(this,this.D),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[0].call(this,M(this,
        S(this,0)),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[0].call(this,M(this,R(this)),b.call(this));Q(this,c);this.A-=this.B.aa},function(a,b){var c=a[0].call(this,M(this,this.K),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[0].call(this,M(this,this.J),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[1].call(this,M(this,this.F),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[1].call(this,M(this,this.G),b.call(this));Q(this,c);this.A-=
        this.B.N},function(a,b){var c=a[1].call(this,M(this,this.H),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[1].call(this,M(this,this.D),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[1].call(this,M(this,S(this,0)),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[1].call(this,M(this,R(this)),b.call(this));Q(this,c);this.A-=this.B.aa},function(a,b){var c=a[1].call(this,M(this,this.K),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[1].call(this,
        M(this,this.J),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[2].call(this,M(this,this.F),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[2].call(this,M(this,this.G),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[2].call(this,M(this,this.H),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[2].call(this,M(this,this.D),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[2].call(this,M(this,S(this,0)),b.call(this));Q(this,c);
        this.A-=this.B.N},function(a,b){var c=a[2].call(this,M(this,R(this)),b.call(this));Q(this,c);this.A-=this.B.aa},function(a,b){var c=a[2].call(this,M(this,this.K),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[2].call(this,M(this,this.J),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[3].call(this,M(this,this.F),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[3].call(this,M(this,this.G),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[3].call(this,
        M(this,this.H),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[3].call(this,M(this,this.D),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[3].call(this,M(this,S(this,0)),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[3].call(this,M(this,R(this)),b.call(this));Q(this,c);this.A-=this.B.aa},function(a,b){var c=a[3].call(this,M(this,this.K),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[3].call(this,M(this,this.J),b.call(this));Q(this,
        c);this.A-=this.B.N},function(a,b){var c=a[4].call(this,M(this,this.F),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[4].call(this,M(this,this.G),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[4].call(this,M(this,this.H),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[4].call(this,M(this,this.D),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[4].call(this,M(this,S(this,0)),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=
        a[4].call(this,M(this,R(this)),b.call(this));Q(this,c);this.A-=this.B.aa},function(a,b){var c=a[4].call(this,M(this,this.K),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[4].call(this,M(this,this.J),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[5].call(this,M(this,this.F),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[5].call(this,M(this,this.G),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[5].call(this,M(this,this.H),b.call(this));
        Q(this,c);this.A-=this.B.N},function(a,b){var c=a[5].call(this,M(this,this.D),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[5].call(this,M(this,S(this,0)),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[5].call(this,M(this,R(this)),b.call(this));Q(this,c);this.A-=this.B.aa},function(a,b){var c=a[5].call(this,M(this,this.K),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[5].call(this,M(this,this.J),b.call(this));Q(this,c);this.A-=this.B.N},function(a,
        b){var c=a[6].call(this,M(this,this.F),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[6].call(this,M(this,this.G),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[6].call(this,M(this,this.H),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[6].call(this,M(this,this.D),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[6].call(this,M(this,S(this,0)),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[6].call(this,M(this,R(this)),
        b.call(this));Q(this,c);this.A-=this.B.aa},function(a,b){var c=a[6].call(this,M(this,this.K),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[6].call(this,M(this,this.J),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[7].call(this,M(this,this.F),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[7].call(this,M(this,this.G),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[7].call(this,M(this,this.H),b.call(this));Q(this,c);this.A-=this.B.N},
        function(a,b){var c=a[7].call(this,M(this,this.D),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[7].call(this,M(this,S(this,0)),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[7].call(this,M(this,R(this)),b.call(this));Q(this,c);this.A-=this.B.aa},function(a,b){var c=a[7].call(this,M(this,this.K),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[7].call(this,M(this,this.J),b.call(this));Q(this,c);this.A-=this.B.N},function(a,b){var c=a[0].call(this,M(this,
        this.F+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,M(this,this.G+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,M(this,this.H+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,M(this,this.D+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,M(this,S(this,1)+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,
        O(this,this.L+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,M(this,this.K+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,M(this,this.J+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,M(this,this.F+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,M(this,this.G+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,
        M(this,this.H+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,M(this,this.D+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,M(this,S(this,1)+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,O(this,this.L+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,M(this,this.K+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,
        M(this,this.J+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,M(this,this.F+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,M(this,this.G+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,M(this,this.H+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,M(this,this.D+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,
        M(this,S(this,1)+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,O(this,this.L+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,M(this,this.K+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,M(this,this.J+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,M(this,this.F+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,
        M(this,this.G+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,M(this,this.H+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,M(this,this.D+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,M(this,S(this,1)+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,O(this,this.L+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,
        M(this,this.K+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,M(this,this.J+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,M(this,this.F+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,M(this,this.G+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,M(this,this.H+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,
        M(this,this.D+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,M(this,S(this,1)+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,O(this,this.L+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,M(this,this.K+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,M(this,this.J+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,
        M(this,this.F+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,M(this,this.G+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,M(this,this.H+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,M(this,this.D+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,M(this,S(this,1)+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,
        O(this,this.L+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,M(this,this.K+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,M(this,this.J+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,M(this,this.F+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,M(this,this.G+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,
        M(this,this.H+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,M(this,this.D+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,M(this,S(this,1)+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,O(this,this.L+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,M(this,this.K+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,
        M(this,this.J+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,M(this,this.F+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,M(this,this.G+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,M(this,this.H+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,M(this,this.D+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,
        M(this,S(this,1)+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,O(this,this.L+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,M(this,this.K+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,M(this,this.J+this.M()),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,M(this,this.F+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,
        M(this,this.G+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,M(this,this.H+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,M(this,this.D+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,M(this,S(this,2)+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,O(this,this.L+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,
        M(this,this.K+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,M(this,this.J+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,M(this,this.F+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,M(this,this.G+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,M(this,this.H+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,M(this,
        this.D+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,M(this,S(this,2)+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,O(this,this.L+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,M(this,this.K+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[1].call(this,M(this,this.J+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,M(this,
        this.F+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,M(this,this.G+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,M(this,this.H+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,M(this,this.D+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,M(this,S(this,2)+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,O(this,
        this.L+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,M(this,this.K+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[2].call(this,M(this,this.J+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,M(this,this.F+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,M(this,this.G+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,M(this,this.H+
        R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,M(this,this.D+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,M(this,S(this,2)+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,O(this,this.L+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,M(this,this.K+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[3].call(this,M(this,this.J+
        R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,M(this,this.F+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,M(this,this.G+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,M(this,this.H+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,M(this,this.D+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,M(this,S(this,2)+
        R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,O(this,this.L+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,M(this,this.K+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[4].call(this,M(this,this.J+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,M(this,this.F+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,M(this,this.G+R(this)),
        b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,M(this,this.H+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,M(this,this.D+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,M(this,S(this,2)+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,O(this,this.L+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,M(this,this.K+R(this)),
        b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[5].call(this,M(this,this.J+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,M(this,this.F+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,M(this,this.G+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,M(this,this.H+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,M(this,this.D+R(this)),b.call(this));
        Q(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,M(this,S(this,2)+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,O(this,this.L+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,M(this,this.K+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[6].call(this,M(this,this.J+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,M(this,this.F+R(this)),b.call(this));
        Q(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,M(this,this.G+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,M(this,this.H+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,M(this,this.D+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,M(this,S(this,2)+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,O(this,this.L+R(this)),b.call(this));
        Q(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,M(this,this.K+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[7].call(this,M(this,this.J+R(this)),b.call(this));Q(this,c);this.A-=this.B.I},function(a,b){var c=a[0].call(this,this.F&this.C,b.call(this));this.F=this.F&~this.C|c},function(a,b){var c=a[0].call(this,this.G&this.C,b.call(this));this.G=this.G&~this.C|c},function(a,b){var c=a[0].call(this,this.H&this.C,b.call(this));this.H=this.H&~this.C|c},function(a,
        b){var c=a[0].call(this,this.D&this.C,b.call(this));this.D=this.D&~this.C|c},function(a,b){var c=a[0].call(this,q(this)&this.C,b.call(this));t(this,q(this)&~this.C|c)},function(a,b){var c=a[0].call(this,this.L&this.C,b.call(this));this.L=this.L&~this.C|c},function(a,b){var c=a[0].call(this,this.K&this.C,b.call(this));this.K=this.K&~this.C|c},function(a,b){var c=a[0].call(this,this.J&this.C,b.call(this));this.J=this.J&~this.C|c},function(a,b){var c=a[1].call(this,this.F&this.C,b.call(this));this.F=
        this.F&~this.C|c},function(a,b){var c=a[1].call(this,this.G&this.C,b.call(this));this.G=this.G&~this.C|c},function(a,b){var c=a[1].call(this,this.H&this.C,b.call(this));this.H=this.H&~this.C|c},function(a,b){var c=a[1].call(this,this.D&this.C,b.call(this));this.D=this.D&~this.C|c},function(a,b){var c=a[1].call(this,q(this)&this.C,b.call(this));t(this,q(this)&~this.C|c)},function(a,b){var c=a[1].call(this,this.L&this.C,b.call(this));this.L=this.L&~this.C|c},function(a,b){var c=a[1].call(this,this.K&
        this.C,b.call(this));this.K=this.K&~this.C|c},function(a,b){var c=a[1].call(this,this.J&this.C,b.call(this));this.J=this.J&~this.C|c},function(a,b){var c=a[2].call(this,this.F&this.C,b.call(this));this.F=this.F&~this.C|c},function(a,b){var c=a[2].call(this,this.G&this.C,b.call(this));this.G=this.G&~this.C|c},function(a,b){var c=a[2].call(this,this.H&this.C,b.call(this));this.H=this.H&~this.C|c},function(a,b){var c=a[2].call(this,this.D&this.C,b.call(this));this.D=this.D&~this.C|c},function(a,b){var c=
        a[2].call(this,q(this)&this.C,b.call(this));t(this,q(this)&~this.C|c)},function(a,b){var c=a[2].call(this,this.L&this.C,b.call(this));this.L=this.L&~this.C|c},function(a,b){var c=a[2].call(this,this.K&this.C,b.call(this));this.K=this.K&~this.C|c},function(a,b){var c=a[2].call(this,this.J&this.C,b.call(this));this.J=this.J&~this.C|c},function(a,b){var c=a[3].call(this,this.F&this.C,b.call(this));this.F=this.F&~this.C|c},function(a,b){var c=a[3].call(this,this.G&this.C,b.call(this));this.G=this.G&~this.C|
        c},function(a,b){var c=a[3].call(this,this.H&this.C,b.call(this));this.H=this.H&~this.C|c},function(a,b){var c=a[3].call(this,this.D&this.C,b.call(this));this.D=this.D&~this.C|c},function(a,b){var c=a[3].call(this,q(this)&this.C,b.call(this));t(this,q(this)&~this.C|c)},function(a,b){var c=a[3].call(this,this.L&this.C,b.call(this));this.L=this.L&~this.C|c},function(a,b){var c=a[3].call(this,this.K&this.C,b.call(this));this.K=this.K&~this.C|c},function(a,b){var c=a[3].call(this,this.J&this.C,b.call(this));
        this.J=this.J&~this.C|c},function(a,b){var c=a[4].call(this,this.F&this.C,b.call(this));this.F=this.F&~this.C|c},function(a,b){var c=a[4].call(this,this.G&this.C,b.call(this));this.G=this.G&~this.C|c},function(a,b){var c=a[4].call(this,this.H&this.C,b.call(this));this.H=this.H&~this.C|c},function(a,b){var c=a[4].call(this,this.D&this.C,b.call(this));this.D=this.D&~this.C|c},function(a,b){var c=a[4].call(this,q(this)&this.C,b.call(this));t(this,q(this)&~this.C|c)},function(a,b){var c=a[4].call(this,
        this.L&this.C,b.call(this));this.L=this.L&~this.C|c},function(a,b){var c=a[4].call(this,this.K&this.C,b.call(this));this.K=this.K&~this.C|c},function(a,b){var c=a[4].call(this,this.J&this.C,b.call(this));this.J=this.J&~this.C|c},function(a,b){var c=a[5].call(this,this.F&this.C,b.call(this));this.F=this.F&~this.C|c},function(a,b){var c=a[5].call(this,this.G&this.C,b.call(this));this.G=this.G&~this.C|c},function(a,b){var c=a[5].call(this,this.H&this.C,b.call(this));this.H=this.H&~this.C|c},function(a,
        b){var c=a[5].call(this,this.D&this.C,b.call(this));this.D=this.D&~this.C|c},function(a,b){var c=a[5].call(this,q(this)&this.C,b.call(this));t(this,q(this)&~this.C|c)},function(a,b){var c=a[5].call(this,this.L&this.C,b.call(this));this.L=this.L&~this.C|c},function(a,b){var c=a[5].call(this,this.K&this.C,b.call(this));this.K=this.K&~this.C|c},function(a,b){var c=a[5].call(this,this.J&this.C,b.call(this));this.J=this.J&~this.C|c},function(a,b){var c=a[6].call(this,this.F&this.C,b.call(this));this.F=
        this.F&~this.C|c},function(a,b){var c=a[6].call(this,this.G&this.C,b.call(this));this.G=this.G&~this.C|c},function(a,b){var c=a[6].call(this,this.H&this.C,b.call(this));this.H=this.H&~this.C|c},function(a,b){var c=a[6].call(this,this.D&this.C,b.call(this));this.D=this.D&~this.C|c},function(a,b){var c=a[6].call(this,q(this)&this.C,b.call(this));t(this,q(this)&~this.C|c)},function(a,b){var c=a[6].call(this,this.L&this.C,b.call(this));this.L=this.L&~this.C|c},function(a,b){var c=a[6].call(this,this.K&
        this.C,b.call(this));this.K=this.K&~this.C|c},function(a,b){var c=a[6].call(this,this.J&this.C,b.call(this));this.J=this.J&~this.C|c},function(a,b){var c=a[7].call(this,this.F&this.C,b.call(this));this.F=this.F&~this.C|c},function(a,b){var c=a[7].call(this,this.G&this.C,b.call(this));this.G=this.G&~this.C|c},function(a,b){var c=a[7].call(this,this.H&this.C,b.call(this));this.H=this.H&~this.C|c},function(a,b){var c=a[7].call(this,this.D&this.C,b.call(this));this.D=this.D&~this.C|c},function(a,b){var c=
        a[7].call(this,q(this)&this.C,b.call(this));t(this,q(this)&~this.C|c)},function(a,b){var c=a[7].call(this,this.L&this.C,b.call(this));this.L=this.L&~this.C|c},function(a,b){var c=a[7].call(this,this.K&this.C,b.call(this));this.K=this.K&~this.C|c},function(a,b){var c=a[7].call(this,this.J&this.C,b.call(this));this.J=this.J&~this.C|c}],Be=[function(){return this.F+this.F},function(){return this.G+this.F},function(){return this.H+this.F},function(){return this.D+this.F},function(){this.da=this.ga;return q(this)+
        this.F},function(a){return(a?(this.da=this.ga,this.L):this.ia())+this.F},function(){return this.K+this.F},function(){return this.J+this.F},function(){return this.F+this.G},function(){return this.G+this.G},function(){return this.H+this.G},function(){return this.D+this.G},function(){this.da=this.ga;return q(this)+this.G},function(a){return(a?(this.da=this.ga,this.L):this.ia())+this.G},function(){return this.K+this.G},function(){return this.J+this.G},function(){return this.F+this.H},function(){return this.G+
        this.H},function(){return this.H+this.H},function(){return this.D+this.H},function(){this.da=this.ga;return q(this)+this.H},function(a){return(a?(this.da=this.ga,this.L):this.ia())+this.H},function(){return this.K+this.H},function(){return this.J+this.H},function(){return this.F+this.D},function(){return this.G+this.D},function(){return this.H+this.D},function(){return this.D+this.D},function(){this.da=this.ga;return q(this)+this.D},function(a){return(a?(this.da=this.ga,this.L):this.ia())+this.D},
        function(){return this.K+this.D},function(){return this.J+this.D},function(){return this.F},function(){return this.G},function(){return this.H},function(){return this.D},function(){this.da=this.ga;return q(this)},function(a){return a?(this.da=this.ga,this.L):this.ia()},function(){return this.K},function(){return this.J},function(){return this.F+this.L},function(){return this.G+this.L},function(){return this.H+this.L},function(){return this.D+this.L},function(){this.da=this.ga;return q(this)+this.L},
        function(a){return(a?(this.da=this.ga,this.L):this.ia())+this.L},function(){return this.K+this.L},function(){return this.J+this.L},function(){return this.F+this.K},function(){return this.G+this.K},function(){return this.H+this.K},function(){return this.D+this.K},function(){this.da=this.ga;return q(this)+this.K},function(a){return(a?(this.da=this.ga,this.L):this.ia())+this.K},function(){return this.K+this.K},function(){return this.J+this.K},function(){return this.F+this.J},function(){return this.G+
        this.J},function(){return this.H+this.J},function(){return this.D+this.J},function(){this.da=this.ga;return q(this)+this.J},function(a){return(a?(this.da=this.ga,this.L):this.ia())+this.J},function(){return this.K+this.J},function(){return this.J+this.J},function(){return this.F+(this.F<<1)},function(){return this.G+(this.F<<1)},function(){return this.H+(this.F<<1)},function(){return this.D+(this.F<<1)},function(){this.da=this.ga;return q(this)+(this.F<<1)},function(a){return(a?(this.da=this.ga,this.L):
        this.ia())+(this.F<<1)},function(){return this.K+(this.F<<1)},function(){return this.J+(this.F<<1)},function(){return this.F+(this.G<<1)},function(){return this.G+(this.G<<1)},function(){return this.H+(this.G<<1)},function(){return this.D+(this.G<<1)},function(){this.da=this.ga;return q(this)+(this.G<<1)},function(a){return(a?(this.da=this.ga,this.L):this.ia())+(this.G<<1)},function(){return this.K+(this.G<<1)},function(){return this.J+(this.G<<1)},function(){return this.F+(this.H<<1)},function(){return this.G+
        (this.H<<1)},function(){return this.H+(this.H<<1)},function(){return this.D+(this.H<<1)},function(){this.da=this.ga;return q(this)+(this.H<<1)},function(a){return(a?(this.da=this.ga,this.L):this.ia())+(this.H<<1)},function(){return this.K+(this.H<<1)},function(){return this.J+(this.H<<1)},function(){return this.F+(this.D<<1)},function(){return this.G+(this.D<<1)},function(){return this.H+(this.D<<1)},function(){return this.D+(this.D<<1)},function(){this.da=this.ga;return q(this)+(this.D<<1)},function(a){return(a?
        (this.da=this.ga,this.L):this.ia())+(this.D<<1)},function(){return this.K+(this.D<<1)},function(){return this.J+(this.D<<1)},function(){return this.F},function(){return this.G},function(){return this.H},function(){return this.D},function(){this.da=this.ga;return q(this)},function(a){return a?(this.da=this.ga,this.L):this.ia()},function(){return this.K},function(){return this.J},function(){return this.F+(this.L<<1)},function(){return this.G+(this.L<<1)},function(){return this.H+(this.L<<1)},function(){return this.D+
        (this.L<<1)},function(){this.da=this.ga;return q(this)+(this.L<<1)},function(a){return(a?(this.da=this.ga,this.L):this.ia())+(this.L<<1)},function(){return this.K+(this.L<<1)},function(){return this.J+(this.L<<1)},function(){return this.F+(this.K<<1)},function(){return this.G+(this.K<<1)},function(){return this.H+(this.K<<1)},function(){return this.D+(this.K<<1)},function(){this.da=this.ga;return q(this)+(this.K<<1)},function(a){return(a?(this.da=this.ga,this.L):this.ia())+(this.K<<1)},function(){return this.K+
        (this.K<<1)},function(){return this.J+(this.K<<1)},function(){return this.F+(this.J<<1)},function(){return this.G+(this.J<<1)},function(){return this.H+(this.J<<1)},function(){return this.D+(this.J<<1)},function(){this.da=this.ga;return q(this)+(this.J<<1)},function(a){return(a?(this.da=this.ga,this.L):this.ia())+(this.J<<1)},function(){return this.K+(this.J<<1)},function(){return this.J+(this.J<<1)},function(){return this.F+(this.F<<2)},function(){return this.G+(this.F<<2)},function(){return this.H+
        (this.F<<2)},function(){return this.D+(this.F<<2)},function(){this.da=this.ga;return q(this)+(this.F<<2)},function(a){return(a?(this.da=this.ga,this.L):this.ia())+(this.F<<2)},function(){return this.K+(this.F<<2)},function(){return this.J+(this.F<<2)},function(){return this.F+(this.G<<2)},function(){return this.G+(this.G<<2)},function(){return this.H+(this.G<<2)},function(){return this.D+(this.G<<2)},function(){this.da=this.ga;return q(this)+(this.G<<2)},function(a){return(a?(this.da=this.ga,this.L):
        this.ia())+(this.G<<2)},function(){return this.K+(this.G<<2)},function(){return this.J+(this.G<<2)},function(){return this.F+(this.H<<2)},function(){return this.G+(this.H<<2)},function(){return this.H+(this.H<<2)},function(){return this.D+(this.H<<2)},function(){this.da=this.ga;return q(this)+(this.H<<2)},function(a){return(a?(this.da=this.ga,this.L):this.ia())+(this.H<<2)},function(){return this.K+(this.H<<2)},function(){return this.J+(this.H<<2)},function(){return this.F+(this.D<<2)},function(){return this.G+
        (this.D<<2)},function(){return this.H+(this.D<<2)},function(){return this.D+(this.D<<2)},function(){this.da=this.ga;return q(this)+(this.D<<2)},function(a){return(a?(this.da=this.ga,this.L):this.ia())+(this.D<<2)},function(){return this.K+(this.D<<2)},function(){return this.J+(this.D<<2)},function(){return this.F},function(){return this.G},function(){return this.H},function(){return this.D},function(){this.da=this.ga;return q(this)},function(a){return a?(this.da=this.ga,this.L):this.ia()},function(){return this.K},
        function(){return this.J},function(){return this.F+(this.L<<2)},function(){return this.G+(this.L<<2)},function(){return this.H+(this.L<<2)},function(){return this.D+(this.L<<2)},function(){this.da=this.ga;return q(this)+(this.L<<2)},function(a){return(a?(this.da=this.ga,this.L):this.ia())+(this.L<<2)},function(){return this.K+(this.L<<2)},function(){return this.J+(this.L<<2)},function(){return this.F+(this.K<<2)},function(){return this.G+(this.K<<2)},function(){return this.H+(this.K<<2)},function(){return this.D+
        (this.K<<2)},function(){this.da=this.ga;return q(this)+(this.K<<2)},function(a){return(a?(this.da=this.ga,this.L):this.ia())+(this.K<<2)},function(){return this.K+(this.K<<2)},function(){return this.J+(this.K<<2)},function(){return this.F+(this.J<<2)},function(){return this.G+(this.J<<2)},function(){return this.H+(this.J<<2)},function(){return this.D+(this.J<<2)},function(){this.da=this.ga;return q(this)+(this.J<<2)},function(a){return(a?(this.da=this.ga,this.L):this.ia())+(this.J<<2)},function(){return this.K+
        (this.J<<2)},function(){return this.J+(this.J<<2)},function(){return this.F+(this.F<<3)},function(){return this.G+(this.F<<3)},function(){return this.H+(this.F<<3)},function(){return this.D+(this.F<<3)},function(){this.da=this.ga;return q(this)+(this.F<<3)},function(a){return(a?(this.da=this.ga,this.L):this.ia())+(this.F<<3)},function(){return this.K+(this.F<<3)},function(){return this.J+(this.F<<3)},function(){return this.F+(this.G<<3)},function(){return this.G+(this.G<<3)},function(){return this.H+
        (this.G<<3)},function(){return this.D+(this.G<<3)},function(){this.da=this.ga;return q(this)+(this.G<<3)},function(a){return(a?(this.da=this.ga,this.L):this.ia())+(this.G<<3)},function(){return this.K+(this.G<<3)},function(){return this.J+(this.G<<3)},function(){return this.F+(this.H<<3)},function(){return this.G+(this.H<<3)},function(){return this.H+(this.H<<3)},function(){return this.D+(this.H<<3)},function(){this.da=this.ga;return q(this)+(this.H<<3)},function(a){return(a?(this.da=this.ga,this.L):
        this.ia())+(this.H<<3)},function(){return this.K+(this.H<<3)},function(){return this.J+(this.H<<3)},function(){return this.F+(this.D<<3)},function(){return this.G+(this.D<<3)},function(){return this.H+(this.D<<3)},function(){return this.D+(this.D<<3)},function(){this.da=this.ga;return q(this)+(this.D<<3)},function(a){return(a?(this.da=this.ga,this.L):this.ia())+(this.D<<3)},function(){return this.K+(this.D<<3)},function(){return this.J+(this.D<<3)},function(){return this.F},function(){return this.G},
        function(){return this.H},function(){return this.D},function(){this.da=this.ga;return q(this)},function(a){return a?(this.da=this.ga,this.L):this.ia()},function(){return this.K},function(){return this.J},function(){return this.F+(this.L<<3)},function(){return this.G+(this.L<<3)},function(){return this.H+(this.L<<3)},function(){return this.D+(this.L<<3)},function(){this.da=this.ga;return q(this)+(this.L<<3)},function(a){return(a?(this.da=this.ga,this.L):this.ia())+(this.L<<3)},function(){return this.K+
        (this.L<<3)},function(){return this.J+(this.L<<3)},function(){return this.F+(this.K<<3)},function(){return this.G+(this.K<<3)},function(){return this.H+(this.K<<3)},function(){return this.D+(this.K<<3)},function(){this.da=this.ga;return q(this)+(this.K<<3)},function(a){return(a?(this.da=this.ga,this.L):this.ia())+(this.K<<3)},function(){return this.K+(this.K<<3)},function(){return this.J+(this.K<<3)},function(){return this.F+(this.J<<3)},function(){return this.G+(this.J<<3)},function(){return this.H+
        (this.J<<3)},function(){return this.D+(this.J<<3)},function(){this.da=this.ga;return q(this)+(this.J<<3)},function(a){return(a?(this.da=this.ga,this.L):this.ia())+(this.J<<3)},function(){return this.K+(this.J<<3)},function(){return this.J+(this.J<<3)}];
        function Xg(a){Ia.call(this,"ChipSet",a,Xg);this.ma=(this.ma=a.model)&&Yg[this.ma]||Zg;this.ac=0;var b=a.sw1;if(b)this.ac=$g(b,ah|bh.Zn);else{this.ge=[360,360];(b=a.floppies)&&b.length&&(this.ge=b);if(b=this.ge.length)this.ac|=ch.Pj,b--,this.ac|=(b&3)<<ch.ug;if(b=a.monitor||(this.ma<dh?"mono":"ega"),void 0!==eh[b])this.ac|=eh[b]<<bh.ug}this.Qe=$g(a.sw2||"11110000",0);this.Hp=this.ma==Zg?16:64;this.Th=this.Hg=1;this.ma>=dh&&(this.Th=this.Hg=2);this.ue=a.scaleTimers||!1;this.Br=a.rtcDate;this.Wm=!1;
        a.sound&&(this.hk=this.Lg=null,window&&(this.hk=window.AudioContext||window.webkitAudioContext),this.hk&&(this.Lg=new this.hk));this.reset(!0);Za(this)}Qa(Xg);var Zg=5150,dh=5170,Yg={5150:Zg,5160:5160,5170:dh,deskpro386:5180},eh={none:0,tv:1,color:2,mono:3,ega:0,vga:0},ch={Pj:1,ONE:0,Js:64,Hs:128,fs:192,tg:192,ug:6},ah=12,bh={Is:16,Xr:32,Zn:48,tg:48,ug:4};f=Xg.prototype;
        f.Lb=function(a,b,c){switch(b){case "sw1":return this.qa[b]=c,fh(this,b,c,this.ac,{0:this.ma==Zg?"Bootable Floppy Drive":"Loop on POST",1:this.ma==Zg?"Reserved":"Coprocessor",2:"Base Memory Size",4:"Monitor Type",6:"Number of Floppy Drives"}),!0;case "sw2":if(this.ma==Zg)return this.qa[b]=c,fh(this,b,c,this.Qe,{0:"Expansion Memory Size",4:"Reserved"}),!0;break;case "swdesc":return this.qa[b]=c,!0}return!1};
        f.Lc=function(a,b,c,d){this.la=b;this.U=c;this.Ra=d;this.za=a;this.Da=gb(a,"Keyboard");this.qj=c.R.Bd/1193181;Tb(b,this,gh);Vb(b,this,hh);this.ma<dh?(Tb(b,this,ih),Vb(b,this,jh)):(Tb(b,this,kh),Vb(b,this,lh))};f.gc=function(a,b){if(!b)if(!a)this.reset();else if(!this.restore(a))return!1;return!0};f.fc=function(a){return a&&this.save?this.save():!0};
        f.reset=function(a){var b;this.nd=this.ac;this.yf=this.Qe;mh(this);this.$a=Array(this.Th);for(b=0;b<this.Th;b++)nh(this,b);this.bc=Array(this.Hg);oh(this,0,32);1<this.Hg&&oh(this,1,160);this.Am=this.$j=null;this.Vb=Array(5180==this.ma?6:3);for(b=0;b<this.Vb.length;b++)ph(this,b);this.Gg=this.ak=this.Hc=this.Qh=null;this.Ph=0;if(this.ma>=dh){this.ab=16;this.Md=0;this.rd=16;this.Kh=0;this.Nd=160;512<=qh(this)&&(this.Nd|=16);3==rh(this)&&(this.Nd|=64);5180==this.ma&&(this.Nd|=12);this.Lh=3;this.Bb=Array(8);
        this.Jf=0;a&&(this.ea=Array(64));sh(this,this.Br);for(a=21;24>=a;a++)this.ea[a]=0;for(a=14;46>a;a++)void 0===this.ea[a]&&(this.ea[a]=0);this.ea[20]=this.nd&(bh.tg|2|ch.Pj|ch.tg);this.ea[16]=th(this,0)<<4|th(this,1);uh(this)}};
        function sh(a,b){var c=b?new Date(b):new Date;"[object Date]"!==Object.prototype.toString.call(c)||isNaN(c.getTime())?(c=new Date,a.pc("CMOS date invalid ("+b+"), using "+c)):b&&a.pc("CMOS date: "+c);a.ea[0]=c.getSeconds();a.ea[1]=0;a.ea[2]=c.getMinutes();a.ea[3]=0;a.ea[4]=c.getHours();a.ea[5]=0;a.ea[6]=c.getDay()+1;a.ea[7]=c.getDate();a.ea[8]=c.getMonth()+1;c=c.getFullYear();a.ea[9]=c%100;c/=100;a.ea[50]=c%10|c/10<<4;a.ea[10]=38;a.ea[11]=2;a.ea[12]=0;a.ea[13]=128;a.ih=a.eg=0;a.xn=a.oj=null}
        function vh(a){var b;void 0===b&&(b=a.oj);a.eg=Dc(a.U,a.ue)+b;a.ea[11]&64&&Ac(a.U,b)}function uh(a){for(var b=0,c=16;46>c;c++)b+=a.ea[c];a.ea[47]=b&255;a.ea[46]=b>>8}
        f.save=function(){var a=new Zd(this);a.set(0,[this.ac,this.Qe,this.nd,this.yf]);for(var b=[],c=0;c<this.$a;c++){for(var d=this.$a[c],e=d,m=[],n=0;n<e.Fb.length;n++){var p=e.Fb[n];m[n]=[p.Wd,p.Gh,p.cc,p.Wa,p.Ya,p.mode,p.Rh,p.wr,p.yr]}b[c]=[d.me,d.Yj,d.Bm,d.Hb,m]}a.set(1,[b]);b=[];for(c=0;c<this.bc.length;c++)d=this.bc[c],b[c]=[d.dh,d.dd,d.Zd,d.sd,d.Xb,d.Qc,d.Xe,d.Fg];a.set(2,[b]);b=[];for(c=0;c<this.Vb.length;c++)d=this.Vb[c],b[c]=[d.cc,d.Jc,d.Ya,d.ef,d.Dm,d.mode,d.Gj,d.qe,d.df,d.zd,d.Sg,d.kf,d.Yd];
        a.set(3,[this.$j,b,this.Am]);a.set(4,[this.Qh,this.Hc,this.ak,this.Gg,this.Ph]);this.ma>=dh&&(a.set(5,[this.ab,this.Md,this.rd,this.Kh,this.Nd,this.Lh]),a.set(6,[this.Bb[7],this.Bb,this.Jf,this.ea,this.ih,this.eg]));return a.data()};
        f.restore=function(a){var b,c;b=a[0];this.ac=b[0];this.Qe=b[1];this.nd=b[2];this.yf=b[3];b=a[1];for(c=0;c<this.Th;c++)nh(this,c,1==b.length?b[0][c]:b);b=a[2];for(c=0;c<this.Hg;c++)oh(this,c,0===c?32:160,b[0][c]);b=a[3];this.$j=b[0];this.Am=b[2];for(c=0;c<this.Vb.length;c++)ph(this,c,b[1][c]);b=a[4];this.Qh=b[0];this.Hc=b[1];this.ak=b[2];this.Gg=b[3];this.Ph=b[4];if(b=a[5])this.ab=b[0],this.Md=b[1],this.rd=b[2],this.Kh=b[3],this.Nd=b[4],this.Lh=b[5];if(b=a[6])this.Bb=b[1],this.Bb[7]=b[0],this.Jf=b[2],
        this.ea=b[3],this.ih=b[4],this.eg=b[5],sh(this);return!0};var wh=[0,null,null,0,Array(4)];function nh(a,b,c){var d=a.$a[b];d||(d={Fb:Array(4)});c=c&&5==c.length?c:wh;d.me=c[0];d.Yj=c[1];d.Bm=c[2];d.Hb=c[3];d.Rp=b<<2;for(var e=0;e<d.Fb.length;e++)xh(d,e,c[4][e]);a.$a[b]=d}var Ch=[!0,[0,0],[0,0],[0,0],[0,0]];
        function xh(a,b,c){var d=a.Fb[b];d||(d={Gh:[0,0],cc:[0,0],Wa:[0,0],Ya:[0,0]});c=c&&8==c.length?c:Ch;d.Wd=c[0];d.Gh[0]=c[1][0];d.Gh[1]=c[1][1];d.cc[0]=c[2][0];d.cc[1]=c[2][1];d.Wa[0]=c[3][0];d.Wa[1]=c[3][1];d.Ya[0]=c[4][0];d.Ya[1]=c[4][1];d.mode=c[5];d.Rh=c[6];d.W=a;d.fn=b;Dh(d,c[8],c[9]);a.Fb[b]=d}function Dh(a,b,c,d){"string"==typeof b&&(b=Sa(b));b&&(a.ai=null,a.wr=b.id,a.yr=c,a.Zh=b,a.zk=b[c],a.rj=d)}var Eh=[0,Array(4)];
        function oh(a,b,c,d){var e=a.bc[b];e||(e={dd:[null,null,null,null]});d=d&&8==d.length?d:Eh;e.port=c;e.pt=b<<3;e.dh=d[0];e.dd[0]=d[1][0];e.dd[1]=d[1][1];e.dd[2]=d[1][2];e.dd[3]=d[1][3];e.Zd=d[2];e.sd=d[3];e.Xb=d[4];e.Qc=d[5];e.Xe=d[6];e.Fg=d[7];a.bc[b]=e}var Fh=[[0,0],[0,0],[0,0],[0,0]];
        function ph(a,b,c){var d=a.Vb[b];d||(d={cc:[0,0],Jc:[0,0],Ya:[0,0],ef:[0,0]});c=c&&13==c.length?c:Fh;d.cc[0]=c[0][0];d.cc[1]=c[0][1];d.Jc[0]=c[1][0];d.Jc[1]=c[1][1];d.Ya[0]=c[2][0];d.Ya[1]=c[2][1];d.ef[0]=c[3][0];d.ef[1]=c[3][1];d.Dm=c[4];d.mode=c[5];d.Gj=c[6];d.qe=c[7];d.df=c[8];d.zd=c[9];d.Sg=c[10];d.kf=c[11];d.Yd=c[12];a.Vb[b]=d}function qh(a,b){return((((b?a.ac:a.nd)&12)>>2)+1)*a.Hp+32*((b?a.Qe:a.yf)&15)}function Gh(a,b){var c=b?a.ac:a.nd;return a.ma!=Zg||c&ch.Pj?((c&ch.tg)>>ch.ug)+1:0}
        function th(a,b){if(b<Gh(a)){if(!a.ge)return 1;if(b<a.ge.length)switch(a.ge[b]){case 160:case 180:case 320:case 360:return 1;case 720:return 3;case 1200:return 2;case 1440:return 4}}return 0}function rh(a,b){return((b?a.ac:a.nd)&bh.tg)>>bh.ug}
        function fh(a,b,c,d,e){for(var m="",n=1;8>=n;n++){var p="pcjs-bitCell";n||(p+=" pcjs-bitCellLeft");m+='<div id="'+(b+"-"+n)+'" class="'+p+'" data-value="0">'+n+"</div>\n"}c.innerHTML=m;b=Xa(c,"pcjs-bitCell");c=null;for(n=0;n<b.length;n++)null!=e&&null!=e[n]&&(c=e[n]),c&&b[n].setAttribute("title",c),Hh(b[n],d&1<<n?!1:!0),b[n].onclick=function(a,b){return function(){var c="1"!=b.getAttribute("data-value");Hh(b,c);var d=b.getAttribute("id").split("-"),e=1<<+d[1]-1;switch(d[0]){case "sw1":a.ac=a.ac&~e|
        (c?0:e);break;case "sw2":a.Qe=a.Qe&~e|(c?0:e)}mh(a)}}(a,b[n])}function Hh(a,b){a.setAttribute("data-value",b?"1":"0");a.style.color=b?"#ffffff":"#000000";a.style.backgroundColor=b?"#000000":"#ffffff"}function mh(a){var b=a.qa.swdesc,c={0:"Enhanced Color",1:"TV",2:"Color",3:"Monochrome"};if(null!=b){var d;d=""+(qh(a,!0)+"Kb");d+=", "+c[rh(a,!0)]+" Monitor";d+=", "+Gh(a,!0)+" Floppy Drives";if(null!=a.nd&&a.nd!=a.ac||null!=a.yf&&a.yf!=a.Qe)d+=" (Reset required)";b.textContent=d}}
        function Ih(a,b,c){a=a.$a[b];var d=a.Fb[c],e=d.Wa[a.Hb];a.Hb^=1;b||0!=c||a.Hb||(d.Wa[0]++,255<d.Wa[0]&&(d.Wa[0]=0,d.Wa[1]++,255<d.Wa[1]&&(d.Wa[1]=0)));return e}function Jh(a,b,c,d){a=a.$a[b];c=a.Fb[c];c.Wa[a.Hb]=c.Gh[a.Hb]=d;a.Hb^=1}function Kh(a,b,c){a=a.$a[b];var d=a.Fb[c],e=d.Ya[a.Hb];a.Hb^=1;b||0!=c||a.Hb||(d.Ya[0]--,0>d.Ya[0]&&(d.Ya[0]=255,d.Ya[1]--,0>d.Ya[1]&&(d.Ya[1]=255)));return e}function Lh(a,b,c,d){a=a.$a[b];c=a.Fb[c];c.Ya[a.Hb]=c.cc[a.Hb]=d;a.Hb^=1}
        function Mh(a,b){var c=a.$a[b],d=c.me|1;c.me&=-16;return d}function Nh(a,b,c){a=a.$a[b];b=c&3;a.me=a.me&~(16<<b)|(c&4)<<b+2;a.Bm=c}function Oh(a,b,c){b=a.$a[b];var d=c&3,e=b.Fb[d];e.Wd=!!(c&4);e.Wd||Ph(a,b.Rp+d)}function Qh(a,b){for(var c=a.$a[b],d=0;d<c.Fb.length;d++)xh(c,d)}function Rh(a,b,c){return a.$a[b].Fb[c].Rh}function Sh(a,b,c,d){a.$a[b].Fb[c].Rh=d}function Th(a,b,c,d,e){Dh(a.$a[b>>2].Fb[b&3],c,d,e)}
        function Ph(a,b,c){b=a.$a[b>>2].Fb[b&3];b.Zh&&b.zk&&b.rj?(c&&(b.ai=c),b.Wd||Fe(a,b,!0)):c&&c(!0)}function Fe(a,b,c){c&&(b.count=b.Ya[1]<<8|b.Ya[0],b.type=b.mode&12,b.Zm=b.yd=!1);for(var d=!1;0<=b.count&&(c=b.Rh<<16|b.Wa[1]<<8|b.Wa[0],4==b.type?(d=!0,function(c){b.zk.call(b.Zh,b.rj,-1,function(m,n){0>m&&(b.Zm||(b.Zm=!0),m=255);b.Wd||a.la.Oe(c,m);(d=n)&&setTimeout(function(){Uh(b)||Fe(a,b)},0)})}(c)):8==b.type?(c=a.la.wc(c),0>b.zk.call(b.Zh,b.rj,c)&&(b.yd=!0)):0!=b.type&&(b.yd=!0)),!d&&!Uh(b););}
        function Uh(a){if(!a.yd&&0<=--a.count&&(a.mode&32?(a.Wa[0]--,0>a.Wa[0]&&(a.Wa[0]=255,a.Wa[1]--,0>a.Wa[1]&&(a.Wa[1]=255))):(a.Wa[0]++,255<a.Wa[0]&&(a.Wa[0]=0,a.Wa[1]++,255<a.Wa[1]&&(a.Wa[1]=0))),!a.Wd))return!1;var b=a.W;b.me=b.me&~(16<<a.fn)|1<<a.fn;a.mode&16||(a.Wd=!0,a.Zh=a.rj=null);a.ai&&(a.ai(!a.yd),a.ai=null);return!0}function Vh(a,b){var c=0,d=a.bc[b];if(null!=d.Fg)switch(d.Fg&3){case 2:c=d.Xb;break;case 3:c=d.Qc}return c}
        function Wh(a,b,c){var d=a.bc[b];if(c&16)d.Zd=0,d.dd[d.Zd++]=c,d.sd=0,d.Xe=7,d.Xb=d.Qc=0,d.Fg=10;else if(c&8)c&100&&a.wa("PIC"+b+"("+ea(d.port)+"): unsupported OCW3 command: "+ea(c)),d.Fg=c;else{var e=c&224;if(e&32){var m,n=0;if(96==(e&96))n=1<<(c&7);else for(m=d.Xe+1;;){m&=7;var p=1<<m;if(d.Qc&p){n=p;break}if(m++==d.Xe)break}d.Qc&n&&(d.Qc&=~n,Xh(a));e&128&&a.wa("PIC"+b+"("+ea(d.port)+"): unsupported OCW2 rotate command: "+ea(c))}else 192==e?d.Xe=c&7:a.wa("PIC"+b+"("+ea(d.port)+"): unsupported OCW2 automatic EOI command: "+
        ea(c))}}function Yh(a,b,c){var d=a.bc[b];d.Zd<d.dd.length?(d.dd[d.Zd++]=c,2==d.Zd&&d.dd[0]&2&&d.Zd++,3!=d.Zd||d.dd[0]&1||d.Zd++):(d.sd=c,d=a.U,d.Q|=4,Xh(a,b||253!=c?0:6))}function Zh(a,b,c){var d=a.bc[b>>3];b=1<<(b&7);d.Xb&b||(d.Xb|=b,d.dh=c||0,Xh(a))}function $h(a,b){var c=a.bc[b>>3],d=1<<(b&7);c.Xb&d&&(c.Xb&=~d,Xh(a))}
        function Xh(a,b){var c,d=-1;1<a.Hg&&(c=a.bc[1],d=~(c.Qc|c.sd)&c.Xb);c=a.bc[0];0<=d&&(c.Xb=d?c.Xb|4:c.Xb&-5);var d=~(c.Qc|c.sd)&c.Xb,e=a.U;e.fa&&(e.lb=d?e.lb|1:e.lb&-2);d&&b&&(c.dh=b)}function De(a,b){void 0===b&&(b=0);var c=-1,d=a.bc[b];if(d.dh)c=-2,d.dh--;else for(var e=d.Xb&((d.Qc|d.sd)^255),m=d.Xe+1;;){var m=m&7,n=1<<m;if(e&n){c=b||2!=m?d.dd[1]+m:De(a,1);0<=c&&(d.Qc|=n,d.Xb&=~n);break}if(m++==d.Xe)break}return c}
        function ai(a,b){var c=a.Vb[b];c.qe==c.df&&bi(a,b);if(c.Sg)return c.ef[c.qe++];ci(a,b);return c.Ya[c.qe++]}function di(a,b,c){var d=a.Vb[b];d.qe==d.df&&bi(a,b);d.cc[d.qe++]=c;d.qe==d.df&&(d.kf&&0!=d.mode&&8!=d.mode||(d.Sg=!1,d.Ya[0]=d.Jc[0]=d.cc[0],d.Ya[1]=d.Jc[1]=d.cc[1],d.Yd=Dc(a.U,a.ue),d.kf=!0,d.zd=0!=d.mode,0==b&&($h(a,0),c=ei(a,0)*a.qj|0,6==d.mode&&(c>>=1),Ac(a.U,c))),2==b&&Ec(a))}f=Xg.prototype;f.qp=function(){return null};
        f.Rq=function(a,b){this.$j=b;var c=(b&192)>>6;if(3!=c){var d=b&1,e=b&14,m=b&48;if(m){var n=this.Vb[c];n.Gj=m;n.mode=e;n.Dm=d;n.cc=[0,0];n.Ya=[0,0];n.ef=[0,0];n.zd=!1;n.Sg=!1;n.kf=!1;bi(this,c);0==c&&$h(this,0);2==c&&255==this.bc[0].sd&&77==this.Hc&&(c=this.Vb[0],c.Jc[0]=c.cc[0],c.Jc[1]=c.cc[1],c.Yd=Dc(this.U,this.ue))}else ci(this,c),d=this.Vb[c],d.ef[0]=d.Ya[0],d.ef[1]=d.Ya[1],d.Sg=!0,bi(this,c)}};function ei(a,b){var c=a.Vb[b],d=c.cc[1]<<8|c.cc[0];d||(d=1==c.df?256:65536);return d}
        function Gc(a,b){var c=a.Vb[b],d=c.Jc[1]<<8|c.Jc[0];d||(d=1==c.df?256:65536);return d}function bi(a,b){var c=a.Vb[b];c.qe=32==c.Gj?1:0;c.df=48==c.Gj?2:1}
        function ci(a,b,c){var d=a.Vb[b];if(d.kf&&(2!=b||a.Hc&1)){var e=Dc(a.U,a.ue),m=(e-d.Yd)/a.qj|0;0>m&&(d.Yd=e,m=0);var n=ei(a,b),p=Gc(a,b)-m;0==d.mode?(0>=p&&(p=0),p||(d.zd=!0,d.kf=!1,b||Zh(a,0))):4==d.mode?(d.zd=1!=p,0>=p&&(p=n+p,0>=p&&(p=n),d.Jc[0]=p&255,d.Jc[1]=p>>8,d.Yd=e,!b&&d.zd&&Zh(a,0))):6==d.mode&&(p-=m,0>=p&&(d.zd=!d.zd,p=n+p,0>=p&&(p=n),d.Jc[0]=p&255,d.Jc[1]=p>>8,d.Yd=e,!b&&d.zd&&Zh(a,0)));d.Ya[0]=p&255;d.Ya[1]=p>>8;c&&(a.Yd=0)}return d}
        function Fc(a,b){for(var c=0;c<a.Vb.length;c++)ci(a,c,b);if(a.ma>=dh){var c=a.U.R.Bd,d=Dc(a.U,a.ue);null==a.oj&&(a.ih=Dc(a.U,a.ue),a.xn=1024,a.oj=Math.floor(a.U.R.Bd/a.xn),vh(a));d>=a.eg&&(a.ea[12]|=64,a.ea[11]&64&&(a.ea[12]|=128,Zh(a,8)),a.eg=d+a.oj);a.ea[0]==a.ea[1]&&a.ea[2]==a.ea[3]&&a.ea[4]==a.ea[5]&&(a.ea[12]|=32,a.ea[11]&32&&(a.ea[12]|=128,Zh(a,8)));var e=d-a.ih,m=Math.floor(e/c);if(m&&!(a.ea[11]&128)){for(;m--;)if(60<=++a.ea[0]&&(a.ea[0]=0,60<=++a.ea[2]&&(a.ea[2]=0,24<=++a.ea[4]))){a.ea[4]=
        0;a.ea[6]=a.ea[6]%7+1;var n;n=a.ea[9];var p=ma[a.ea[8]-1];28==p&&0===n%4&&(n%100||0===n%400)&&p++;n=p;++a.ea[7]>n&&(a.ea[7]=1,12<++a.ea[8]&&(a.ea[8]=1,a.ea[9]=(a.ea[9]+1)%100))}a.ea[12]|=16;a.ea[11]&16&&(a.ea[12]|=128,Zh(a,8))}a.ih=d-e%c}}f.rp=function(){var a=this.Qh;if(this.Gg&16)if(this.Hc&128)a=this.nd;else if(this.Da){var a=this.Da,b=0;a.Wb.length&&(b=a.Wb[0]);a=b}return a};f.Sq=function(a,b){this.Qh=b};f.sp=function(){return this.Hc};
        f.Tq=function(a,b){fi(this,b);this.Da&&gi(this.Da,b&128?!1:!0,b&64?!0:!1)};function fi(a,b){var c=!!(b&2),d=!!(a.Hc&2);a.Hc=b;c!=d&&Ec(a,c)}f.tp=function(){var a=0,a=this.ma==Zg?this.Hc&4?a|this.yf&15:a|this.yf>>4&1:this.Hc&8?a|this.nd>>4:a|this.nd&15;this.Hc&1&&ci(this,2).zd&&(a=this.Hc&2?a|32:a|16);return a};f.Uq=function(a,b){this.ak=b};f.up=function(){return this.Gg};f.Vq=function(a,b){this.Gg=b};f.Ho=function(){var a=this.Kh;this.ab&=-258;this.Da&&hi(this.Da);return a};
        f.fq=function(a,b){if(this.ab&8)switch(this.Md){case 96:ii(this,b);break;case 209:ji(this,b);break;default:if(ii(this,this.rd&-17),this.Da){var c=-1;switch(b){case 255:c=250,ki(this.Da)}li(this,c)}}this.Md=b;this.ab&=-9};f.Io=function(){return this.Hc&-209|(Dc(this.U)&64?16:0)};f.gq=function(a,b){fi(this,b)};f.Jo=function(){var a=this.ab&255;this.ab&256&&(this.ab|=1,this.ab&=-257);return a};
        f.eq=function(a,b){this.Md=b;this.ab|=8;var c=0;240<=this.Md&&(c=this.Md^15,this.Md=240);switch(this.Md){case 32:li(this,this.rd);break;case 173:ii(this,this.rd|16);break;case 174:ii(this,this.rd&-17);this.Da&&hi(this.Da);break;case 170:this.Da&&(this.Da.Wb=[]);ii(this,this.rd|16);li(this,85);ji(this,3);break;case 171:li(this,0);break;case 192:li(this,this.Nd);break;case 208:li(this,this.Lh);break;case 224:li(this,this.rd&16?0:1);break;case 240:c&1&&Ed(this.U)}};
        function ii(a,b){a.rd=b;a.ab=a.ab&-5|b&4;a.Da&&gi(a.Da,!!(b&8),!(b&16))}function li(a,b,c){0<=b&&(a.Kh=b,c?a.ab|=1:(a.ab&=-2,a.ab|=256))}function ji(a,b){a.Lh=b;Ib(a.la,!!(b&2));b&1||Ed(a.U)}function mi(a,b){a.ma<dh?Zh(a,1,4):a.rd&16||a.ab&257||(li(a,b,!0),ni(a.Da),Zh(a,1,120))}f.Xo=function(){return this.Jf};f.uq=function(a,b){this.Jf=b;this.Ph=b&128?0:128};
        f.Yo=function(a,b){var c=this.Jf&63,d;if(13>=c)if(d=this.ea[c],10>c){var e=!1;4!=c&&5!=c||this.ea[11]&2||(d=12>d?d?d:12:(d-=12)?d+128:140,e=!0);this.ea[11]&4||(e&&128<d&&(d-=48),d=d%10|d/10<<4)}else 10==c&&(this.ea[c]^=128);else d=this.ea[c];null!=b&&12==c&&(this.ea[c]&=15,d&128&&$h(this,8),d&64&&this.ea[11]&64&&vh(this));return d};
        f.vq=function(a,b){var c=this.Jf&63,d=b^this.ea[c],e;if(13>=c){if(e=b,10>c){var m=!1;this.ea[11]&4||(e=10*(e>>4)+(e&15),m=!0);if(4==c||5==c)m&&23<e&&(e+=48),this.ea[11]&2||(12>=e?e=12==e?0:e:(e-=116,e=24==e?12:e))}}else e=b;this.ea[c]=e;11==c&&d&64&&b&64&&vh(this)};f.Qq=function(a,b){this.Ph=b};f.wq=function(){};f.xq=function(){};function $g(a,b){if(void 0===a)return b;for(var c=0,d=1,e=0;e<a.length;e++)"0"==a.charAt(e)&&(c|=d),d<<=1;return c}
        function Ec(a,b){if(a.Lg)try{void 0!==b?a.Wm=b:b=a.Wm&&a.U&&a.U.ha.Qb;var c=Math.round(1193181/ei(a,2));if(20>c||2E4<c)b=!1;b?a.jc?a.jc.frequency.value=c:(a.jc=a.Lg.createOscillator(),a.jc&&(a.jc.type="number"==typeof a.jc.type?1:"square",a.jc.connect(a.Lg.destination),a.jc.frequency.value=c,"start"in a.jc?a.jc.start(0):a.jc.noteOn(0))):a.jc&&("stop"in a.jc?a.jc.stop(0):a.jc.noteOff(0),a.jc.disconnect(),delete a.jc)}catch(d){a.wa("AudioContext exception: "+d.message),a.Lg=null}else b&&a.oc("BEEP",
        8388608)}
        var gh={0:function(){return Ih(this,0,0)},1:function(){return Kh(this,0,0)},2:function(){return Ih(this,0,1)},3:function(){return Kh(this,0,1)},4:function(){return Ih(this,0,2)},5:function(){return Kh(this,0,2)},6:function(){return Ih(this,0,3)},7:function(){return Kh(this,0,3)},8:function(){return Mh(this,0)},32:function(){return Vh(this,0)},33:function(){return this.bc[0].sd},64:function(){return ai(this,0)},65:function(){return ai(this,1)},66:function(){return ai(this,2)},67:Xg.prototype.qp,129:function(){return Rh(this,
        0,2)},130:function(){return Rh(this,0,3)},131:function(){return Rh(this,0,1)},135:function(){return Rh(this,0,0)}},ih={96:Xg.prototype.rp,97:Xg.prototype.sp,98:Xg.prototype.tp,99:Xg.prototype.up},kh={96:Xg.prototype.Ho,97:Xg.prototype.Io,100:Xg.prototype.Jo,112:Xg.prototype.Xo,113:Xg.prototype.Yo,128:function(){return this.Bb[7]},132:function(){return this.Bb[0]},133:function(){return this.Bb[1]},134:function(){return this.Bb[2]},136:function(){return this.Bb[3]},137:function(){return Rh(this,1,2)},
        138:function(){return Rh(this,1,3)},139:function(){return Rh(this,1,1)},140:function(){return this.Bb[4]},141:function(){return this.Bb[5]},142:function(){return this.Bb[6]},143:function(){return Rh(this,1,0)},160:function(){return Vh(this,1)},161:function(){return this.bc[1].sd},192:function(){return Ih(this,1,0)},194:function(){return Kh(this,1,0)},196:function(){return Ih(this,1,1)},198:function(){return Kh(this,1,1)},200:function(){return Ih(this,1,2)},202:function(){return Kh(this,1,2)},204:function(){return Ih(this,
        1,3)},206:function(){return Kh(this,1,3)},208:function(){return Mh(this,1)}},hh={0:function(a,b){Jh(this,0,0,b)},1:function(a,b){Lh(this,0,0,b)},2:function(a,b){Jh(this,0,1,b)},3:function(a,b){Lh(this,0,1,b)},4:function(a,b){Jh(this,0,2,b)},5:function(a,b){Lh(this,0,2,b)},6:function(a,b){Jh(this,0,3,b)},7:function(a,b){Lh(this,0,3,b)},8:function(a,b){this.$a[0].Yj=b},9:function(a,b){Nh(this,0,b)},10:function(a,b){Oh(this,0,b)},11:function(a,b){this.$a[0].Fb[b&3].mode=b},12:function(){this.$a[0].Hb=
        0},13:function(){Qh(this,0)},32:function(a,b){Wh(this,0,b)},33:function(a,b){Yh(this,0,b)},64:function(a,b){di(this,0,b)},65:function(a,b){di(this,1,b)},66:function(a,b){di(this,2,b)},67:Xg.prototype.Rq,129:function(a,b){Sh(this,0,2,b)},130:function(a,b){Sh(this,0,3,b)},131:function(a,b){Sh(this,0,1,b)},135:function(a,b){Sh(this,0,0,b)}},jh={96:Xg.prototype.Sq,97:Xg.prototype.Tq,98:Xg.prototype.Uq,99:Xg.prototype.Vq,160:Xg.prototype.Qq},lh={96:Xg.prototype.fq,97:Xg.prototype.gq,100:Xg.prototype.eq,
        112:Xg.prototype.uq,113:Xg.prototype.vq,128:function(a,b){this.Bb[7]=b},132:function(a,b){this.Bb[0]=b},133:function(a,b){this.Bb[1]=b},134:function(a,b){this.Bb[2]=b},136:function(a,b){this.Bb[3]=b},137:function(a,b){Sh(this,1,2,b)},138:function(a,b){Sh(this,1,3,b)},139:function(a,b){Sh(this,1,1,b)},140:function(a,b){this.Bb[4]=b},141:function(a,b){this.Bb[5]=b},142:function(a,b){this.Bb[6]=b},143:function(a,b){Sh(this,1,0,b)},160:function(a,b){Wh(this,1,b)},161:function(a,b){Yh(this,1,b)},192:function(a,
        b){Jh(this,1,0,b)},194:function(a,b){Lh(this,1,0,b)},196:function(a,b){Jh(this,1,1,b)},198:function(a,b){Lh(this,1,1,b)},200:function(a,b){Jh(this,1,2,b)},202:function(a,b){Lh(this,1,2,b)},204:function(a,b){Jh(this,1,3,b)},206:function(a,b){Lh(this,1,3,b)},208:function(a,b){this.$a[1].Yj=b},210:function(a,b){Nh(this,1,b)},212:function(a,b){Oh(this,1,b)},214:function(a,b){this.$a[1].Fb[b&3].mode=b},216:function(){this.$a[1].Hb=0},218:function(){Qh(this,1)},240:Xg.prototype.wq,241:Xg.prototype.xq};
        Ea(function(){for(var a=Xa(window.document,"pcjs","chipset"),b=0;b<a.length;b++){var c=a[b],d=Ua(c),d=new Xg(d);Wa(d,c);mh(d)}});
        function oi(a){Ia.call(this,"ROM",a,oi);this.Gb=null;this.Wj=a.addr;this.pg=a.size;this.Cg=a.alias;this.vh=a.file;this.xr=fa(this.vh);this.xe=a.notify;this.om=null;if(this.xe&&(a=this.xe.indexOf("["),0<a)){try{this.om=eval(this.xe.substr(a))}catch(b){}this.xe=this.xe.substr(0,a)}if(this.vh){a=this.vh;var c=ha(this.xr);"json"!=c&&"hex"!=c&&(a=qa()+"/api/v1/dump?file="+this.vh+"&format=bytes&decimal=true");pa(a,!0,null,this,oi.prototype.aq)}}Qa(oi);
        oi.prototype.Lc=function(a,b,c,d){this.la=b;this.U=c;this.Ra=d;pi(this)};oi.prototype.gc=function(){this.Vj&&(this.Ra&&this.Ra.Ss(this.Wj,this.pg,this.Vj),delete this.Vj);return!0};oi.prototype.fc=function(){return!0};
        oi.prototype.aq=function(a,b,c){if(c)this.wa("Unable to load system ROM (error "+c+")");else{if("["==b.charAt(0)||"{"==b.charAt(0))try{var d=eval("("+b+")"),e=d.bytes,m=d.data;if(e)this.Gb=e;else if(m)for(this.Gb=Array(4*m.length),c=b=0;b<m.length;b++)this.Gb[c++]=m[b]&255,this.Gb[c++]=m[b]>>8&255,this.Gb[c++]=m[b]>>16&255,this.Gb[c++]=m[b]>>24&255;else this.Gb=d;this.Vj=d.symbols;if(!this.Gb.length){ra("Empty ROM: "+a);return}if(1==this.Gb.length){ra(this.Gb[0]);return}}catch(n){this.wa("ROM data error: "+
        n.message);return}else for(a=b.replace(/\n/gm," ").replace(/ +$/,"").split(" "),this.Gb=Array(a.length),d=0;d<a.length;d++)this.Gb[d]=ca(a[d],16);pi(this)}};
        function pi(a){if(!$a(a))if(!a.vh)Za(a);else if(a.Gb&&a.la){if(a.Gb.length!=a.pg)ab(a,"ROM size (0x"+da(a.Gb.length)+") does not match specified size ("+("0x"+da(a.pg))+")");else{var b;b=a.Wj;if(Jb(a.la,b,a.pg,bc)){for(var c=0;c<a.Gb.length;c++){var d=a.la,e=b+c;d.ka[(e&d.xb)>>>d.Aa].fm(e&d.Ea,a.Gb[c]&255,e)}b=!0}else b=!1;if(b){b=[];"number"==typeof a.Cg?b.push(a.Cg):null!=a.Cg&&a.Cg.length&&(b=a.Cg);for(c=0;c<b.length;c++){var d=a,e=b[c],m=Mb(d.la,d.Wj,d.pg);Lb(d.la,e,d.pg,m)}a.xe&&((b=Sa(a.xe,
        a.id))?(c=a.Gb,d=a.om,5==b.qb?qi(b,c,d||[12640,8752],8):7==b.qb&&qi(b,c,d||[14221,16269],8),Za(b)):a.wa("Unable to find component: "+a.xe));delete a.Gb}}Za(a)}}Ea(function(){for(var a=Xa(window.document,"pcjs","rom"),b=0;b<a.length;b++){var c=a[b],d=Ua(c),d=new oi(d);Wa(d,c)}});function ri(a){Ia.call(this,"RAM",a,ri);this.Hh=a.addr;this.be=a.size;this.Bo=a.test;this.xo=!!this.be;this.ci=!1}Qa(ri);ri.prototype.Lc=function(a,b,c,d){this.la=b;this.U=c;this.Ra=d;this.fa=gb(a,"ChipSet");Za(this)};
        ri.prototype.gc=function(a,b){b||this.reset();return!0};ri.prototype.fc=function(){return!0};
        ri.prototype.reset=function(){if(!this.Hh&&!this.xo&&this.fa){var a=1024*qh(this.fa);this.be&&a!=this.be&&(Nb(this.la,this.Hh,this.be),this.ci=!1);this.be=a}!this.ci&&this.be&&Jb(this.la,this.Hh,this.be,1)&&(this.ci=!0,this.status(Math.floor(this.be/1024)+"Kb allocated"),"ramCPQ"==this.Vg&&(this.W=new si(this),Jb(this.la,ti,1,4,this.W)));if(this.ci){if(this.Bo||Pb(this.la,1138,4660),"ramCPQ"!=this.Vg&&this.fa&&(a=this.fa,a.ea)){var b=1048576>this.Hh?21:23,c=a.ea[b]|a.ea[b+1]<<8,c=c+(this.be>>10);
        a.ea[b]=c&255;a.ea[b+1]=c>>8;uh(a)}}else ra("No RAM allocated")};function si(a){this.er=a;this.em=ui;this.Tn=vi;this.Nj=wi;this.wg=null}
        var ti=-2134900736,ui=65535,vi=2575,wi=2,xi=[null,0],yi=[function(a){var b=255;2>a?b=a&1?this.W.Tn>>8:this.W.Tn&255:4>a&&(b=a&1?this.W.Nj>>8:this.W.Nj&255);return b},null,null,function(a,b){var c=this.W;if(a)2==a&&(c.Nj=c.Nj&-256|b);else if(b!=(c.em&255)){var d=c.er.la;if(b&1)c.wg&&(Lb(d,917504,131072,c.wg),c.wg=null);else{c.wg||(c.wg=Mb(d,917504,131072));var e=Mb(d,16646144,131072);Lb(d,917504,131072,e,b&2?1:bc)}c.em=c.em&-256|b}},null,null];si.prototype.cn=function(){return xi};
        si.prototype.Ak=function(){return yi};Ea(function(){for(var a=Xa(window.document,"pcjs","ram"),b=0;b<a.length;b++){var c=a[b],d=Ua(c),d=new ri(d);Wa(d,c)}});function zi(a){Ia.call(this,"Keyboard",a,zi);this.Um=ya("Mobi");this.yo=ya("MSIE");this.oc("mobile keyboard support: "+(this.Um?"true":"false"));this.Gm=0;this.hi=!0;this.xk=this.tk=!1;this.Mb=[];this.Op=500;this.Pp=100;this.Np=50;this.Om=!1;Za(this)}Qa(zi);
        var V={Yr:1,Zr:3,$r:26," ":32,"!":33,'"':34,"#":35,$:36,"%":37,"&":38,"'":39,"(":40,")":41,"*":42,"+":43,",":44,"-":45,".":46,"/":47,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,Vr:65,Wr:66,jm:67,Xn:68,E:69,ds:70,gs:71,km:72,js:73,ks:74,ls:75,ms:76,ns:77,Qj:78,ps:79,qs:80,ss:81,mm:82,ws:83,Gs:84,Ks:85,Ls:86,Ms:87,Os:88,Ps:89,Qs:90,"[":91,"\\":92,"]":93,"^":94,_:95,"`":96,Rs:97,Ts:98,Ws:99,ct:100,dt:101,et:102,gt:103,ht:104,jt:105,kt:106,lt:107,
        mt:108,nt:109,ot:110,qt:111,rt:112,st:113,tt:114,ut:115,vt:116,wt:117,xt:118,yt:119,x:120,y:121,z:122,"{":123,"|":124,"}":125,"~":126},Ai={};Ai[186]=V[";"];Ai[187]=V["="];Ai[188]=V[","];Ai[189]=V["-"];Ai[190]=V["."];Ai[191]=V["/"];Ai[192]=V["`"];Ai[219]=V["["];Ai[220]=V["\\"];Ai[221]=V["]"];Ai[222]=V["'"];Ai[173]=V["-"];var Bi={};Bi[V["1"]]=V["!"];Bi[V["2"]]=V["@"];Bi[V["3"]]=V["#"];Bi[V["4"]]=V.$;Bi[V["5"]]=V["%"];Bi[V["6"]]=V["^"];Bi[V["7"]]=V["&"];Bi[V["8"]]=V["*"];Bi[V["9"]]=V["("];
        Bi[V["0"]]=V[")"];Bi[186]=V[":"];Bi[187]=V["+"];Bi[188]=V["<"];Bi[189]=V._;Bi[190]=V[">"];Bi[191]=V["?"];Bi[192]=V["~"];Bi[219]=V["{"];Bi[220]=V["|"];Bi[221]=V["}"];Bi[222]=V['"'];Bi[173]=V._;Bi[61]=V["+"];Bi[59]=V[":"];
        var Ci={3016:1,1016:2,1017:8,1018:32,1091:128,1093:64,1224:128,1020:512,1144:1024,1145:2048},Di={TAB:1009,ESC:1027,F1:1112,F2:1113,F3:1114,F4:1115,F5:1116,F6:1117,F7:1118,F8:1119,F9:1120,F10:1121,LEFT:1037,UP:1038,RIGHT:1039,DOWN:1040,CTRL_C:4003,CTRL_BREAK:4008,CTRL_ALT_DEL:4046},Ei={esc:1027,1:V["1"],2:V["2"],3:V["3"],4:V["4"],5:V["5"],6:V["6"],7:V["7"],8:V["8"],9:V["9"],0:V["0"],"-":V["-"],"=":V["="],bs:1008,tab:1009,q:81,w:87,e:69,r:82,t:84,y:89,u:85,i:73,o:79,p:80,"[":V["["],"]":V["]"],enter:13,
        ctrl:1017,a:65,s:83,d:68,f:70,g:71,h:72,j:74,k:75,l:76,";":V[";"],quote:V["'"],"`":V["`"],shift:1016,"\\":V["\\"],z:90,x:88,c:67,v:86,b:66,n:78,m:77,",":V[","],".":V["."],"/":V["/"],"right-shift":3016,prtsc:1044,alt:1018,space:V[" "],"caps-lock":1020,f1:1112,f2:1113,f3:1114,f4:1115,f5:1116,f6:1117,f7:1118,f8:1119,f9:1120,f10:1121,"num-lock":1144,"scroll-lock":1145,"num-home":1036,"num-up":1038,"num-pgup":1033,"num-sub":1109,"num-left":1037,"num-center":1101,"num-right":1039,"num-add":1107,"num-end":1035,
        "num-down":1040,"num-pgdn":1034,"num-ins":1045,"num-del":1046},Fi={"caps-lock":512,"num-lock":1024,"scroll-lock":2048},X={1027:1};X[V["1"]]=2;X[V["!"]]=10754;X[V["2"]]=3;X[V["@"]]=10755;X[V["3"]]=4;X[V["#"]]=10756;X[V["4"]]=5;X[V.$]=10757;X[V["5"]]=6;X[V["%"]]=10758;X[V["6"]]=7;X[V["^"]]=10759;X[V["7"]]=8;X[V["&"]]=10760;X[V["8"]]=9;X[V["*"]]=10761;X[V["9"]]=10;X[V["("]]=10762;X[V["0"]]=11;X[V[")"]]=10763;X[V["-"]]=12;X[V._]=10764;X[V["="]]=13;X[V["+"]]=10765;X[1008]=14;X[1009]=15;X[113]=16;
        X[81]=10768;X[119]=17;X[87]=10769;X[101]=18;X[69]=10770;X[114]=19;X[82]=10771;X[116]=20;X[84]=10772;X[121]=21;X[89]=10773;X[117]=22;X[85]=10774;X[105]=23;X[73]=10775;X[111]=24;X[79]=10776;X[112]=25;X[80]=10777;X[V["["]]=26;X[V["{"]]=10778;X[V["]"]]=27;X[V["}"]]=10779;X[13]=28;X[1017]=29;X[97]=30;X[65]=10782;X[115]=31;X[83]=10783;X[100]=32;X[68]=10784;X[102]=33;X[70]=10785;X[103]=34;X[71]=10786;X[104]=35;X[72]=10787;X[106]=36;X[74]=10788;X[107]=37;X[75]=10789;X[108]=38;X[76]=10790;X[V[";"]]=39;
        X[V[":"]]=10791;X[V["'"]]=40;X[V['"']]=10792;X[V["`"]]=41;X[V["~"]]=10793;X[1016]=42;X[V["\\"]]=43;X[V["|"]]=10795;X[122]=44;X[90]=10796;X[120]=45;X[88]=10797;X[99]=46;X[67]=10798;X[118]=47;X[86]=10799;X[98]=48;X[66]=10800;X[110]=49;X[78]=10801;X[109]=50;X[77]=10802;X[V[","]]=51;X[V["<"]]=10803;X[V["."]]=52;X[V[">"]]=10804;X[V["/"]]=53;X[V["?"]]=10805;X[3016]=54;X[1044]=55;X[1018]=56;X[V[" "]]=57;X[1020]=58;X[1112]=59;X[1113]=60;X[1114]=61;X[1115]=62;X[1116]=63;X[1117]=64;X[1118]=65;X[1119]=66;
        X[1120]=67;X[1121]=68;X[1144]=69;X[1145]=70;X[1036]=71;X[1038]=72;X[1033]=73;X[1109]=74;X[1037]=75;X[1101]=76;X[1039]=77;X[1107]=78;X[1035]=79;X[1040]=80;X[1034]=81;X[1045]=82;X[1046]=83;X[1122]=87;X[1123]=88;X[1091]=91;X[1093]=93;X[1224]=91;X[4003]=7470;X[4008]=7494;X[4046]=3677523;f=zi.prototype;
        f.Lb=function(a,b,c){var d=this,e=a+"-"+b;if(void 0===this.qa[e])switch(b){case "kbd":return c.onkeydown=function(a){return Gi(d,a,!0)},c.onkeypress=function(a){a=a||window.event;a=a.which||a.keyCode;if(d.Om){var b=d.Mb.length?d.Mb[0].Pe:0;b&&(65<=b&&90>=b||97<=b&&122>=b)&&(65<=a&&90>=a||97<=a&&122>=a)&&b!=a&&(d.xk=!0,a=b)}(b=!X[a]||!!(d.Zb&128))||Hi(d,a,!0);return b},c.onkeyup=function(a){return Gi(d,a,!1)},!0;case "caps-lock":return this.qa[e]=c,c.onclick=function(){d.U&&d.U.Jd();Hi(d,1020,!0)},
        !0;case "num-lock":return this.qa[e]=c,c.onclick=function(){d.U&&d.U.Jd();Hi(d,1144,!0)},!0;case "scroll-lock":return this.qa[e]=c,c.onclick=function(){d.U&&d.U.Jd();Hi(d,1145,!0)},!0;default:var m=b.toUpperCase().replace(/-/g,"_");if(void 0!==Di[m]&&"button"==a)return this.qa[e]=c,c.onclick=function(a,b,c){return function(){a.U&&a.U.Jd();Ii(a,c,!0);Hi(a,c,!0)}}(this,m,Di[m]),!0;if(void 0!==Ei[b])return this.Gm++,this.qa[e]=c,a=function(a,b,c){return function(){Hi(a,c)}}(this,b,Ei[b]),b=function(a,
        b,c){return function(){Ji(a,c)}}(this,b,Ei[b]),"ontouchstart"in window?(c.ontouchstart=a,c.ontouchend=b):(c.onmousedown=a,c.onmouseup=c.onmouseout=b),!0}return!1};function Ki(a,b,c){if(a.Gm){for(var d in Bi)if(b==Bi[d]){b=+d;(d=Ai[d])&&(b=d);break}for(var e in Ei)if((d=Ei[e]==b)||(d=b,97<=d&&122>=d&&(d-=32),d=Ei[e]==d),d){(a=a.qa["key-"+e])&&void 0!==c&&(a.style.color=c?"#ffffff":"#000000",a.style.backgroundColor=c?"#000000":"#ffffff");break}}}
        f.Lc=function(a,b,c,d){this.la=b;this.U=c;this.Ra=d;this.fa=gb(a,"ChipSet")};function ki(a,b){a.oc("keyboard reset",65792);a.Wb=[170];a.Og=!0;b&&a.fa&&mi(a.fa,a.Wb[0])}function gi(a,b,c){a.sk!==c&&(a.sk=a.wk=c)&&(a.Og=!0);a.gi!==b&&(a.gi=b)&&!a.wk&&ni(a,!0);a.gi&&a.wk&&(ki(a,!0),a.wk=!1)}function hi(a){var b=0;a.Wb.length&&a.Og&&(b=a.Wb[0],a.fa&&mi(a.fa,b))}function ni(a,b){0<a.Wb.length&&(a.Wb.shift(),(a.Og=b)&&a.Wb.length&&a.fa&&mi(a.fa,a.Wb[0]))}
        f.gc=function(a,b){return!b&&(this.reset(),a&&this.restore&&!this.restore(a))?!1:!0};f.fc=function(a){return a&&this.save?this.save():!0};f.reset=function(){this.ye();this.Zb=this.ud=0;this.Wb=[];this.Og=!0};f.save=function(){var a=new Zd(this);a.set(0,this.dm());return a.data()};f.restore=function(a){return this.ye(a[0])};f.ye=function(a){var b=0;void 0===a&&(a=[]);this.sk=this.Og=a[b++];this.gi=a[b];return!0};f.dm=function(){var a=0,b=[];b[a++]=this.sk;b[a]=this.gi;return b};
        function Ii(a,b,c,d){if(X[b]){var e=Math.floor(b/1E3)&2;if(b=Ci[b]||0){!e||b&85||(b>>=1);if(b&3584){if(!1===d)return!0;d=null}null==d?d=!((c?a.ud:a.Zb)&b):d||b&255&&(b=255);if(c){a.ud&=~b;d&&(a.ud|=b);c=b;var m,n;for(n in Fi)d="led-"+n,e=Fi[n],c&&c!=e||!(m=a.qa[d])||(m.style.backgroundColor=a.ud&e?"#00ff00":"#000000")}else a.Zb&=~b,d&&(a.Zb|=b);return!0}}return!1}
        function Hi(a,b,c){if(X[b]&&a.U&&a.U.ha.Qb){Ci[b]&&a.Mb.length&&0<a.Mb[0].Dd&&(a.Mb[0].Dd=0);for(var d,e=0;e<a.Mb.length;e++)if(d=a.Mb[e],d.Pe==b){if(!c||0<=d.Dd){e=-1;break}0<e&&(0<a.Mb[0].Dd&&(a.Mb[0].Dd=0),a.Mb.splice(e,1));break}0>e||(e==a.Mb.length&&(d={},d.Pe=b,d.Zb=a.Zb,Ki(a,b,!0),e++),0<e&&a.Mb.splice(0,0,d),d.Rg=!0,d.Dd=c?-1:Ci[b]?0:1,Li(a,d))}}
        function Ji(a,b,c){if(!X[b]||!(c||a.U&&a.U.ha.Qb))return!1;for(var d=!1,e=0;e<a.Mb.length;e++){var m=a.Mb[e];if(m.Pe==b||m.Pe==Bi[b]){a.Mb.splice(e,1);m.Rn&&clearTimeout(m.Rn);m.Rg&&!c&&Mi(a,m.Pe,!1);Ki(a,b,!1);d=!0;break}}!a.Mb.length&&a.xk&&(Ii(a,1020),a.xk=!1);return d}
        function Li(a,b){if(a.U&&a.U.ha.Qb){if(Mi(a,b.Pe,b.Rg),b.Dd){var c;if(0>b.Dd){if(!b.Rg){Ji(a,b.Pe);return}b.Rg=!1;c=a.Np}else c=1==b.Dd++?a.Op:a.Pp;b.Rn=setTimeout(function(a){return function(){Li(a,b)}}(a),c)}}else Ji(a,b.Pe,!0)}function Ni(a,b,c){var d=b;if(65<=b&&90>=b)!(a.Zb&515)==c&&(d=b+32);else if(97<=b&&122>=b)!!(a.Zb&515)==c&&(d=b-32);else if(!!(a.Zb&3)==c){if(a=Bi[b])d=a}else if(a=Ai[b])d=a;return d}f.sj=function(a){this.hi=a;a||(this.Zb&=-256)};
        function Gi(a,b,c){var d=!0,e=!1,m=!1,n=b.keyCode,p=Ni(a,n,!0);a.tk&&p==V["`"]&&(n=p=27);if(X[n+1E3])if(p+=1E3,2==b.location&&(p+=2E3),Ii(a,p,!1,c)){if(20==n||144==n||145==n)a.yo||(c=e=!0);if(!(c||91!=n&&93!=n))for(var v=0;v<a.Mb.length;v++){var w=a.Mb[v];w.Rg=!1;0<w.Dd&&(w.Dd=0)}}else 8==n&&8==(a.Zb&40)&&(p=4008),d=!1;else if(X[p]&&a.Zb&60&&(d=!1),!a.Om&&d&&c||a.Zb&192)m=!0;d||b.preventDefault();m||a.Um&&d||(c?Hi(a,p,e):Ji(a,p)||(b=Ni(a,n,!1),b!=p&&Ji(a,b)));return d}
        function Mi(a,b,c){Ii(a,b,!0,c);var d=X[b]||X[b+1E3];if(void 0!==d){14==d&&40==(a.Zb&40)&&(d=83);var e=[],m=d&255;e.push(m|(c?0:128));for(b=65<=b&&90>=b||97<=b&&122>=b;d>>>=8;){var n=0,p=d&255;224==m||225==m?e.push(m|(c?0:128)):(42==p?a.ud&3||a.ud&512&&b||(n=p):29==p?a.ud&12||(n=p):56==p?a.ud&48||(n=p):e.push(m|(c?0:128)),n&&(c?e.unshift(n):e.push(n|128)))}for(c=0;c<e.length;c++)d=a,m=e[c],d.Wb&&(20>d.Wb.length?(d.Wb.push(m),1==d.Wb.length&&d.fa&&mi(d.fa,m)):(20==d.Wb.length&&d.Wb.push(255),d.oc("scan code buffer overflow")))}}
        Ea(function(){for(var a=Xa(window.document,"pcjs","keyboard"),b=0;b<a.length;b++){var c=a[b],d=Ua(c),d=new zi(d);Wa(d,c)}});
        function Y(a,b,c,d,e){Ia.call(this,"Video",a,Y);this.ma=a.model;this.qb=Oi[this.ma]||Pi;this.vd=a.memory||0;this.Nn=a.switches;this.jd=a.mode;if(void 0===this.jd||void 0===Qi[this.jd])this.jd=Ri;this.vi=a.charCols;this.Ql=a.charRows;if(void 0===this.vi||void 0===this.Ql)this.vi=Qi[this.jd][0],this.Ql=Qi[this.jd][1];this.xd=a.screenWidth;this.Sd=a.screenHeight;this.Ao=a.scale;this.wo=12<=Math.round(this.xd/this.vi);this.Co=a.touchScreen;this.fd=b;this.Uc=c;this.Sa=(this.Cr=d)||b||null;this.Ae=null;
        this.uo=a.autoLock;this.Va=this.Ub=0;this.he=[];this.Kd=Array(16);this.hi=!1;var m=this;this.Rm=ya("Gecko/");b=["","moz","webkit","ms"];if(this.rc=e)if(this.rc.Of=e.requestFullscreen||e.msRequestFullscreen||e.mozRequestFullScreen||e.webkitRequestFullscreen,this.rc.Of){for(e=0;e<b.length;e++)if(c=b[e]+"fullscreenchange","on"+c in document){document.addEventListener(c,function(){Si(m,document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement?
        !0:!1)},!1);break}for(e=0;e<b.length;e++)if(c=b[e]+"fullscreenerror","on"+c in document){document.addEventListener(c,function(){Si(m,null)},!1);break}}this.Sa&&(this.Sa.onfocus=function(){return m.sj(!0)},this.Sa.onblur=function(){return m.sj(!1)},this.Sa.mf=this.Sa.requestPointerLock||this.Sa.mozRequestPointerLock||this.Sa.webkitRequestPointerLock,this.Sa.Sn=this.Sa.exitPointerLock||this.Sa.mozExitPointerLock||this.Sa.webkitExitPointerLock,this.Sa.mf&&(e=function(){m.lh(document.pointerLockElement===
        m.Sa||document.mozPointerLockElement===m.Sa||document.webkitPointerLockElement===m.Sa)},"onpointerlockchange"in document?document.addEventListener("pointerlockchange",e,!1):"onmozpointerlockchange"in document?document.addEventListener("mozpointerlockchange",e,!1):"onwebkitpointerlockchange"in document&&document.addEventListener("webkitpointerlockchange",e,!1)));if(a=a.fontROM)"json"!=ha(a)&&(a=qa()+"/api/v1/dump?file="+a+"&format=bytes"),pa(a,!0,null,this,this.bq)}Qa(Y);
        var Pi=1,Oi={mda:1,cga:3,ega:5,vga:7},Ri=7,Ti={2:{Bi:15700,Ai:208,tj:85,uj:96},3:{Bi:18432,Ai:364,tj:85,uj:96},4:{Bi:21850,Ai:364,tj:85,uj:96},7:{Bi:16700,Ai:480,tj:85,uj:83}},Ui={6:[1,3,!0],7:[2,3,!0],8:[6,3,!0],9:[4,3,!0],10:[3,1,!0],11:[3,2,!0],0:[1,3,!1],1:[2,3,!1],2:[6,3,!1],3:[4,3,!1],4:[3,1,!1],5:[3,2,!1]},Qi=[,[40,25,1,0,3],,[80,25,1,0,3],[320,200,8,192],,[640,200,16,192]];Qi[Ri]=[80,25,1,0,1];Qi[13]=[320,200,16];Qi[14]=[640,200,16];Qi[15]=[640,350,16];Qi[16]=[640,350,16];
        Qi[17]=[640,480,16];Qi[18]=[640,480,16];Qi[19]=[320,200,16];Qi[0]=Qi[1];Qi[2]=Qi[3];Qi[5]=Qi[4];var Vi=Array(5);Vi[0]=[0,0,0,255];Vi[1]=[127,192,127,255];Vi[2]=[127,192,127,255];Vi[3]=[127,255,127,255];Vi[4]=[127,255,127,255];var Wi=[0,1,2,2,2,2,2,2,0,3,4,4,4,4,4,4],Xi=Array(16);Xi[0]=[0,0,0,255];Xi[1]=[0,0,170,255];Xi[2]=[0,170,0,255];Xi[3]=[0,170,170,255];Xi[4]=[170,0,0,255];Xi[5]=[170,0,170,255];Xi[6]=[170,85,0,255];Xi[7]=[170,170,170,255];Xi[8]=[85,85,85,255];Xi[9]=[85,85,255,255];
        Xi[10]=[85,255,85,255];Xi[11]=[85,255,255,255];Xi[12]=[255,85,85,255];Xi[13]=[255,85,255,255];Xi[14]=[255,255,85,255];Xi[15]=[255,255,255,255];var Yi=[2,4,6],Zi=[3,5,7],$i=[0,1,2,3,4,5,20,7,56,57,58,59,60,61,62,63],aj=[0,255,65280,65535,16711680,16711935,16776960,16777215,-16777216,-16776961,-16711936,-16711681,-65536,-65281,-256,-1],bj=[0];bj[128]=1;bj[32768]=2;bj[32896]=3;bj[8388608]=4;bj[8388736]=5;bj[8421376]=6;bj[8421504]=7;bj[-2147483648]=8;bj[-2147483520]=9;bj[-2147450880]=10;
        bj[-2147450752]=11;bj[-2139095040]=12;bj[-2139094912]=13;bj[-2139062272]=14;bj[-2139062144]=15;
        function cj(a,b,c,d){if(void 0!==b&&(!c||c.length)){this.video=a;var e=dj[b],m=a.kd||e[5];if(!c||6>c.length)c=[!1,0,null,null,0,Array(5>b?ej:fj)];this.qb=b;this.Va=e[2];this.Ub=e[3];this.vd=d||e[4];65536<=this.vd&&720896<=this.Va&&(this.Ub=Math.min(this.vd>>2,32768));this.vc=c[0];this.Nc=c[1];this.oh=c[2];this.ta=c[3];this.zc=c[4]&255;this.zj=c[4]>>8&255;this.Ab=c[5];this.Fk=ej;if(5<=b){this.Fk=fj;b=c[6];void 0===b&&(b=[!1,0,Array(20),0,3==m?0:1,0,0,Array(5),0,0,0,Array(9),0,[this.Va,this.Ub,this.vd],
        Array(this.vd>>2),5144,0,-1,0,-1,0,-1,0,0,0,0,1,255,0,0,0,Array(256)]);this.te=b[0];this.sf=b[1];this.Je=b[2];this.Yl=b[3];this.sh=b[4];this.Ej=b[5];this.lg=b[6];this.th=b[7];this.Fn=b[8];this.Gn=b[9];this.jg=b[10];this.ig=b[11];this.mb=b[12];d=b[13];"number"==typeof d&&(d=[this.Va,this.Ub,d]);this.Va=d[0];this.Ub=d[1];d=this.vd>>2;if((this.We=b[14])&&this.We.length<d){for(var e=this.We,n=0,p=Array(d),v=0;v<e.length-1;){for(var w=e[v++],G=e[v++];w--;)p[n]=G,n+=2;n==d&&(n=1)}this.We=p}(d=b[15])&&(d=
        d&8?d&-9:gj[d&65280]|gj[d&255]);this.Lj(d);this.Pl=b[16];this.fb=b[17];this.Cd=b[18];this.nb=b[19];this.pj=b[20];this.He=b[21];this.qf=b[22];this.Gk=b[23];this.Hk=b[24];this.jh=b[25];7==this.qb&&(this.Zl=b[26],this.Ul=b[27],this.Ed=b[28],this.Ac=b[29],this.Cj=b[30],this.qh=b[31])}m=Ti[m]||Ti[3];this.Ik=a.U.R.Bd/m.Bi|0;this.Sp=this.Ik*m.tj/100|0;this.rn=this.Ik*m.Ai|0;this.Up=this.rn*m.uj/100|0;this.tn=c[7]||0}}var ej=18,fj=25,gj=[,,1024,5120];gj[16]=1280;gj[512]=0;gj[1024]=32;gj[1536]=96;
        gj[2560]=160;gj[3584]=224;gj[768]=16;gj[4096]=1;gj[8192]=2;gj[24576]=98;gj[40960]=162;gj[57344]=226;var hj=[];hj[1024]=function(a){a+=this.offset;return(this.W.mb=this.ba[a])>>this.W.Pl&255};hj[5120]=function(a){a+=this.offset;var b=this.W.mb=this.ba[a&-2];return(a&1?b>>8:b)&255};hj[1280]=function(a){a+=this.offset;a=this.W.mb=this.ba[a];for(var b=this.W.Hk,c=this.W.Gk&b,d=0,e=128;e;)(a&b)==c&&(d|=e),c>>>=1,b>>>=1,e>>=1;return d};
        hj[0]=function(a,b){var c=a+this.offset,d;d=this.ba[c]&~this.W.fb|(b|b<<8|b<<16|b<<24)&this.W.fb;d=d&this.W.nb|this.W.mb&~this.W.nb;this.ba[c]!=d&&(this.ba[c]=d,this.Ka=!0)};hj[32]=function(a,b){var c=a+this.offset;b=b>>this.W.Cd|b<<8-this.W.Cd&255;var d;d=(b|b<<8|b<<16|b<<24)&this.W.He|this.W.qf;d=d&this.W.fb|this.ba[c]&~this.W.fb;d=d&this.W.nb|this.W.mb&~this.W.nb;this.ba[c]!=d&&(this.ba[c]=d,this.Ka=!0)};
        hj[96]=function(a,b){var c=a+this.offset;b=b>>this.W.Cd|b<<8-this.W.Cd&255;var d;d=(b|b<<8|b<<16|b<<24)&this.W.He|this.W.qf;d&=this.W.mb;d=d&this.W.fb|this.ba[c]&~this.W.fb;d=d&this.W.nb|this.W.mb&~this.W.nb;this.ba[c]!=d&&(this.ba[c]=d,this.Ka=!0)};hj[160]=function(a,b){var c=a+this.offset;b=b>>this.W.Cd|b<<8-this.W.Cd&255;var d;d=(b|b<<8|b<<16|b<<24)&this.W.He|this.W.qf;d|=this.W.mb;d=d&this.W.fb|this.ba[c]&~this.W.fb;d=d&this.W.nb|this.W.mb&~this.W.nb;this.ba[c]!=d&&(this.ba[c]=d,this.Ka=!0)};
        hj[224]=function(a,b){var c=a+this.offset;b=b>>this.W.Cd|b<<8-this.W.Cd&255;var d;d=(b|b<<8|b<<16|b<<24)&this.W.He|this.W.qf;d^=this.W.mb;d=d&this.W.fb|this.ba[c]&~this.W.fb;d=d&this.W.nb|this.W.mb&~this.W.nb;this.ba[c]!=d&&(this.ba[c]=d,this.Ka=!0)};hj[16]=function(a,b){a+=this.offset;var c,d=a&-2;c=this.W.fb&(d==a?16711935:-16711936);c=(b|b<<8|b<<16|b<<24)&c|this.ba[d]&~c;c=c&this.W.nb|this.W.mb&~this.W.nb;this.ba[d]!=c&&(this.ba[d]=c,this.Ka=!0)};
        hj[1]=function(a){a+=this.offset;var b=this.ba[a]&~this.W.fb|this.W.mb&this.W.fb;this.ba[a]!=b&&(this.ba[a]=b,this.Ka=!0)};hj[17]=function(a){a+=this.offset;var b=a&-2;a=this.W.fb&(b==a?16711935:-16711936);a=this.ba[b]&~a|this.W.mb&a;this.ba[b]!=a&&(this.ba[b]=a,this.Ka=!0)};hj[2]=function(a,b){var c=a+this.offset,d=aj[b&15],d=d&this.W.fb|this.ba[c]&~this.W.fb,d=d&this.W.nb|this.W.mb&~this.W.nb;this.ba[c]!=d&&(this.ba[c]=d,this.Ka=!0)};
        hj[98]=function(a,b){var c=a+this.offset,d=aj[b&15],d=d&this.W.mb,d=d&this.W.fb|this.ba[c]&~this.W.fb,d=d&this.W.nb|this.W.mb&~this.W.nb;this.ba[c]!=d&&(this.ba[c]=d,this.Ka=!0)};hj[162]=function(a,b){var c=a+this.offset,d=aj[b&15],d=d|this.W.mb,d=d&this.W.fb|this.ba[c]&~this.W.fb,d=d&this.W.nb|this.W.mb&~this.W.nb;this.ba[c]!=d&&(this.ba[c]=d,this.Ka=!0)};
        hj[226]=function(a,b){var c=a+this.offset,d=aj[b&15],d=d^this.W.mb,d=d&this.W.fb|this.ba[c]&~this.W.fb,d=d&this.W.nb|this.W.mb&~this.W.nb;this.ba[c]!=d&&(this.ba[c]=d,this.Ka=!0)};
        function ij(a){var b=[];if(void 0!==a.qb){b[0]=a.vc;b[1]=a.Nc;b[2]=a.oh;b[3]=a.ta;b[4]=a.zc|a.zj<<8;b[5]=a.Ab;if(5<=a.qb){var c=[];c[0]=a.te;c[1]=a.sf;c[2]=a.Je;c[3]=a.Yl;c[4]=a.sh;c[5]=a.Ej;c[6]=a.lg;c[7]=a.th;c[8]=a.Fn;c[9]=a.Gn;c[10]=a.jg;c[11]=a.ig;c[12]=a.mb;c[13]=[a.Va,a.Ub,a.vd];var d;a:if(d=a.We){var e=0,m=[];if(void 0!==d[0])for(var n=0;2>n;n++)for(var p=n;p<d.length;){for(var v=d[p],w=p+2;w<d.length&&d[w]===v;)w+=2;m[e++]=w-p>>1;m[e++]=v;p=w}if(m.length<d.length){d=m;break a}}c[14]=d;c[15]=
        a.Ek|8;c[16]=a.Pl;c[17]=a.fb;c[18]=a.Cd;c[19]=a.nb;c[20]=a.pj;c[21]=a.He;c[22]=a.qf;c[23]=a.Gk;c[24]=a.Hk;c[25]=a.jh;7==a.qb&&(c[26]=a.Zl,c[27]=a.Ul,c[28]=a.Ed,c[29]=a.Ac,c[30]=a.Cj,c[31]=a.qh);b[6]=c}b[7]=a.tn}return b}cj.prototype.cn=function(a){return[this.We,a-this.Va]};cj.prototype.Ak=function(){return this.Ih};
        cj.prototype.Lj=function(a){if(null!=a&&a!=this.Ek){var b=a&65280,c=hj[b];c||b&4096&&(c=hj[4096]);var b=a&247,d=hj[b];d||b&16&&(d=hj[16]);this.Ih||(this.Ih=Array(6));this.Ih[0]=c;this.Ih[3]=d;this.Ek=a}};var dj=[];dj[Pi]=["MDA",948,720896,4096,0,3];dj[3]=["CGA",980,753664,16384,0,2];dj[5]=["EGA",980,753664,16384,65536,4];dj[7]=["VGA",980,753664,16384,262144,7];f=Y.prototype;
        f.Lc=function(a,b,c,d){this.la=b;this.U=c;this.Ra=d;3!=Oi[this.ma]&&(Tb(b,this,jj),Vb(b,this,kj));Oi[this.ma]!=Pi&&(Tb(b,this,lj),Vb(b,this,mj));5<=this.qb&&(Tb(b,this,nj),Vb(b,this,oj));7==this.qb&&(Tb(b,this,pj),Vb(b,this,qj));if((this.Da=gb(a,"Keyboard"))&&this.fd){for(var e in this.qa)0<e.indexOf("lock")&&this.Da.Lb("led",e,this.qa[e]);this.Da.Lb(this.Cr?"textarea":"canvas","kbd",this.Sa)}this.Mh=9;(this.fa=gb(a,"ChipSet"))&&this.Nn&&5==this.qb&&(this.Mh=$g(this.Nn,this.Mh));this.Da&&this.Co&&
        rj(this)};f.Lb=function(a,b,c){var d=this;if(!this.qa[b])switch(this.qa[b]=c,b){case "fullScreen":return this.rc&&this.rc.Of?c.onclick=function(){d.Of()}:c.parentNode.removeChild(c),!0;case "lockPointer":return this.zr=c.textContent,this.Sa&&this.Sa.mf?c.onclick=function(){d.mf(!0)}:c.parentNode.removeChild(c),!0;case "refresh":return c.onclick=function(){wc(d,!0)},!0}return!1};f.Jd=function(){this.Sa&&this.Sa.focus()};
        f.Of=function(){var a=!1;if(this.rc){if(this.rc.Of){a="100%";if(screen&&screen.width&&screen.height){var b=screen.width/screen.height,c=this.xd/this.Sd;b>c&&(a=Math.round(c/b*100)+"%")}this.Rm?(this.fd.style.width=a,this.fd.style.width=a,this.fd.style.display="block",this.fd.style.margin="auto"):(this.rc.style.width=a,this.rc.style.height="auto");this.rc.style.backgroundColor="black";this.rc.Of();a=!0}this.Jd()}return a};
        function Si(a,b){!b&&a.rc&&(a.Rm?a.fd.style.width=a.fd.style.height="":a.rc.style.width=a.rc.style.height="");a.oc("notifyFullScreen("+b+")",!0);a.Da&&(a.Da.tk=b)}f.mf=function(a){var b=!1;this.Sa&&(a?this.Sa.mf&&(this.Sa.mf(),this.Ae.lh(!0),b=!0):this.Sa.Sn&&(this.Sa.Sn(),this.Ae.lh(!1),b=!0),this.Jd());return b};f.lh=function(a){this.Ae&&(this.Ae.lh(a),this.Da&&(this.Da.tk=a));var b=this.qa.lockPointer;b&&(b.textContent=a?"Press Esc to Unlock Pointer":this.zr)};
        function rj(a){var b=a.Sa;b&&!a.Pg&&(b.addEventListener("touchstart",function(b){sj(a,b)},!1),b.addEventListener("touchmove",function(b){sj(a,b)},!0),b.addEventListener("touchend",function(){},!1),a.Pg=!0)}f.sj=function(a){this.hi=a;this.Da&&this.Da.sj(a)};
        function sj(a,b){a.hi&&b.preventDefault();var c=0,d=0,e=a.fd;do isNaN(e.offsetLeft)||(c+=e.offsetLeft,d+=e.offsetTop);while(e=e.offsetParent);var m=a.xd/a.fd.offsetWidth,e=a.Sd/a.fd.offsetHeight,n,p;b.targetTouches?(n=b.targetTouches[0].pageX,p=b.targetTouches[0].pageY):(n=b.pageX,p=b.pageY);c=(n-c)*m/(a.xd/3)|0;d=(p-d)*e/(a.Sd/3)|0;1!=d?d?Hi(a.Da,1040,!0):Hi(a.Da,1038,!0):1!=c&&(c?Hi(a.Da,1039,!0):Hi(a.Da,1037,!0))}
        f.gc=function(a,b){if(!b)if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};f.fc=function(a){return a&&this.save?this.save():!0};
        f.reset=function(){var a=!0,b=0;this.fa&&(b=rh(this.fa));this.ma||(this.qb=3==b?Pi:3);this.jd=3;switch(this.qb){case 7:b=7;break;case 5:var c=Ui[this.Mh];c&&(b=c[0]);b||(b=4);break;case Pi:b=3;this.jd=Ri;break;default:b=2}this.kd!==b&&(this.kd=b,a=!0);this.Ta=null;this.gd=this.ek=new cj(this,Pi);this.kc=this.Wh=new cj(this,3);5>this.qb?this.X=new cj:(this.X=new cj(this,this.qb,null,this.vd),tj(this));uj(this);this.De=null;this.af=this.Xc=-1;this.$e=0;vj(this,this.jd);if(this.Ta.Va&&a){a=this.Ta.Va+
        this.fk;for(b=this.Ta.Va;b<a;b+=2){var d=65536*Math.random()|0;4==this.kd||7==this.kd?(c=b>>1&255,d=d>>8&-129,d>>4==(d&15)&&(d^=15)):(c=d&255,d=(d&256?7:112)|8&d>>8);Pb(this.la,b,c|d<<8)}wc(this,!0)}};function tj(a){a.X.sh&1?(a.gd=a.ek,a.kc=a.X):(a.gd=a.X,a.kc=a.Wh)}f.save=function(){var a=new Zd(this);a.set(0,ij(this.ek));a.set(1,ij(this.Wh));a.set(2,[this.kd,this.jd,this.De]);a.set(3,ij(this.X));return a.data()};
        f.restore=function(a){var b=a[2];this.kd=b[0];this.jd=b[1];this.De=b[2];this.Ta=null;this.gd=this.ek=new cj(this,Pi,a[0]);this.kc=this.Wh=new cj(this,3,a[1]);this.X=new cj(this,this.qb,a[3],this.vd);this.X.vc&&tj(this);uj(this);if(!wj(this))return!1;xj(this);return!0};
        f.bq=function(a,b,c){if(c)this.wa("Unable to load font ROM image (error "+c+")");else{try{var d=eval("("+b+")");if(!d.length){ra("Empty font ROM image: "+a);return}if(1==d.length){ra(d[0]);return}if(8192==d.length)qi(this,d,[6144,0]);else{this.wa("Unrecognized font data length ("+d.length+")");return}}catch(e){this.wa("Font ROM data error: "+e.message);return}(this.Uc||this.Ra)&&Za(this)}};
        function yj(a,b){if(1==b)return a.Kd[0]=Xi[0],a.Kd[1]=Xi[7],a.Kd;if(2==b){var c=a.Ta.oh;if(a.Ta===a.X){var d=a.X.Je[0],c=d&7;d&16&&(c|=8);18!=a.X.Je[1]&&(c|=32)}a.Kd[0]=Xi[c&15];c=c&32?Zi:Yi;for(d=0;d<c.length;d++)a.Kd[d+1]=Xi[c[d]];return a.Kd}if(a.kc===a.Wh)return Xi;c=null!=a.X.Je[15]?a.X.Je:$i;for(d=0;d<a.Kd.length;d++){var e=c[d]||0;a.Kd[d]=[(e&4?170:0)|(e&32?85:0),(e&2?170:0)|(e&16?85:0),(e&1?170:0)|(e&8?85:0),255]}return a.Kd}function qi(a,b,c,d){a.Fh=b;a.Uj=c;a.ff=d}
        function uj(a){var b=!1;if(window&&a.Fh){var c=yj(a),d,e=a.ff?a.ff:8;zj(a,3,a.Uj[0],0,e,8,a.Fh,c)&&(b=!0);d=a.ff?0:2048;e=a.ff?a.ff:9;zj(a,1,a.Uj[1],d,e,14,a.Fh,Vi,Wi)&&(b=!0);a.ff&&zj(a,a.qb,a.Uj[1],0,a.ff,14,a.Fh,c)&&(b=!0)}return b}function zj(a,b,c,d,e,m,n,p,v){var w=!1;null!=c&&(Aj(a,b,c,d,e,m,n,p,v)&&(w=!0),a.wo&&Aj(a,b<<1,c,d,e,m,n,p,v)&&(w=!0));return w}
        function Aj(a,b,c,d,e,m,n,p,v){var w=!1,G=b&1?0:1,N=a.he[b];N||(N={sc:e<<G,tc:m<<G,Df:Array(p.length),sm:p.slice(),xg:v,Sj:Array(p.length)});for(v=0;v<p.length;v++){var L=p[v],U=N.Df[v]?N.sm[v]:[];if(L[0]!==U[0]||L[1]!==U[1]||L[2]!==U[2]){var w=N,U=v,W=G,za=c,ga=d,xa=e,Va=m,Rb=n,Lc=[0,0,0,0],Hd=window.document.createElement("canvas");Hd.width=w.sc<<4;Hd.height=w.tc<<4;for(var yh=Hd.getContext("2d"),pb=void 0,qc=void 0,Sb=void 0,Id=8>Va||!ga?Va:8,Se=yh.createImageData(w.sc,w.tc),pb=0;256>pb;pb++){for(Sb=
        0;Sb<Va;Sb++)for(var Ck=w.xg&&U&1&&Sb>=Va-2,Dk=Rb[Sb<Id?za+pb*Id+Sb:ga+pb*Id+Sb-Id],Te=0;Te<=W;Te++)for(qc=0;qc<xa;qc++){var zh=qc<<W,Ah=(Sb<<W)+Te,Bh=Ck||Dk&128>>(8<=qc&&192<=pb&&223>=pb?7:qc)?L:Lc;Bj(Se,zh,Ah,Bh);W&&Bj(Se,zh+1,Ah,Bh)}yh.putImageData(Se,(pb&15)*w.sc,(pb>>4)*w.tc)}w.Df[U]="#"+da(L[0],2)+da(L[1],2)+da(L[2],2);w.sm[U]=L;w.Sj[U]=Hd;w=!0}}a.he[b]=N;return w}function Cj(a){0<a.$e||0<=a.Xc?0>a.af&&(a.af=0):a.af=-1}
        function xj(a){if(a.Rb){for(var b=10;15>=b;b++)if(null==a.Ta.Ab[b])return;var c=a.Ta.Ab[10],b=c&31,d=a.Ta.Ab[11]&31,e=a.Ta.Ab[9]&31,m=!1;a.Ta===a.X&&(m=!0,7!=e||4!=b||d||(d=7));if(c&32||b>d&&!m||b>e)Dj(a);else{c=a.Ta.Ab[15]+((a.Ta.Ab[14]&63)<<8);a.Xc!=c&&(Dj(a),a.Xc=c);d=d-b+1;if(a.Wn!=b||a.Lm!=d)a.Wn=b,a.Lm=d;a.re=e+1;Cj(a)}}}
        function Dj(a){if(0<=a.Xc){if(void 0!==a.Dc){var b=a.Dc[a.Xc];if(b&131072){var b=b&-131073,c=a.Xc%a.eb,d=a.Xc/a.eb|0;a.Rb&&a.he[a.Rb]&&(a.Nf&&Ej(a,c,d,b,a.Nf),Ej(a,c,d,b));a.Dc[a.Xc]=b}}a.Xc=-1}}
        function Fj(a){var b;a=a.Ta;var c=a.ig[5];if(null!=c){b=1024;var d=0,e=a.ig[3]&31;switch(c&3){case 0:if(e){d=32;switch(e&24){case 8:d=96;break;case 16:d=160;break;case 24:d=224}a.Cd=e&7}break;case 1:d=1;break;case 2:switch(e&24){default:d=2;break;case 8:d=98;break;case 16:d=162;break;case 24:d=226}}c&8&&(b=1280);a=a.th[4];null==a||a&4||(b|=4096,d|=16);b|=d}return b}f.md=function(a){var b=this.Ta;b&&null!=a&&a!=b.Ek&&(b.Lj(a),this.la.Lj(b.Va,b.Ub,b.Ak()))};
        function wj(a,b){var c,d=a.De,e=a.Ta;if(e)if(e.qb==Pi)d=Ri;else if(5<=e.qb){var d=null,m=e.vd>>2,n=32768<m?32768:m,p=e.ig[6];if(null!=p){switch(p&12){case 0:e.Va=655360;e.Ub=m;d=255;break;case 4:e.Va=655360;e.Ub=m;d=3==a.kd?15:16;break;case 8:e.Va=720896;e.Ub=n;d=Ri;break;case 12:e.Va=753664,e.Ub=n,d=3==a.kd?2:3}c=e.th[1]&8;m=e.Ab[6];m|=e.Ab[7]&1?256:0;7==e.qb&&(m|=e.Ab[7]&32?512:0);255!=d&&(p&1?753664==e.Va?d=c?7-d:6:500>m?350>m&&(d=c?13:14):d=3==a.kd?17:18:c&&(d-=2));c=Fj(a)}}else e.Nc&8&&(e.Nc&
        2?(d=e.Nc&16?6:5,e.Nc&4||--d):(d=e.Nc&1?3:1,e.Nc&4&&--d));else a.De=null,null==d&&(d=a.jd);if(!vj(a,d,b))return!1;a.md(c);return!0}
        function vj(a,b,c){if(null!=b&&(b!=a.De||c)){a.ao=0;a.De=b;b=a.Ta||(b==Ri?a.gd:a.kc);if(b!=a.Ta||b.Va!=a.Va||b.Ub!=a.Ub){Dj(a);if(a.Va){if(!Nb(a.la,a.Va,a.Ub))return!1;a.Ta&&(a.Ta.vc=!1)}a.Ta=b;b.vc=!0;a.Va=b.Va;a.Ub=b.Ub;if(!Jb(a.la,b.Va,b.Ub,3,b===a.X?b:null))return!1}a.Rb=0;a.eb=a.vi;a.nc=a.Ql;a.wi=a.eb;a.ti=Qi[Ri][2];a.Jg=0;if(b=Qi[a.De])a.eb=b[0],a.nc=b[1],a.ti=b[2],a.Jg=b[3]||0,a.Rb=b[4],4!=a.kd&&7!=a.kd||a.Ta!==a.X||3!=a.Rb||(7==a.X.Ab[9]?a.nc=43:a.Rb=a.qb);a.on=a.eb*a.nc|0;a.si=a.on/a.ti|
        0;a.fk=(a.si<<1)+a.Jg|0;a.Hm=a.Jg?a.fk+a.Jg>>1:0;13<=a.De&&(a.si<<=1);if(a.he.length){a.Rd=a.xd/a.eb|0;a.Td=a.Sd/a.nc|0;if(a.Rb){b=a.he[a.Rb];var d=a.he[a.Rb<<1];a.Ao&&80==a.eb?d&&a.Rd>=3*d.sc>>2&&(a.Rb<<=1,b=d):(d&&a.Rd>=d.sc&&(a.Rb<<=1,b=d),b&&(a.Rd=b.sc,a.Td=b.tc));a.Mg=a.Ng=0;b&&(a.Mg=a.eb*b.sc,a.Ng=a.nc*b.tc)}else a.Rd=a.Td=1,a.Mg=a.eb,a.Ng=a.nc;a.pi=a.Uc.createImageData(a.Mg,a.Ng);a.Lf=window.document.createElement("canvas");a.Lf.width=a.Mg;a.Lf.height=a.Ng;a.Nf=a.Lf.getContext("2d");a.hm=a.im=
        0;a.lk=a.xd;a.mk=a.Sd;b=a.xd-a.eb*a.Rd;d=a.Sd-a.nc*a.Td;0<b&&(a.hm=b>>1,a.lk-=b);0<d&&(a.im=d>>1,a.mk-=d);if(b||d)a.Uc.fillStyle=a.fd.style.backgroundColor,a.Uc.fillRect(0,0,a.xd,a.Sd)}!1!==c?wc(a,!0):Gj(a,!0)}return!0}function Bj(a,b,c,d){b=(b+c*a.width)*d.length;a.data[b]=d[0];a.data[b+1]=d[1];a.data[b+2]=d[2];a.data[b+3]=d[3]}function Gj(a,b){a.$e=-1;a.jf=!1;if(b){var c=a.si;if(void 0===a.Dc||a.Dc.length!=c){a.Dc=Array(c);for(var d=0;d<c;d++)a.Dc[d]=-1}}}
        function Ej(a,b,c,d,e){var m=d&255,n=d>>8;d=n&15;var p=a.he[a.Rb];p.xg&&(d=p.xg[d]);var v=n>>4&15;p.xg&&(v=p.xg[v]);e?(b*=p.sc,c*=p.tc,e.fillStyle=p.Df[v],e.fillRect(b,c,p.sc,p.tc)):(b=b*a.Rd+a.hm,c=c*a.Td+a.im,a.Uc.fillStyle=p.Df[v],a.Uc.fillRect(b,c,a.Rd,a.Td));n&256&&(v=(m&15)*p.sc,m=(m>>4)*p.tc,e?e.drawImage(p.Sj[d],v,m,p.sc,p.tc,b,c,p.sc,p.tc):a.Uc.drawImage(p.Sj[d],v,m,p.sc,p.tc,b,c,a.Rd,a.Td));n&512&&(m=a.Wn,n=a.Lm,e?(a.re&&a.re!==p.tc&&(m=m*p.tc/a.re|0,n=n*p.tc/a.re|0),e.fillStyle=p.Df[d],
        e.fillRect(b,c+m,p.sc,n)):(a.re&&a.re!==a.Td&&(m=m*a.Td/a.re|0,n=n*a.Td/a.re|0),a.Uc.fillStyle=p.Df[d],a.Uc.fillRect(b,c+m,a.Rd,n)))}
        function wc(a,b){if(a.ha.dc){var c=!1,d=a.Ta;d&&(d!==a.X?d.Nc&8&&(c=!0):d.sf&32&&(c=!0));if(c||b){if(b)Gj(a,!0);else if(void 0===a.Dc)return;var e=!1;!(b||++a.ao&15)&&0<=a.af&&(a.af++,e=!0);var m=0,n=a.on,c=d.Va,p=c+d.Ub;Hj(a,d)&8&&(d.jh=(d.Ab[12]<<8)+d.Ab[13]|0);var v=d.jh;a.Rb&&(v<<=1);c+=v;v=a.fk;5<=a.qb&&d.Ab[19]&&(a.wi=d.Ab[19]<<(a.Rb?1:4),v=((a.wi*(a.nc-1)+a.eb)/a.ti<<1)+a.Jg|0);c+v>p&&(v=p-c,0>v&&(v=0));p=c+v;if(d=!b){for(var d=a.la,w=!0,G=c>>>d.Aa;0<v&&G<d.ka.length;)d.ka[G].Ka&&(d.ka[G].Ka=
        w=!1,d.ka[G].Pm=!0),v-=d.ob,G++;d=w}if(d){if(!e)return;if(!a.$e){if(0>a.Xc)return;m=a.Xc;n=m+1}}if(a.Rb){if(a.he[a.Rb]){e=0;d=a.$e=0;v=1048575;a.Ta.Nc&32&&(d=32768,v&=~d,a.af&2||(v&=-65537));for(c+=m<<1;c<p&&m<n;)w=Ob(a.la,c),w|=65536,w&d&&(a.$e++,w&=v),m==a.Xc&&(w|=a.af&1?131072:0),a.jf&&w===a.Dc[m]||(Ej(a,m%a.eb,m/a.eb|0,w,a.Nf),a.Dc[m]=w,e++),c+=2,m++;a.jf=!0;e&&a.Nf&&a.Uc.drawImage(a.Lf,0,0,a.Mg,a.Ng,a.hm,a.im,a.lk,a.mk);Cj(a)}}else if(a.Hm){for(var n=p,N,m=c,p=a.$e=0,e=a.ti,d=16==e?65536:196608,
        v=16==e?1:2,w=yj(a,v),L=G=0,U=a.eb,W=0,za=a.nc,ga=0;m<n;){N=Ob(a.la,m);if(a.jf&&N===a.Dc[p])G+=e;else{a.Dc[p]=N;N=N>>8|(N&255)<<8;var xa=d,Va=16;G<U&&(U=G);for(var Rb=0;Rb<e;Rb++){var Lc=(N&(xa>>=v))>>(Va-=v);Bj(a.pi,G++,L,w[Lc])}G>W&&(W=G);L<za&&(za=L);L>=ga&&(ga=L+1)}m+=2;p++;if(G>=a.eb){G=0;L+=2;if(L>a.nc)break;L==a.nc&&(L=1,m=c+a.Hm)}}a.jf=!0;U<a.eb&&(a.Nf.putImageData(a.pi,0,0,U,za,W-U,ga-za),a.Uc.drawImage(a.Lf,0,0,a.eb,a.nc,0,0,a.xd,a.Sd))}else{n=p;m=a.$e=0;p=yj(a);e=a.Ta.We;v=d=0;w=a.eb;G=
        0;L=a.nc;U=0;W=a.Ta.Je[19]&15;for(za=a.wi>a.eb?a.wi-a.eb-W>>3:0;c<n;){ga=c++-a.Va;ga=e[ga];xa=8;W?d?(N=a.eb-d,xa>N&&(xa=N)):(ga<<=W,xa-=W,a.jf=!1):(a.jf&&ga===a.Dc[m]?(d+=xa,xa=0):a.Dc[m]=ga,m++);if(xa){d<w&&(w=d);for(N=0;N<xa;N++)Va=bj[ga&-2139062144]||0,Bj(a.pi,d++,v,p[Va]),ga<<=1;d>G&&(G=d);v<L&&(L=v);v>=U&&(U=v+1)}if(d>=a.eb){d=0;if(++v>a.nc)break;c+=za}}W||(a.jf=!0);w<a.eb&&(a.Nf.putImageData(a.pi,0,0,w,L,G-w,U-L),a.Uc.drawImage(a.Lf,0,0,a.eb,a.nc,0,0,a.xd,a.Sd))}}}}
        function Hj(a,b){var c=0,d=Dc(a.U)-b.tn;0>d&&(d=0);d%b.Ik>b.Sp&&(c|=1);d%b.rn>b.Up&&(c|=9);return c}f.mp=function(){var a=this.gd,b;a.vc&&(b=a.zc);return b};f.Nq=function(a,b){var c=this.gd;c.zj=c.zc;c.zc=b&31};f.lp=function(){return Ij(this.gd)};f.Mq=function(a,b){Jj(this,this.gd,b)};f.np=function(){return this.gd.Nc};f.Oq=function(a,b){this.gd.Nc=b;wj(this,!1)};f.op=function(){return Kj(this,this.gd)};f.An=function(a,b){this.X.Ej=this.X.Ej&-4|b&3};
        f.hn=function(){var a=this.X.te?this.X.Je[this.X.sf&31]:this.X.sf;this.X.te=!this.X.te;return a};f.zn=function(a,b){var c=this.X.sf&32;if(this.X.te){var d=this.X.sf&31;if(16<=d||!c)this.X.Je[d]=b;this.X.te=!1}else this.X.sf=b,this.X.te=!0,b&32&&!c&&uj(this)&&wc(this,!0),this.X.jh=(this.X.Ab[12]<<8)+this.X.Ab[13]|0};
        f.yp=function(){var a=0;if(5==this.qb)a=3-((this.X.sh&12)>>2),a=(this.Mh&1<<a)<<4-a;else{var b=this.X.qh[0];45!=(b&63)&&2880!=(b&4032)&&184320!=(b&258048)&&(a|=16)}a|=this.X.Yl&-17;return this.X.Yl=a};f.Pq=function(a,b){this.X.sh=b;tj(this)};f.zp=function(){return this.X.Zl};f.Zq=function(a,b){this.X.Zl=b};f.xp=function(){return this.X.lg};f.Xq=function(a,b){this.X.lg=b};f.wp=function(){return this.X.th[this.X.lg]};
        f.Wq=function(a,b){this.X.th[this.X.lg]=b;switch(this.X.lg){case 2:this.X.fb=aj[b&15];break;case 4:this.md(Fj(this))}};f.$o=function(){return this.X.Ul};f.zq=function(a,b){this.X.Ul=b};f.ap=function(){return this.X.Cj};f.Aq=function(a,b){this.X.Ed=b;this.X.Cj=3;this.X.Ac=0};f.Bq=function(a,b){this.X.Ed=b;this.X.Cj=0;this.X.Ac=0};f.Zo=function(){var a=this.X.qh[this.X.Ed]>>this.X.Ac&63;this.X.Ac+=6;12<this.X.Ac&&(this.X.Ac=0,this.X.Ed=this.X.Ed+1&255);return a};
        f.yq=function(a,b){this.X.qh[this.X.Ed]=this.X.qh[this.X.Ed]&~(63<<this.X.Ac)|(b&63)<<this.X.Ac;this.X.Ac+=6;12<this.X.Ac&&(this.X.Ac=0,this.X.Ed=this.X.Ed+1&255)};f.Ap=function(){return this.X.Ej};f.Iq=function(a,b){this.X.Gn=b};f.Bp=function(){return this.X.sh};f.Hq=function(a,b){this.X.Fn=b};f.fp=function(){return this.X.jg};f.Gq=function(a,b){this.X.jg=b};f.ep=function(){return this.X.ig[this.X.jg]};
        f.Fq=function(a,b){this.X.ig[this.X.jg]=b;switch(this.X.jg){case 0:this.X.pj=aj[b&15];this.X.qf=this.X.pj&~this.X.He;break;case 1:this.X.He=~aj[b&15];this.X.qf=this.X.pj&~this.X.He;break;case 2:this.X.Gk=aj[b&15]&-2139062144;break;case 3:case 5:this.md(Fj(this));break;case 4:this.X.Pl=(b&3)<<3;break;case 6:wj(this,!1);break;case 7:this.X.Hk=aj[b&15]&-2139062144;break;case 8:this.X.nb=b|b<<8|b<<16|b<<24}};f.Uo=function(){var a=this.kc,b;a.vc&&(b=a.zc);return b};
        f.sq=function(a,b){var c=this.kc;c.zj=c.zc;c.zc=b&31};f.To=function(){return Ij(this.kc)};f.rq=function(a,b){Jj(this,this.kc,b)};f.Vo=function(){return this.kc.Nc};f.tq=function(a,b){this.kc.Nc=b;wj(this,!1)};f.So=function(){return this.kc.oh};f.qq=function(a,b){this.kc.oh!==b&&(this.kc.oh=b,Gj(this))};f.Wo=function(){return Kj(this,this.kc)};function Ij(a){var b;a.vc&&a.zc<a.Fk&&(b=a.Ab[a.zc]);return b}
        function Jj(a,b,c){b.zc<b.Fk&&(b.Ab[b.zc]=c,(12==b.zc||13==b.zc)&&Hj(a,b)&1&&(b.jh=(b.Ab[12]<<8)+b.Ab[13]|0),9==b.zc&&8!=b.zj&&wj(a,!0),xj(a))}function Kj(a,b){var c=Hj(a,b);b===a.X?(c|=b.ta&48^48,b.te=!1):c=(b.ta^=9)|240;return b.ta=c}
        var jj={948:Y.prototype.mp,949:Y.prototype.lp,952:Y.prototype.np,954:Y.prototype.op},kj={948:Y.prototype.Nq,949:Y.prototype.Mq,952:Y.prototype.Oq},lj={980:Y.prototype.Uo,981:Y.prototype.To,984:Y.prototype.Vo,985:Y.prototype.So,986:Y.prototype.Wo},mj={980:Y.prototype.sq,981:Y.prototype.rq,984:Y.prototype.tq,985:Y.prototype.qq},nj={960:Y.prototype.hn,961:Y.prototype.hn,962:Y.prototype.yp,964:Y.prototype.xp,965:Y.prototype.wp,974:Y.prototype.fp,975:Y.prototype.ep},oj={954:Y.prototype.An,960:Y.prototype.zn,
        961:Y.prototype.zn,962:Y.prototype.Pq,964:Y.prototype.Xq,965:Y.prototype.Wq,970:Y.prototype.Iq,972:Y.prototype.Hq,974:Y.prototype.Gq,975:Y.prototype.Fq,986:Y.prototype.An},pj={963:Y.prototype.zp,966:Y.prototype.$o,967:Y.prototype.ap,969:Y.prototype.Zo,970:Y.prototype.Ap,972:Y.prototype.Bp},qj={963:Y.prototype.Zq,966:Y.prototype.zq,967:Y.prototype.Aq,968:Y.prototype.Bq,969:Y.prototype.yq};
        Ea(function(){for(var a=Xa(window.document,"pcjs","video"),b=0;b<a.length;b++){var c=a[b],d=Ua(c),e=window.document.createElement("canvas");if(void 0===e||!e.getContext){c.innerHTML="<br/>Missing &lt;canvas&gt; support. Please try a newer web browser.";break}e.setAttribute("class","pcjs-canvas");e.setAttribute("width",d.screenWidth);e.setAttribute("height",d.screenHeight);e.style.backgroundColor=d.screenColor;e.style.height="auto";0<=(window?window.navigator.userAgent:"").indexOf("MSIE")&&(c.onresize=
        function(a,b,c,d){return function(){b.style.height=(a.clientWidth*d/c|0)+"px"}}(c,e,d.screenWidth,d.screenHeight),c.onresize());c.appendChild(e);var m=window.document.createElement("textarea");ya("iOS")&&(m.setAttribute("autocapitalize","off"),m.setAttribute("autocorrect","off"));c.appendChild(m);var n=e.getContext("2d"),d=new Y(d,e,n,m,c);Wa(d,c)}});
        function Lj(a){this.en=a.adapter;switch(this.en){case 1:this.Sl=1016;this.gh=4;break;case 2:this.Sl=760;this.gh=3;break;default:ra("Unrecognized serial adapter #"+this.en);return}this.pe=null;Ia.call(this,"SerialPort",a,Lj);var b=a.binding,c;a=Mj;b&&(void 0===c&&(c="Panel"),(c=Ta(c,this.id))&&(b=c.qa[b])&&this.Lb(null,a,b))}Qa(Lj);var Mj="buffer";f=Lj.prototype;f.wm=function(a,b){return a==this.Vg?(this.Ae=b,this):null};
        f.Lb=function(a,b,c){var d=this;switch(b){case Mj:return this.qa[b]=this.pe=c,c.onkeydown=function(a){a=a||window.event;var b=a.keyCode;8===b&&(a.preventDefault&&a.preventDefault(),Nj(d,[b]))},c.onkeypress=function(a){a=a||window.event;Nj(d,[a.which||a.keyCode])},!0}return!1};f.Lc=function(a,b,c,d){this.la=b;this.U=c;this.Ra=d;this.fa=gb(a,"ChipSet");Tb(b,this,Oj,this.Sl);Vb(b,this,Pj,this.Sl);Za(this)};f.gc=function(a,b){if(!b)if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};
        f.fc=function(a){return a&&this.save?this.save():!0};f.reset=function(){this.ye()};f.save=function(){var a=new Zd(this),b=0,c=[];c[b++]=this.bk;c[b++]=this.Cm;c[b++]=this.zf;c[b++]=this.Nh;c[b++]=this.ke;c[b++]=this.Ye;c[b++]=this.td;c[b++]=this.Rc;c[b++]=this.zm;c[b]=this.Ag;a.set(0,c);return a.data()};f.restore=function(a){return this.ye(a[0])};
        f.ye=function(a){var b=0;void 0===a&&(a=[0,0,384,0,1,0,0,96,48,[]]);this.bk=a[b++];this.Cm=a[b++];this.zf=a[b++];this.Nh=a[b++];this.ke=a[b++];this.Ye=a[b++];this.td=a[b++];this.Rc=a[b++];this.zm=a[b++];this.Ag=a[b];return!0};function Nj(a,b){a.Ag=a.Ag.concat(b);Qj(a)}function Qj(a){0<a.Ag.length&&!(a.Rc&1)&&(a.bk=a.Ag.shift(),a.Rc|=1);var b=-1;a.Rc&1&&a.Nh&1&&(b=4);0<=b?(a.ke&=-8,a.ke|=b,a.fa&&a.gh&&Zh(a.fa,a.gh,100)):(a.ke|=1,a.fa&&a.gh&&$h(a.fa,a.gh))}
        f.vp=function(){var a=this.Ye&128?this.zf&255:this.bk;this.Rc&=-2;Qj(this);return a};f.gp=function(){return this.Ye&128?this.zf>>8:this.Nh};f.hp=function(){return this.ke};f.ip=function(){return this.Ye};f.kp=function(){return this.td};f.jp=function(){return this.Rc};f.pp=function(){return this.zm};
        f.Yq=function(a,b){if(this.Ye&128)this.zf=this.zf&-256|b;else{this.Cm=b;this.Rc&=-97;var c;this.pe?(13!=b&&(8==b?this.pe.value=this.pe.value.slice(0,-1):(this.pe.value+=String.fromCharCode(b),this.pe.scrollTop=this.pe.scrollHeight)),c=!0):c=!1;c&&(this.Rc|=96)}};f.Jq=function(a,b){this.Ye&128?this.zf=this.zf&255|b<<8:this.Nh=b};f.Kq=function(a,b){this.Ye=b};
        f.Lq=function(a,b){var c=this.td;this.td=b;if(this.Ae&&(c^b)&3){var c=this.Ae,d=this.td,e=3==(d&3);if(e){if(!c.vc){var m=!1;c.td&2||(c.reset(),c.oc("serial mouse reset"),m=!0);c.td&1||(c.oc("serial mouse ID requested"),m=!0);m&&(Nj(c.Kg,[77,77]),c.oc("serial mouse ID sent"));Rj(c);c.setActive(e)}}else c.vc&&(c.oc("serial mouse inactive"),Sj(c),c.setActive(e));c.td=d}};
        var Oj={0:Lj.prototype.vp,1:Lj.prototype.gp,2:Lj.prototype.hp,3:Lj.prototype.ip,4:Lj.prototype.kp,5:Lj.prototype.jp,6:Lj.prototype.pp},Pj={0:Lj.prototype.Yq,1:Lj.prototype.Jq,3:Lj.prototype.Kq,4:Lj.prototype.Lq};Ea(function(){for(var a=Xa(window.document,"pcjs","serial"),b=0;b<a.length;b++){var c=a[b],d=Ua(c),d=new Lj(d);Wa(d,c)}});function Tj(a){Ia.call(this,"Mouse",a,Tj);if(this.Bk=a.serial)this.$l="SerialPort";this.setActive(!1);this.Pg=this.ii=!1;this.ed=[];this.Ef=[];Za(this)}Qa(Tj);f=Tj.prototype;
        f.Lc=function(a,b,c,d){this.za=a;this.la=b;this.U=c;this.Ra=d;for(b=null;b=gb(a,"Video",b);)this.ed.push(b)};f.setActive=function(a){this.vc=a};
        f.gc=function(a,b){if(!b){if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;if(this.$l&&!this.Kg){for(var c=null;(c=gb(this.za,this.$l,c))&&(!c.wm||!(this.Kg=c.wm(this.Bk,this))););if(this.Kg)for(this.Ef=[],c=0;c<this.ed.length;c++){var d;d=this.ed[c];d.Ae=this;(d=d.Sa)&&this.Ef.push(d)}else ra(this.id+": "+this.$l+" "+this.Bk+" unavailable")}this.vc?Rj(this):Sj(this)}return!0};f.fc=function(a){return a&&this.save?this.save():!0};f.reset=function(){this.ye()};
        f.save=function(){var a=new Zd(this);a.set(0,this.dm());return a.data()};f.restore=function(a){return this.ye(a[0])};f.ye=function(a){var b=0;void 0===a&&(a=[!1,-1,-1,0,0,!1,!1,0]);this.setActive(a[b++]);this.ee=a[b++];this.fe=a[b++];this.Af=a[b++];this.Bf=a[b++];this.di=a[b++];this.ei=a[b++];this.td=a[b];return!0};f.dm=function(){var a=0,b=[];b[a++]=this.vc;b[a++]=this.ee;b[a++]=this.fe;b[a++]=this.Af;b[a++]=this.Bf;b[a++]=this.di;b[a++]=this.ei;b[a]=this.td;return b};f.lh=function(a){this.ii=a};
        function Rj(a){if(!a.Pg)for(var b=0;b<a.Ef.length;b++)Uj(a,a.Ef[b])&&(a.Pg=!0)}function Sj(a){if(a.Pg)for(var b=0;b<a.Ef.length;b++){var c=a.Ef[b];c&&(c.style.cursor="auto")}}function Uj(a,b){return b?(b.addEventListener("mousemove",function(b){a.kn(b)},!1),b.addEventListener("mousedown",function(b){a.ik(b.button,!0)},!1),b.addEventListener("mouseup",function(b){a.ik(b.button,!1)},!1),b.style.cursor="none",!0):!1}
        f.kn=function(a){if(this.vc&&this.U&&this.U.ha.Qb){if(0>this.ee||0>this.fe)this.ee=a.clientX,this.fe=a.clientY;this.ii?(this.Af=a.movementX||a.mozMovementX||a.webkitMovementX||0,this.Bf=a.movementY||a.mozMovementY||a.webkitMovementY||0):(this.Af=a.clientX-this.ee,this.Bf=a.clientY-this.fe);(this.Af||this.Bf)&&Vj(this);this.ee=a.clientX;this.fe=a.clientY}};
        f.ik=function(a,b){if(this.vc&&this.U&&this.U.ha.Qb){var c;!(c=!1!==this.ii)&&(c=this.ed.length)&&(c=this.ed[0],c=c.uo?c.mf(!0):!1);c||(this.ii=null);switch(a){case 0:this.di!=b&&(this.di=b,Vj(this));break;case 2:this.ei!=b&&(this.ei=b,Vj(this))}}};function Vj(a){Nj(a.Kg,[64|(a.di?32:0)|(a.ei?16:0)|(a.Bf&192)>>4|(a.Af&192)>>6,a.Af&63,a.Bf&63]);a.Af=a.Bf=0}Ea(function(){for(var a=Xa(window.document,"pcjs","mouse"),b=0;b<a.length;b++){var c=a[b],d=Ua(c),d=new Tj(d);Wa(d,c)}});
        function Wj(a,b,c){Ia.call(this,"Disk",{id:a.gn+".disk"+ ++Xj},Wj);this.W=a;this.za=a.za;this.Ra=a.Ra;this.Oa=b;this.Gd=b.name;this.Tf=b.Tf;this.ji=this.Ud=!1;this.create(c,b.rb,b.sb,b.yb,b.ib);this.Ue=[];this.Bh=[];this.ce=null;this.mn=0;this.yk=!1;Za(this)}var Xj=0;Qa(Wj);f=Wj.prototype;f.Lc=function(a,b,c,d){this.Ra=d};f.gc=function(a,b){b||!this.ji||this.Ud||(Za(this,!1),this.load(this.Gd,this.uf,null,this.ro,this));return!0};f.ro=function(){Za(this,!0)};
        f.fc=function(a,b){if(this.Ud){var c,d=0;if(this.yk&&!sa("Disk writes are still in progress, shut down anyway?"))return!1;for(;c=Yj(this,!1);)if(d=c[0]){this.W.wa('Unable to save "'+this.Gd+'" (error '+d+")");break}b&&this.Ud&&(c="action=close&volume="+this.uf,c+="&machine="+this.W.Vf(),c+="&user="+this.W.ve(),pa(qa()+"/api/v1/disk?"+c,!0),this.Ud=!1);!d&&a&&this.W.wa(this.Gd+" saved")}return!0};
        f.create=function(a,b,c,d,e){this.mode=a;this.rb=b;this.sb=c;this.yb=d;this.ib=e;this.Ua=[];if("preload"!=this.mode){a=Array(this.rb);for(b=0;b<a.length;b++){c=Array(this.sb);for(d=0;d<c.length;d++){e=Array(this.yb);for(var m=1;m<=e.length;m++)e[m-1]=Zj(null,b,d,m,this.ib,"local"==this.mode?0:null);c[d]=e}a[b]=c}this.Ua=a}this.Pf=null};
        f.load=function(a,b,c,d,e){var m=b;if(!this.lf)if(this.Gd=a,this.uf=b,this.lf=d,this.lo=e||this.W,c){var n=this,p=new FileReader;p.onload=function(){var a=p.result,b,c=a?a.byteLength:0,d=ba[c];if(d){n.rb=d[0];n.sb=d[1];n.yb=d[2];n.ib=512;b=n.ib>>2;var e=d=0,a=new DataView(a,0,c);n.Ua=Array(n.rb);for(c=0;c<n.Ua.length;c++)for(var m=n.Ua[c]=Array(n.sb),W=0;W<m.length;W++)for(var za=m[W]=Array(n.yb),ga=0;ga<za.length;ga++){for(var xa=Zj(null,c,W,ga+1,n.ib,0),Va=xa.data,Rb=0;Rb<b;Rb++,e+=4)var Lc=Va[Rb]=
        a.getInt32(e,!0),d=d+Lc&-1;xa.Ic=b;za[ga]=xa}n.Pf=d;b=n}else n.wa("Unrecognized diskette format ("+c+" bytes)");n.lf&&(n.lf.call(n.W,n.Oa,b,n.Gd,n.uf),n.lf=null)};p.readAsArrayBuffer(c)}else 0>b.indexOf("/api/v1/dump")&&(a=ha(b),"json"==a?m=encodeURI(b):"demandrw"==this.mode||"demandro"==this.mode?(m=ak(this,b),this.ji=!0):(c="path",d="&mbhd=10",!b.indexOf("http:")||!b.indexOf("ftp:")||0<="dsk ima img 360 720 12 144".split(" ").indexOf(a)?(c="disk",d="&mbhd=0"):-1!==b.indexOf("/",b.length-1)&&(c=
        "dir"),m=qa()+"/api/v1/dump?"+c+"="+encodeURIComponent(b)+(this.Tf?"":d)+"&format=json")),pa(m,!0,null,this,this.po,b)};
        f.po=function(a,b,c,d){var e=null;this.Uf=!1;var m=0>c&&this.za&&!this.za.ha.dc;if(this.ji)c?this.W.wa('Unable to connect to disk "'+d+'" (error '+c+": "+b+")",m):(this.Ud=!0,e=this);else if(c)this.W.wa('Unable to load disk "'+this.Gd+'" (error '+c+")",m);else try{if(0<fa(a,!0).toLowerCase().indexOf("-readonly"))this.Uf=!0;else{var n=b.indexOf("\n");0<n&&1024>n&&0<b.substring(0,n).indexOf("write-protected")&&(this.Uf=!0)}var p;p="<"==b.substr(0,1)?["Missing disk image: "+this.Gd]:0>b.indexOf("0x")&&
        '["'!=b.substr(0,2)?JSON.parse(b.replace(/([a-z]+):/gm,'"$1":').replace(/\/\/[^\n]*/gm,"")):eval("("+b+")");if(p.length)if(1==p.length)ra(p[0]);else{this.rb=p.length;this.sb=p[0].length;this.yb=p[0][0].length;var v=p[0][0][0];this.ib=v&&v.length||512;for(b=a=0;b<this.rb;b++)for(c=0;c<this.sb;c++)for(d=0;d<this.yb;d++)if(v=p[b][c][d]){var w=v.length;void 0===w&&(w=v.length=512);var w=w>>2,G=v.pattern;void 0===G&&(G=v.pattern=0);var N=v.data;if(void 0===N){var L=v.bytes;if(void 0!==L&&L.length){for(var m=
        w<<2,U=L.length;U<m;U++)L[U]=G;this.fill(v,L,0)}else N=[],G=v.pattern=G|G<<8|G<<16|G<<24,v.data=N;delete v.bytes}Zj(v,b,c);for(m=0;m<N.length;m++)a=a+N[m]&-1}this.Ua=p;this.Pf=a;e=this}else ra("Empty disk image: "+this.Gd)}catch(W){ra("Disk image error: "+W.message)}this.lf&&(this.lf.call(this.lo,this.Oa,e,this.Gd,this.uf),this.lf=null)};function Zj(a,b,c,d,e,m){a||(a={sector:d,length:e,data:[],pattern:m});a.Eo=b;a.Go=c;a.hd=a.Ic=0;a.Ka=!1;return a}
        function ak(a,b){var c;c="action=open&volume="+b+("&mode="+a.mode);c+="&chs="+a.rb+":"+a.sb+":"+a.yb+":"+a.ib;c+="&machine="+a.W.Vf();c+="&user="+a.W.ve();return qa()+"/api/v1/disk?"+c}function bk(a,b,c,d,e,m,n){if(a.Ud){var p;p="action=read&volume="+a.uf;p+="&chs="+a.rb+":"+a.sb+":"+a.yb+":"+a.ib;p=p+("&addr="+b+":"+c+":"+d+":"+e)+("&machine="+a.W.Vf());p+="&user="+a.W.ve();pa(qa()+"/api/v1/disk?"+p,m,null,a,a.so,[b,c,d,e,m,n])}else n&&n(-1,!1)}
        f.so=function(a,b,c,d){var e=!1;a=d[0];var m=d[1],n=d[2],p=d[3];if(!c){b=JSON.parse(b);for(e=0;p--;){var v=this.seek(a,m,n,!0);if(!v)break;this.fill(v,b,e);e+=v.length;n++}e=d[4]}(d=d[5])&&d(c,e)};f.to=function(a,b,c,d){a=d[0];b=d[1];var e=d[2],m=d[3];d=d[4];this.yk=!1;if(0<=a&&a<this.Ua.length&&0<=b&&b<this.Ua[a].length)for(--e;0<m--&&0<=e&&e<this.Ua[a][b].length;e++){var n=this.Ua[a][b][e];c?ck(this,n,!1):n.Ka||(n.hd=n.Ic=0)}d&&dk(this)};
        function ck(a,b,c){b.Ka=!0;var d=a.Ue.indexOf(b);0<=d&&(a.Ue.splice(d,1),a.Bh.splice(d,1));a.Ue.push(b);a.Bh.push(ka());c&&dk(a)}function dk(a){if(a.Ue.length){var b=a.Bh[0]+2E3;a.ce&&a.mn<b&&(clearTimeout(a.ce),a.ce=null);if(!a.ce){var c=ka(),b=b-c;0>b&&(b=0);2E3<b&&(b=2E3);a.ce=setTimeout(function(){Yj(a,!0)},b);a.mn=c+b}}else a.ce&&(clearTimeout(a.ce),a.ce=null)}
        function Yj(a,b){b&&(a.ce=null);var c=a.Ue[0];if(c){for(var d=c.Eo,e=c.Go,c=c.sector,m=0,n=[],p=c-1;p<a.Ua[d][e].length;p++){var v=a.Ua[d][e][p];if(!v.Ka)break;var w=a.Ue.indexOf(v);a.Ue.splice(w,1);a.Bh.splice(w,1);n=n.concat(ek(v));v.Ka=!1;m++}a.Ud?(p={},a.yk=!0,p.action="write",p.volume=a.uf,p.chs=a.rb+":"+a.sb+":"+a.yb+":"+a.ib,p.addr=d+":"+e+":"+c+":"+m,p.machine=a.W.Vf(),p.user=a.W.ve(),p.data=JSON.stringify(n),d=pa(qa()+"/api/v1/disk",b,p,a,a.to,[d,e,c,m,b])):d=!1;return b||d}return!1}
        f.info=function(){return this.Ua.length?[this.Ua.length,this.Ua[0].length,this.Ua[0][0].length,this.Ua[0][0][0].length]:[0,0,0,0]};
        f.seek=function(a,b,c,d,e){var m=null,n=this.Oa,p=this.Ua[a];if(p){var v=p[b];if(!v&&n.Zj&&b<n.sb)for(v=p[b]=Array(n.le),p=0;p<v.length;p++)v[p]=Zj(null,a,b,p+1,n.pb,0);if(v){for(p=0;p<v.length;p++)if(v[p]&&v[p].sector==c){m=v[p];if(null===m.pattern)if(d)m.pattern=0;else{for(d=1;++p<v.length;)null===v[p].pattern&&d++;bk(this,a,b,c,d,null!=e,function(a,b){a&&(m=null);e&&e(m,b)});return e?null:m}break}!m&&n.Zj&&9==n.bb&&(m=v[p]=Zj(null,a,b,n.bb,n.pb,0))}}e&&e(m,!1);return m};
        f.fill=function(a,b,c){for(var d=a.length>>2,e=Array(d),m=0;m<d;m++)e[m]=b[c]|b[c+1]<<8|b[c+2]<<16|b[c+3]<<24,c+=4;a.data=e};function ek(a){var b=a.length,c=Array(b),d=0,b=b>>2,e=a.data;a=a.pattern;for(var m=0;m<b;m++){var n=m<e.length?e[m]:a;c[d++]=n&255;c[d++]=n>>8&255;c[d++]=n>>16&255;c[d++]=n>>24&255}return c}function fk(a,b){var c=-1;if(a&&b<a.length)var c=a.data,d=b>>2,c=(d<c.length?c[d]:a.pattern)>>((b&3)<<3)&255;return c}
        f.write=function(a,b,c){if(this.Uf)return!1;if(b<a.length){if(c!=fk(a,b)){var d=a.data,e=a.pattern,m=b>>2;b=(b&3)<<3;for(var n=d.length;n<=m;n++)d[n]=e;a.Ic?m<a.hd?(a.Ic+=a.hd-m,a.hd=m):m>=a.hd+a.Ic&&(a.Ic+=m-(a.hd+a.Ic)+1):(a.hd=m,a.Ic=1);d[m]=d[m]&~(255<<b)|c<<b;this.Ud&&ck(this,a,!0)}return!0}return null};
        f.save=function(){var a=0,b=[];b[a++]=[this.uf,this.Pf,this.rb,this.sb,this.yb,this.ib];if(!this.Ud&&!this.Uf)for(var c=this.Ua,d=0;d<c.length;d++)for(var e=0;e<c[d].length;e++)for(var m=0;m<c[d][e].length;m++){var n=c[d][e][m];if(n&&n.Ic){for(var p=[],v=0,w=n.hd,G=n.hd+n.Ic;w<G;)p[v++]=n.data[w++];b[a++]=[d,e,m,n.hd,p]}}return b};
        f.restore=function(a){var b=0,c="unsupported restore format";if(a&&0<a.length){var d=0,e=a[d++];e&&2<=e.length&&(!this.Ua.length&&6<=e.length?this.create("local",e[2],e[3],e[4],e[5]):null!=e[1]&&null!=this.Pf&&e[1]!=this.Pf&&(c="original checksum ("+e[1]+") differs from current checksum ("+this.Pf+")",b=-2));for(this.Ua.length||(b=-1);d<a.length&&0<=b;){var m=0,n=a[d++],p=n[m++],v=n[m++],w=n[m++];if(p>=this.Ua.length||v>=this.Ua[p].length||w>=this.Ua[p][v].length){c="sector (CHS="+p+":"+v+":"+w+") out of range ("+
        b+" changes applied)";b=-1;break}if(this.Uf){c="unable to modify write-protected disk";b=-1;break}e=n[m++];m=n[m++];n=e+m.length;if(p=this.Ua[p][v][w]){for(v=p.data.length;v<e;)p.data[v++]=p.pattern;v=0;p.hd=e;for(p.Ic=m.length;e<n;)p.data[e++]=m[v++];b++}}}0>b&&-2!=b&&this.W.wa("Unable to restore disk '"+this.Gd+": "+c);return b};
        f.toJSON=function(){var a=JSON.stringify(this.Ua),a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,""),a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:"),a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");return a=a.replace(/(sector|length|data|pattern):/gm,'"$1":')};
        function gk(a){Ia.call(this,"FDC",a,gk);this.dmaRead=this.nk;this.dmaWrite=this.ok;this.dmaFormat=this.mo;this.bf=null;if(a.autoMount&&(this.bf=a.autoMount,"string"==typeof this.bf))try{this.bf=eval("("+a.autoMount+")")}catch(b){ra("FDC auto-mount error: "+b.message+" ("+a.autoMount+")"),this.bf=null}this.Ec=[];this.Tm=!ya("Mobi")&&window&&"FileReader"in window}Qa(gk);g={};aa={};
        var hk={3:{Qd:3,oe:0,name:aa.Bs},4:{Qd:2,oe:1,name:aa.zs},5:{Qd:9,oe:7,name:aa.Ns},6:{Qd:9,oe:7,name:aa.ts},7:{Qd:2,oe:0,name:aa.vs},8:{Qd:1,oe:2,name:aa.As},10:{Qd:2,oe:7,name:aa.us},13:{Qd:6,oe:7,name:aa.es},15:{Qd:3,oe:0,name:aa.ys}};f=gk.prototype;
        f.Lb=function(a,b,c){var d=this;switch(b){case "listDisks":return this.qa[b]=c,c.onchange=function(){var a=d.qa.descDisk,b=c.options[c.selectedIndex];if(a&&b){var n={};if(b=b.getAttribute("data-value"))try{n=eval("({"+b+"})")}catch(p){ra("FDC option error: "+p.message)}b=n.desc;void 0===b&&(b="");n=n.href;void 0!==n&&(b='<a href="'+n+'" target="_blank">'+b+"</a>");a.innerHTML=b}},!0;case "descDisk":case "listDrives":return this.qa[b]=c,c.onchange=function(){var a=ca(c.value,10);null!=a&&ik(d,a)},
        !0;case "loadDrive":return this.qa[b]=c,c.onclick=function(){var a=d.qa.listDisks;a&&jk(d,a.options[a.selectedIndex].text,a.value)},!0;case "mountDrive":return this.Tm?(this.qa[b]=c,c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length}),c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;jk(d,fa(b,!0),b,a)}return!1}):c.parentNode.removeChild(c),!0}return!1};
        f.Lc=function(a,b,c,d){this.la=b;this.U=c;this.Ra=d;this.za=a;this.fa=gb(a,"ChipSet");this.Vd();Tb(b,this,kk);Vb(b,this,lk);this.Tm&&mk(this,"Local Disk","?");mk(this,"Remote Disk","??");this.Eg()||Za(this)};
        f.gc=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.za.vk){this.Ec=[];for(var c=0;c<this.ya.length;c++)nk(this,c,!0);this.Eg(!0)}}else if(!this.restore(a))return!1;if(c=this.qa.listDrives){for(;c.firstChild;)c.removeChild(c.firstChild);c.textContent="";for(var d=0;d<this.Lk;d++){var e=window.document.createElement("option");e.value=d;e.textContent=String.fromCharCode(65+d)+":";c.appendChild(e)}0<this.Lk&&(c.value="0",ik(this,0))}}return!0};
        f.fc=function(a){return a&&this.save?this.save():!0};f.reset=function(){this.Vd()};f.save=function(){var a=new Zd(this);a.set(0,this.am());return a.data()};f.restore=function(a){return this.Vd(a[0])};
        f.Vd=function(a){var b=0,c,d=!0;void 0===a&&(a=[0,0,128,Array(9),0,0,0,[]]);this.cb=a[b++];b++;this.ta=a[b++];this.ic=a[b++];this.Db=a[b++];this.jb=a[b++];this.kg=a[b++];var e=a[b++];c=a[b++];null!=c&&(this.Ec=c);void 0===this.ya&&(this.Lk=4,this.fa&&(this.Lk=Gh(this.fa)),this.ya=Array(4));for(c=0;c<this.ya.length;c++){var m=this.ya[c];if(void 0===m){var m=this.ya[c]={},n;if(this.fa)a:{n=this.fa;if(c<Gh(n)){if(!n.ge){n=360;break a}if(c<n.ge.length){n=n.ge[c];break a}}n=0}else n=0;switch(n){case 160:case 180:m.sb=
        1;default:m.rb=40;m.yb=9;break;case 720:m.rb=80;m.yb=9;break;case 1200:m.rb=80;m.yb=15;break;case 1440:m.rb=80,m.yb=18}}this.Ck(m,c,e[c])||(d=!1)}this.Le=a[b++]||0;this.En=a[b]||0;return d};f.am=function(){var a=0,b=[];b[a++]=this.cb;b[a++]=0;b[a++]=this.ta;b[a++]=this.ic;b[a++]=this.Db;b[a++]=this.jb;b[a++]=this.kg;b[a++]=this.cm();for(var c=a++,d=0;d<this.ya.length;d++){var e=this.ya[d];e.ua&&ok(this,e.vf,e.ua)}b[c]=this.Ec;b[a++]=this.Le;b[a]=this.En;return b};
        f.Ck=function(a,b,c){var d=0,e=!0;a.cb=b;a.Wc=a.Rf=!1;void 0===c&&(c=[192,!0,0,2,0]);"boolean"==typeof c[1]&&(c[1]=["Floppy Drive",a.rb||40,a.sb||c[3],a.yb||9,a.ib||512,c[1],a.yi,a.eh,a.fh]);a.Za=c[d++];var m=c[d++];a.name=m[0];a.rb=m[1];a.sb=m[2];a.yb=m[3];a.ib=m[4];a.Tf=m[5];(a.yi=m[6])?(a.eh=m[7],a.fh=m[8]):(a.yi=a.rb,a.eh=a.sb,a.fh=a.yb);a.Na=c[d++];a.je=c[d++];a.wb=c[d++];a.je=100<=a.je?a.je-100:a.je-a.wb;a.bb=c[d++];a.le=c[d++];a.pb=c[d++];a.Pa=c[d++];a.Ma=null;a.ua||(a.vf="");var n=c[d++];
        102==n&&(n=!1);"boolean"==typeof n?(m=c[d++],c=c[d],n?(d=this.ya[b],nk(this,b,!0,!0),d.Rf=!0,b=new Wj(this,d,"preload"),this.Mm(d,b,m,c,!0)):pk(this,b,m,c,!0)?a.ua&&c&&qk(this,m,c,a.ua):Za(this,!1)):void 0!==n&&a.ua&&0>a.ua.restore(n)&&(e=!1);e&&a.ua&&void 0!==a.Pa&&(a.Ma=a.ua.seek(a.wb,a.Na,a.bb));return e};f.cm=function(){for(var a=0,b=[],c=0;c<this.ya.length;c++)b[a++]=this.bm(this.ya[c]);return b};
        f.bm=function(a){var b=0,c=[];c[b++]=a.Za;c[b++]=[a.name,a.rb,a.sb,a.yb,a.ib,a.Tf,a.yi,a.eh,a.fh];c[b++]=a.Na;c[b++]=a.je+100;c[b++]=a.wb;c[b++]=a.bb;c[b++]=a.le;c[b++]=a.pb;c[b++]=a.Pa;c[b++]=a.Rf;c[b++]=a.Ln;c[b]=a.vf;return c};f.Eg=function(a){a||(this.Ze=0);if(this.bf)for(var b in this.bf){var c=this.bf[b];if(c.name&&c.path){var d=b.charCodeAt(0)-65;if(0<=d&&d<this.ya.length){!pk(this,d,c.name,c.path,!0)&&a&&Za(this,!1);continue}}this.wa("Unrecognized auto-mount specification for drive "+b)}return!!this.Ze};
        function jk(a,b,c,d){var e,m=a.qa.listDrives;if(m&&!isNaN(e=ca(m.value,10))&&0<=e&&e<a.ya.length)if(c)if("?"==c)a.wa('Use "Choose File" and "Mount" to select and load a local disk.');else{if("??"==c){c=window.prompt("Enter the URL of a remote disk image.","")||"";if(!c)return;b=fa(c);a.pc("Attempting to load "+c+' as "'+b+'"')}for(a.pc("loading disk "+c+"...");pk(a,e,b,c,!1,d)&&window.confirm("Click OK to reload the original disk.\n(WARNING: All disk changes will be discarded)");){for(var m=a,n=c,
        p=void 0,p=0;p<m.Ec.length;p++)if(m.Ec[p][1]==n){m.Ec.splice(p,1);break}nk(a,e,!1,!0)}}else nk(a,e);else a.wa("Nothing to load")}function pk(a,b,c,d,e,m){var n=a.ya[b];if(d&&n.vf!=d){nk(a,b,e,!0);if(n.Wc)return a.wa("Drive "+b+" busy"),!0;n.Wc=!0;e&&(n.hf=!0,a.Ze++);n.Rf=!!m;(new Wj(a,n,"preload")).load(c,d,m,a.Mm);return!1}return!0}
        f.Mm=function(a,b,c,d,e){var m;a.Wc=!1;b&&(m=b.info(),b&&m[0]>a.rb||m[1]>a.sb)&&(this.wa('Diskette "'+c+'" too large for drive '+String.fromCharCode(65+a.cb)),b=null);b?(a.ua=b,a.Ln=c,a.vf=d,qk(this,c,d,b),m=b.info(),this.Le|=128,this.wa('Mounted diskette "'+c+'" in drive '+String.fromCharCode(65+a.cb),a.hf||e),a.yi=m[0],a.eh=m[1],a.fh=m[2]):a.Rf=!1;a.hf&&(a.hf=!1,--this.Ze||Za(this));ik(this,a.cb)};
        function mk(a,b,c){if(a=a.qa.listDisks){for(var d=0;d<a.options.length;d++)if(a.options[d].value==c)return;d=window.document.createElement("option");d.value=c;d.textContent=b;a.appendChild(d)}}function ik(a,b){if(0<=b&&b<a.ya.length){var c=a.ya[b],d=a.qa.listDisks,e=a.qa.listDrives;if(d&&e&&(e=ca(e.value,10),c=c.Rf?"?":c.vf,!isNaN(e)&&e==b)){for(e=0;e<d.options.length;e++)if(d.options[e].value==c){d.selectedIndex!=e&&(d.selectedIndex=e);break}e==d.options.length&&(d.selectedIndex=0)}}}
        function nk(a,b,c,d){var e=a.ya[b];e.ua&&(ok(a,e.vf,e.ua),e.Ln="",e.vf="",e.ua=null,e.Rf=!1,a.Le|=128,d||a.wa("Drive "+String.fromCharCode(65+b)+" unloaded",c),c||d||ik(a,b))}function qk(a,b,c,d){var e;for(e=0;e<a.Ec.length;e++)if(a.Ec[e][1]==c){d.restore(a.Ec[e][2]);return}a.Ec[e]=[b,c,[]]}function ok(a,b,c){var d;for(d=0;d<a.Ec.length;d++)if(a.Ec[d][1]==b){a.Ec[d][2]=c.save();break}}f.Eq=function(a,b){b&4?this.kg&4||this.kg&8&&this.fa&&Zh(this.fa,6):this.Vd();this.kg=b};f.dp=function(){return this.ta};
        f.bp=function(){var a=0;this.Db<this.jb&&(a=this.ic[this.Db]);this.kg&8&&this.fa&&$h(this.fa,6);++this.Db>=this.jb&&(this.ta&=-81,this.Db=this.jb=0);return a};
        f.Dq=function(a,b){this.jb<this.ic.length&&(this.ic[this.jb++]=b);var c=this.ic[0]&31;if(void 0!==hk[c]&&this.jb>=hk[c].Qd){var d=!1;this.Db=0;var c=this.La(),e,m,n,p,v,w=c&31;switch(w){case 3:this.La(g.Cs);this.La(g.hs);this.Yb();break;case 4:m=this.La(g.sg);this.cb=m&3;e=this.ya[this.cb];this.Yb();this.hc((e.Za&-16777216)>>>24,g.Fs);break;case 5:case 6:m=this.La(g.sg);d=m>>2&1;this.cb=m&3;e=this.ya[this.cb];e.Na=d;m=e.wb=this.La(g.jm);n=this.La(g.km);p=e.bb=this.La(g.mm);v=this.La(g.Qj);e.pb=128<<
        v;e.le=this.La(g.cs);this.La(g.Yn);this.La(g.as);6==w?(w=e,w.Za=72,w.ua&&(w.Ma=null,w.Za=0,this.fa&&(Th(this.fa,2,this,"dmaRead",w),Ph(this.fa,2)))):(w=e,w.Za=72,w.ua&&(w.ua.Uf?w.Za=576:(w.Ma=null,w.Za=0,this.fa&&(Th(this.fa,2,this,"dmaWrite",w),Ph(this.fa,2)))));rk(this,e,c,d,m,n,p,v);d=!0;break;case 7:m=this.La(g.sg);this.cb=m&3;e=this.ya[this.cb];e.wb=e.je=0;e.Za=268435488;this.Yb();d=!0;break;case 8:e=this.ya[this.cb];e.Na=0;this.Yb();this.hc(e.cb|e.Na<<2|e.Za&255,g.$n);this.hc(e.wb,g.rs);this.cb=
        this.cb+1&3;break;case 10:m=this.La(g.sg);d=m>>2&1;this.cb=m&3;e=this.ya[this.cb];m=e.wb;n=e.Na=d;p=e.bb=1;v=0;e.Za=0;e.ua&&(e.Ma=e.ua.seek(e.wb,e.Na,e.bb))?v=e.Ma.length:e.Za=72;rk(this,e,c,d,m,n,p,v);d=!0;break;case 13:m=this.La(g.sg);d=m>>2&1;this.cb=m&3;e=this.ya[this.cb];m=e.wb;n=e.Na=d;p=1;v=this.La(g.Qj);e.pb=128<<v;e.le=this.La(g.xs);this.La(g.Yn);e.ym=this.La(g.Xn);w=e;w.Za=72;w.ua&&(w.Ma=null,w.Za=0,this.fa&&(w.Mf=0,w.Pc=Array(4),w.Zj=!0,w.Vh=0,Th(this.fa,2,this,"dmaFormat",w),Ph(this.fa,
        2),w.Zj=!1));rk(this,e,c,d,m,n,p,v);d=!0;break;case 15:m=this.La(g.sg),this.cb=m&3,e=this.ya[this.cb],e.Na=m>>2&1,m=this.La(g.os),e.wb+=m-e.je,0>e.wb&&(e.wb=0),e.wb>=e.rb&&(e.wb=e.rb-1),e.je=m,e.Za=32,e.wb||(e.Za|=268435456),this.Yb(),d=!0}0<this.jb&&(this.ta|=80);this.kg&8&&(!e||e.Za&8||!d||this.fa&&Zh(this.fa,6))}};f.cp=function(){var a=this.Le;this.Le&=-129;return a};f.Cq=function(a,b){this.En=b};
        function rk(a,b,c,d,e,m,n,p){a.Yb();a.hc(b.cb|b.Na<<2|b.Za&255,g.$n);a.hc((b.Za&65280)>>>8,g.Ds);a.hc((b.Za&16711680)>>>16,g.Es);var v=0;if(e!=b.wb||m!=b.Na)v=n=1;c&128&&(m^=v,d||(v=0));a.hc(e+v,g.jm);a.hc(m,g.km);a.hc(n,g.mm);a.hc(p,g.Qj)}f.La=function(){var a=this.ic[this.Db];this.Db++;return a};f.Yb=function(){this.Db=this.jb=0};f.hc=function(a){this.ic[this.jb++]=a};f.nk=function(a,b,c){void 0===b||0>b?this.fg(a,c):c(-1,!1)};f.ok=function(a,b){return void 0!==b&&0<=b?this.rg(a,b):-1};
        f.mo=function(a,b){return void 0!==b&&0<=b?this.gm(a,b):-1};f.fg=function(a,b){var c=-1,d=null,e=0;if(!a.Za&&a.ua){do{if(a.Ma&&(e=a.Pa,0<=(c=fk(a.Ma,a.Pa++)))){d=a.Ma;break}a.Ma=a.ua.seek(a.wb,a.Na,a.bb);if(!a.Ma){a.Za=1088;break}a.Pa=0;this.Dg(a)}while(1)}b(c,!1,d,e)};f.rg=function(a,b){if(a.Za||!a.ua)return-1;do{if(a.Ma&&a.ua.write(a.Ma,a.Pa++,b))break;a.Ma=a.ua.seek(a.wb,a.Na,a.bb);if(!a.Ma){a.Za=8256;b=-1;break}a.Pa=0;this.Dg(a)}while(1);return b};
        f.Dg=function(a){a.bb++;a.bb>=a.fh+1&&(a.bb=1,a.Na++,a.Na>=a.eh&&(a.Na=0,a.wb++))};f.gm=function(a,b){if(a.Za)return-1;a.Pc[a.Mf++]=b;if(a.Mf==a.Pc.length){a.wb=a.Pc[0];a.Na=a.Pc[1];a.bb=a.Pc[2];a.pb=128<<a.Pc[3];for(var c=a.Mf=0;c<a.pb;c++)if(0>this.rg(a,a.ym))return-1;a.Vh++}a.Vh>=a.le&&(b=-1);return b};var kk={1012:gk.prototype.dp,1013:gk.prototype.bp,1015:gk.prototype.cp},lk={1010:gk.prototype.Eq,1013:gk.prototype.Dq,1015:gk.prototype.Cq};
        Ea(function(){for(var a=Xa(window.document,"pcjs","fdc"),b=0;b<a.length;b++){var c=a[b],d=Ua(c),d=new gk(d);Wa(d,c)}});function Z(a){Ia.call(this,"HDC",a,Z);this.dmaRead=this.nk;this.dmaWrite=this.ok;this.dmaWriteBuffer=this.no;this.dmaWriteFormat=this.oo;this.Tj=[];if(a.drives)try{this.Tj=eval("("+a.drives+")")}catch(b){ra("HDC drive configuration error: "+b.message+" ("+a.drives+")")}this.Ug=(this.gf="at"==a.type)?1:0;this.Fo=this.gf?2:3}Qa(Z);
        var sk=[{0:[306,2],1:[375,8],2:[306,6],3:[306,4]},{1:[306,4],2:[615,4],3:[615,6],4:[940,8],5:[940,6],6:[615,4],7:[462,8],8:[733,5],9:[900,15],10:[820,3],11:[855,5],12:[855,7],13:[306,8],14:[733,7]}];f=Z.prototype;f.Lb=function(){return!1};f.Lc=function(a,b,c,d){this.la=b;this.U=c;this.Ra=d;this.za=a;this.fa=gb(a,"ChipSet");Tb(b,this,this.gf?tk:uk);Vb(b,this,this.gf?vk:wk);Wd(c,19,this,this.Fp);Wd(c,64,this,this.Gp);this.reset();this.Eg()||Za(this)};
        f.gc=function(a,b){if(!b)if(!a||!this.restore)this.Vd(),this.za.vk&&this.Eg(!0);else if(!this.restore(a))return!1;return!0};f.fc=function(a){return a&&this.save?this.save():!0};f.Vf=function(){return this.za?this.za.Vf():""};f.ve=function(){return this.za?this.za.ve():""};f.reset=function(){this.Vd(null,!0)};f.save=function(){var a=new Zd(this);a.set(0,this.am());return a.data()};f.restore=function(a){return this.Vd(a[0])};
        f.Vd=function(a,b){var c=0,d=!0;if(this.gf)null==a&&(a=[0,0,0,0,0,0,0,0,64,0]),this.Ke=a[c++],this.Kn=a[c++],this.Me=a[c++],this.Fj=a[c++],this.Bj=a[c++],this.Aj=a[c++],this.hg=a[c++],this.ta=a[c++],this.Tl=a[c++],this.Dj=a[c++];else{null==a&&(a=[0,0,Array(14),0,0]);this.ph=a[c++];this.ta=a[c++];this.ic=a[c++];this.Db=a[c++];this.jb=a[c++];this.Jn=a[c++];this.In=a[c++];this.Hn=a[c++];var e=a[c++];void 0!==e?this.Xf=e:void 0===this.Xf&&(this.Xf=-1)}void 0===this.ya&&(this.ya=Array(this.Tj.length));
        c=a[c];void 0===c&&(c=[]);for(e=0;e<this.ya.length;e++){void 0===this.ya[e]&&(this.ya[e]={});var m=this.ya[e];this.Ck(e,m,this.Tj[e],c[e],b)||(d=!1);null!=this.ph&&1>=e&&(this.ph|=(m.type&3)<<(1-e<<1))}return d};
        f.am=function(){var a=0,b=[];this.gf?(b[a++]=this.Ke,b[a++]=this.Kn,b[a++]=this.Me,b[a++]=this.Fj,b[a++]=this.Bj,b[a++]=this.Aj,b[a++]=this.hg,b[a++]=this.ta,b[a++]=this.Tl,b[a++]=this.Dj):(b[a++]=this.ph,b[a++]=this.ta,b[a++]=this.ic,b[a++]=this.Db,b[a++]=this.jb,b[a++]=this.Jn,b[a++]=this.In,b[a++]=this.Hn,b[a++]=this.Xf);b[a]=this.cm();return b};
        f.Ck=function(a,b,c,d,e){var m=0,n=!0;void 0===d&&(d=[0,0,!1,Array(8)]);b.cb=a;b.errorCode=d[m++];b.Pn=d[m++];b.Tf=d[m++];b.Gf=d[m++];b.Hf=d[m++];b.Na=d[m++];b.sb=d[m++];b.Re=d[m++];b.bb=d[m++];b.le=d[m++];b.pb=d[m++];b.Sh=this.gf?0:1;b.name=c.name;void 0===b.name&&(b.name="Hard Drive");b.path=c.path;b.mode=c.mode||(b.path?"preload":"local");"demandro"!=b.mode&&"demandrw"!=b.mode||this.ve()||(b.mode="local");b.type=c.type;if(void 0===b.type||void 0===sk[this.Ug][b.type])b.type=this.Fo;c=sk[this.Ug][b.type];
        b.yb=c[2]||17;b.ib=c[3]||512;if(e&&this.fa&&(e=this.fa,c=b.type,e.ea)){var p=e.ea[18],p=a?p&240|c:p&15|c<<4;e.ea&&(e.ea[18]=p,uh(e))}void 0===b.ua&&(b.ua=null,this.wa("Type "+b.type+' "'+b.name+'" is fixed disk '+a,!0));xk(this,b);b.Pa=d[m++];b.Ma=null;b.ua&&(a=d[m],void 0!==a&&0>b.ua.restore(a)&&(n=!1),n&&void 0!==b.Pa&&(b.Ma=b.ua.seek(b.Re,b.Na,b.bb+b.Sh)));return n};f.cm=function(){for(var a=0,b=[],c=0;c<this.ya.length;c++)b[a++]=this.bm(this.ya[c]);return b};
        f.bm=function(a){var b=0,c=[];c[b++]=a.errorCode;c[b++]=a.Pn;c[b++]=a.Tf;c[b++]=a.Gf;c[b++]=a.Hf;c[b++]=a.Na;c[b++]=a.sb;c[b++]=a.Re;c[b++]=a.bb;c[b++]=a.le;c[b++]=a.pb;c[b++]=a.Pa;c[b]=a.ua?a.ua.save():null;return c};
        function xk(a,b,c){if(b){var d=0,e=0;null==c&&((d=b.Gf[2])?e=b.Gf[0]<<8|b.Gf[1]:c=b.type);null==c||d||(d=sk[a.Ug][c][1],e=sk[a.Ug][c][0]);d&&((c=sk[a.Ug][b.type])&&e!=c[0]&&d!=c[1]&&a.wa("Warning: drive parameters ("+e+","+d+") do not match drive type "+b.type+" ("+c[0]+","+c[1]+")"),b.rb=e,b.sb=d,null==b.ua&&(b.ua=new Wj(a,b,b.mode)))}}
        f.Eg=function(a){a||(this.Ze=0);for(var b=0;b<this.ya.length;b++){var c=this.ya[b];if(c.name&&c.path){if(!(a&&c.ua&&c.ua.ji)){var d;d=c.name;var c=c.path,e=this.ya[b];e.Wc?(this.wa("Drive "+b+" busy"),d=!0):(e.Wc=!0,e.hf=!0,this.Ze++,(e.ua||new Wj(this,e,e.mode)).load(d,c,null,this.qo),d=!1);!d&&a&&Za(this,!1)}}else a&&void 0!==c.type&&(c.ua=null,xk(this,c,c.type))}return!!this.Ze};
        f.qo=function(a,b,c){a.Wc=!1;(a.ua=b)&&this.wa('Mounted disk "'+c+'" in drive '+String.fromCharCode(67+a.cb),a.hf);a.hf&&(a.hf=!1,--this.Ze||Za(this))};f.Dp=function(){var a=0;this.Db<this.jb&&(a=this.ic[this.Db]);this.fa&&$h(this.fa,5);this.ta&=-33;++this.Db>=this.jb&&(this.Db=this.jb=0,this.ta&=-15);return a};f.$q=function(a,b){this.jb<this.ic.length&&(this.ic[this.jb++]=b);var c=12!=this.ic[0]?6:this.ic.length;6==this.jb&&(this.ta&=-2);this.jb>=c&&(this.ta|=2,this.ta&=-2,yk(this))};
        f.Ep=function(){var a=this.ta;this.Db<this.jb&&(this.ta|=1);return a};f.cr=function(a,b){this.Jn=b;this.fa&&$h(this.fa,5);this.Vd()};f.Cp=function(){return this.ph};f.br=function(a,b){this.In=b;this.ta=13};f.ar=function(a,b){this.Hn=b};f.Rl=function(){};
        f.Mo=function(){var a=-1;if(this.Oa){var b=this,a=this.fg(this.Oa,function(){});1!=this.Oa.Pa&&this.Oa.Pa==this.Oa.ib&&(this.Oa.pb-=this.Oa.ib,this.Me=this.Me-1&255,this.Oa.pb>=this.Oa.ib?(b.ta=136,this.fg(this.Oa,function(a){0<=a?(zk(b),b.ta=80):(b.ta=1,b.Ke=16)},!1)):this.ta=80)}return a};
        f.kq=function(a,b){this.Oa&&this.Oa.pb>=this.Oa.ib&&(0>this.rg(this.Oa,b)?(this.ta=1,this.Ke=16):1!=this.Oa.Pa&&this.Oa.Pa==this.Oa.ib&&(this.Oa.pb-=this.Oa.ib,this.Me=this.Me-1&255,zk(this),this.ta=80,this.Oa.pb>=this.Oa.ib&&(this.ta|=8)))};f.Oo=function(){return this.Ke};f.pq=function(a,b){this.Kn=b};f.Po=function(){return this.Me};f.nq=function(a,b){this.Me=b};f.Qo=function(){return this.Fj};f.oq=function(a,b){this.Fj=b};f.Lo=function(){return this.Bj};f.jq=function(a,b){this.Bj=b};f.Ko=function(){return this.Aj};
        f.iq=function(a,b){this.Aj=b};f.No=function(){return this.hg};f.lq=function(a,b){this.hg=b;this.ta=this.ya[this.hg&16?1:0]?this.ta|64:this.ta&-65};f.Ro=function(){return this.ta};f.hq=function(a,b){this.Tl=b;this.fa&&$h(this.fa,14);Ak(this)};f.mq=function(a,b){this.Dj&4&&!(b&4)&&(this.Ke=1);this.Dj=b};
        function Ak(a){var b=!1,c=a.Tl,d=a.hg&16?1:0,e=a.hg&15,m=a.Bj|(a.Aj&3)<<8,n=a.Fj,p=a.Me||256;a.Oa=null;a.Ke=0;a.ta=80;(d=a.ya[d])?(d.Re=m,d.Na=e,d.bb=n,d.pb=p*d.ib,c=144<=c?c:c&240,d.Ma=null,d.Pa=0,d.errorCode=0,a.Oa=d):c=-1;switch(c&240){case 32:a.ta=136;a.fg(d,function(b){0<=b&&a.fa?(zk(a),a.ta=80):(a.ta=1,a.Ke=16)},!1);break;case 48:a.ta=8;break;case 16:b=!0;break;case 64:b=!0;break;case 144:a.Ke=1;b=!0;break;case 145:d.sb=e+1,d.yb=p,b=!0}b&&zk(a)}
        function zk(a){!a.fa||a.Dj&2||Zh(a.fa,14,120)}
        function yk(a){a.Db=0;var b=a.La(),c=a.La(),d=c&32,e=d>>5,m=c&31,n=a.La(),p=a.La(),v=n<<2&768|p,w=n&63,G=a.La(),N=a.La(),L=a.ya[e];L&&(L.Re=v,L.Na=m,L.bb=w,L.pb=G*L.ib);switch(b){case 3:a.Yb(L?L.errorCode:4);a.hc(c);a.hc(n);a.hc(p);a.hc(0|d);b=-1;break;case 12:for(c=0;0<=(b=a.La());)L&&c<L.Gf.length&&(L.Gf[c++]=b);L&&xk(a,L);b=0;L||a.Xf!=e||(a.Xf=-1,b=2);a.Yb(b|d);b=-1;break;case 224:case 228:a.Yb(0|d),b=-1}if(0<=b)switch(void 0===L?b=-1:(L.errorCode=0,L.Pn=0),b){case 0:a.Yb(0|d);break;case 1:L.Us=
        N;a.Yb(0|d);break;case 5:a.Yb(0|d);break;case 8:Bk(a,L,function(b){a.Yb(b|d)});break;case 10:Ek(a,L,function(b){a.Yb(b|d)});break;case 15:Fk(a,L,function(b){a.Yb(b|d)});break;default:a.Yb(2|d)}}f.La=function(){var a=-1;this.Db<this.jb&&(a=this.ic[this.Db++]);return a};f.Yb=function(a){this.Db=this.jb=0;void 0!==a&&this.hc(a);this.fa&&Zh(this.fa,5);this.ta|=32};f.hc=function(a){this.ic[this.jb++]=a};f.nk=function(a,b,c){void 0===b||0>b?this.fg(a,c):c(-1,!1)};
        f.ok=function(a,b){return void 0!==b&&0<=b?this.rg(a,b):-1};f.no=function(a,b){var c;void 0!==b&&0<=b?(c=b,a.Pa<a.Hf.length?a.Hf[a.Pa++]=c:(a.errorCode=20,c=-1)):c=-1;return c};f.oo=function(a,b){return void 0!==b&&0<=b?this.gm(a,b):-1};function Bk(a,b,c){b.errorCode=4;if(b.ua&&(b.Ma=null,a.fa)){b.errorCode=0;Th(a.fa,3,a,"dmaRead",b);Ph(a.fa,3,function(a){a||0!=b.errorCode||(b.errorCode=4);c(b.errorCode?2:0)});return}c(b.errorCode?2:0)}
        function Ek(a,b,c){b.errorCode=4;if(b.ua&&(b.Ma=null,a.fa)){b.errorCode=0;Th(a.fa,3,a,"dmaWrite",b);Ph(a.fa,3,function(a){a||(0==b.errorCode&&(b.errorCode=4),20==b.errorCode&&(b.errorCode=0));c(b.errorCode?2:0)});return}c(b.errorCode?2:0)}function Fk(a,b,c){b.errorCode=4;b.Hf&&b.Hf.length==b.pb||(b.Hf=Array(b.pb));b.Pa=0;a.fa?(b.errorCode=0,Th(a.fa,3,a,"dmaWriteBuffer",b),Ph(a.fa,3,function(a){a||0!=b.errorCode||(b.errorCode=4);c(b.errorCode?2:0)})):c(b.errorCode?2:0)}
        f.fg=function(a,b,c){var d=-1,e=null,m=0;if(a.errorCode)return b&&b(d,!1,e,m),d;var n=!1!==c?1:0;if(a.Ma&&(m=a.Pa,d=fk(a.Ma,a.Pa),a.Pa+=n,0<=d))return e=a.Ma,b&&b(d,!1,e,m),d;if(b){var p=this;if(a.ua)return a.ua.seek(a.Re,a.Na,a.bb+a.Sh,!1,function(c,w){(a.Ma=c)?(e=c,m=a.Pa=0,p.Dg(a),d=fk(a.Ma,a.Pa),a.Pa+=n):a.errorCode=20;b(d,w,e,m)}),d;a.errorCode=20;b(d,!1,e,m)}return d};
        f.rg=function(a,b){if(a.errorCode)return-1;do{if(a.Ma&&a.ua.write(a.Ma,a.Pa++,b))break;a.ua&&a.ua.seek(a.Re,a.Na,a.bb+a.Sh,!0,function(b){a.Ma=b});if(!a.Ma){a.errorCode=20;b=-1;break}a.Pa=0;this.Dg(a)}while(1);return b};f.Dg=function(a){a.bb++;var b=1-a.Sh;a.bb>=a.yb+b&&(a.bb=b,a.Na++,a.Na>=a.sb&&(a.Na=0,a.Re++))};
        f.gm=function(a,b){if(a.errorCode)return-1;a.Pc[a.Mf++]=b;if(a.Mf==a.Pc.length){a.Re=a.Pc[0];a.Na=a.Pc[1];a.bb=a.Pc[2];a.pb=128<<a.Pc[3];for(var c=a.Mf=0;c<a.pb;c++)if(0>this.rg(a,a.ym))return-1;a.Vh++}a.Vh>=a.le&&(b=-1);return b};f.Fp=function(){var a=this.U.H&255;!(this.U.F>>8)&&128<a&&(this.Xf=a-128);return!0};f.Gp=function(){var a;(a=this.U.F>>8||!this.fa)||(a=!(this.fa.bc[0].sd&64));return a?!0:!1};
        var uk={800:Z.prototype.Dp,801:Z.prototype.Ep,802:Z.prototype.Cp},tk={496:Z.prototype.Mo,497:Z.prototype.Oo,498:Z.prototype.Po,499:Z.prototype.Qo,500:Z.prototype.Lo,501:Z.prototype.Ko,502:Z.prototype.No,503:Z.prototype.Ro},wk={800:Z.prototype.$q,801:Z.prototype.cr,802:Z.prototype.br,803:Z.prototype.ar,807:Z.prototype.Rl,811:Z.prototype.Rl,815:Z.prototype.Rl},vk={496:Z.prototype.kq,497:Z.prototype.pq,498:Z.prototype.nq,499:Z.prototype.oq,500:Z.prototype.jq,501:Z.prototype.iq,502:Z.prototype.lq,503:Z.prototype.hq,
        1014:Z.prototype.mq};Ea(function(){for(var a=Xa(window.document,"pcjs","hdc"),b=0;b<a.length;b++){var c=a[b],d=Ua(c),d=new Z(d);Wa(d,c)}});function Zd(a,b,c){this.id=a.id;this.key=Gk(a,b,c);this.Ra=a.Ra;Hk(this,a.dr)}function Gk(a,b,c){a=a.id;if(b){var d=b.indexOf(".");0<d&&(a+=".v"+b.substr(0,d))}c&&(a+="."+c);return a}
        Zd.prototype={constructor:Zd,set:function(a,b){try{this[this.id][a]=b}catch(c){}},get:function(a){return this[this.id][a]||null},value:function(){return this[this.id]},data:function(){return this[this.id]},load:function(a){return a?(this[this.id]=a,this.uk=!0):this.uk?!0:ua()&&(a=va(this.key))?(this[this.id]=a,this.uk=!0):!1},parse:function(){var a=!0;try{this[this.id]=JSON.parse(this[this.id])}catch(b){ra(b.message||b),a=!1}return a},toString:function(){var a=this[this.id];return"string"==typeof a?
        a:JSON.stringify(a)},clear:function(a){Hk(this);var b=[];try{for(var c=0,d=window.localStorage.length;c<d;c++)b.push(window.localStorage.key(c))}catch(e){}for(c=0;c<b.length;c++)if((d=b[c])&&(a||d.substr(0,this.key.length)==this.key)){try{window.localStorage.removeItem(d)}catch(m){}b.splice(c,1);c=0}},oc:function(){}};function Hk(a,b){a[a.id]={};b&&a.set("parms",b);a.uk=!1}
        function Ik(a){var b=!0;if(ua()){var c=JSON.stringify(a[a.id]);wa(a.key,c)||(ra("Unable to store "+c.length+" bytes in browser local storage"),b=!1)}return b}
        function Jk(a,b,c){Ia.call(this,"Computer",a,Jk);this.ha.dc=!1;this.Be=a.busWidth||a.buswidth;this.ad=Kk;this.wh=null;this.li=!1;this.url=b?b.url:null;this.Ar=(Math.random()+.1).toString(36).substr(2,12);this.bd=Lk(this);if(this.U=Ta("CPU",this.id)){this.Ra=Ta("Debugger",this.id);this.la=new Db({id:this.gn+".bus",buswidth:this.Be},this.U,this.Ra);var d,e=Ra(this.id);if((this.ae=Ta("Panel",this.id))&&this.ae.jk)for(b=0;b<e.length;b++)d=e[b],d.wa=this.ae.wa,d.pc=this.ae.pc,d.jk=this.ae.jk;for(b=0;b<
        e.length;b++)d=e[b],d.Lc&&d.Lc(this,this.la,this.U,this.Ra);b=null;d=a.resume;void 0!==d&&(1<d.length?b=this.Ij=d:this.ad=parseInt(d,10));var m;if(a=La&&La.state||(m=!0,a.state))b=this.Mn=a,m||(this.li=!0,this.ad=Kk),this.ad&&(this.Mj=new Zd(this,"1.18.3"),this.Mj.load()?b=null:delete this.Mj);!b&&this.ad&&(m=null,this.bd&&(m=qa()+"/api/v1/user?req=load&user="+this.bd+"&state="+Gk(this,"1.18.3")),b=m)&&(this.li=!0);b?pa(b,!0,null,this,this.cq):Za(this);c||Mk(this,this.vj)}else ra("Unable to find CPU component")}
        Qa(Jk);var Kk=0;f=Jk.prototype;f.Vf=function(){return this.Ar};f.ve=function(){return this.bd?this.bd:""};f.cq=function(a,b,c){c?(this.Ij=null,this.li=!1,this.wa("Unable to load machine state from server (error "+c+(b?": "+(String.prototype.trim?b.trim():b.replace(/^\s+|\s+$/g,"")):"")+")")):this.wh=b;Za(this)};function Mk(a,b,c){for(var d=Ra(a.id),e=0;e<=d.length;e++){var m=e<d.length?d[e]:a;if(!$a(m)){$a(m,function(){Mk(a,b,c)});return}}b.call(a,c)}
        function Nk(a,b){var c=new Zd(a,"1.18.3","validate");if(c.load()&&c.parse()){var d=c.get("timestamp"),e=b?b.get("timestamp"):"unknown";d!=e&&(a.wa("Machine state may be out-of-date\n("+d+" vs. "+e+")\nCheck your browser's local storage limits"),b||c.clear())}}
        f.vj=function(a){void 0===a&&(a=this.ad||(this.wh?1:Kk));var b=!1,c=!1;this.Vm=!1;var d=this.Mj||new Zd(this,"1.18.3");if(-1==a)b=!0;else if(a>Kk){if(d.load(this.wh)){this.xf=new Zd(this,"1.18.3","failsafe");this.xf.load()&&(Ok(this,d),a=2,Hk(this.xf));this.xf.set("timestamp",la());Ik(this.xf);var e=this.ad&&!this.li;if(1==a||sa("Click OK to restore the previous PCjs machine state, or CANCEL to reset the machine.")){if(c=d.parse()){var m=d.get("code"),n=d.get("data");m&&("ok"==m?d.load(n):("error"==
        m&&"no machine state"!=n?(this.wa("Error: "+n),"unable to verify user"==n&&(wa("user",""),this.bd=null)):this.pc(m+": "+n),Hk(d),d.load()?(c=d.parse(),e=!0):c=!1))}e&&Nk(this,c?d:null)}else 2==a&&d.clear()}else Nk(this);delete this.wh;delete this.Mj}e=Ra(this.id);for(m=0;m<e.length;m++)n=e[m],n!==this&&n!=this.U&&(c=Pk(this,n,d,b,c));b=[d,a,c];-1!=a?Mk(this,this.Nm,b):this.Nm(b)};
        function Pk(a,b,c,d,e){if(!b.ha.dc){b.ha.dc=!0;if(b.gc){var m=null;e&&((m=c.get(b.id))||(m=c.get(b.id.replace(/[a-z0-9]\./i,"."))));"string"===typeof m&&(m=null);!b.gc(m,d)&&m&&(ra("Unable to restore state for "+b.type),a.Mn&&!a.wh?(c.clear(),a.ad=Kk,window&&window.location.reload()):a.Vm=!0,b.gc(null),e=!1)}if(!d&&b.Km)for(a=b.Km.split("|"),c=0;c<a.length;c++)b.status(a[c])}return e}
        f.Nm=function(a){var b=a[0],c=0>a[1];a=a[2];this.ha.dc=!0;this.Sm||(this.pc("PCjs v1.18.3\nCopyright \u00a9 2012-2015 Jeff Parsons <Jeff@pcjs.org>\nLicense: GPL version 3 or later <http://gnu.org/licenses/gpl.html>"),this.Sm=!0);this.U&&(Pk(this,this.U,b,c,a),vc(this.U));this.Vm&&(Ok(this,b),b.clear());!c&&this.xf&&(this.xf.clear(),delete this.xf)};
        function Ok(a,b){if(sa("There may be a problem with your PCjs machine.\n\nTo help us diagnose it, click OK to send this PCjs machine state to http://www.pcjs.org.")){var c=a.ve(),d=b.toString(),e={app:"PCjs",ver:"1.18.3"};e.url=a.url;e.user=c;e.type="bug";e.data=d;pa("http://www.pcjs.org/api/v1/report",!0,e)}}
        function Qk(a,b,c){var d,e="none",m=new Zd(a,"1.18.3"),n=new Zd(a,"1.18.3","validate"),p=la();n.set("timestamp",p);m.set("timestamp",p);m.set("version","1.18.3");m.set("url",window?window.location.href:null);m.set("browser",window?window.navigator.userAgent:"");a.U&&a.U.fc&&(c&&xc(a.U),d=a.U.fc(b,c),"object"===typeof d&&m.set(a.U.id,d),c&&(a.U.ha.dc=!1,!1===d&&(e=null)));for(var p=Ra(a.id),v=0;v<p.length;v++){var w=p[v];w.ha.dc&&(w.fc&&(d=w.fc(b,c),"object"===typeof d&&m.set(w.id,d)),c&&(w.ha.dc=
        !1,!1===d&&(e=null)))}e&&(c?(p=d=!1,b?(a.bd&&Rk(a,a.bd,m.toString()),Ik(n)&&Ik(m)||(e=null,d=p=!0)):a.ad&&(d=!0,p=3==a.ad),d&&m.clear(p)):e=m.toString());c&&(a.ha.dc=!1);return e}f.reset=function(){this.la&&this.la.reset&&(this.oc("Resetting "+this.la.type),this.la.reset());for(var a=Ra(this.id),b=0;b<a.length;b++){var c=a[b];c!==this&&c!==this.la&&c.reset&&(this.oc("Resetting "+c.type),c.reset())}};
        f.start=function(a,b){for(var c=Ra(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.start&&e.start(a,b)}};f.stop=function(a,b){for(var c=Ra(this.id),d=0;d<c.length;d++){var e=c[d];"CPU"!=e.type&&e!==this&&e.stop&&e.stop(a,b)}};
        f.Lb=function(a,b,c){var d=this;switch(b){case "save":return this.qa[b]=c,c.onclick=function(){var a=Lk(d,!0);if(a){var b=!(!d.ad||d.Ij),c=Qk(d,b);b?Rk(d,a,c):d.wa("Resume disabled, machine state not saved")}},!0;case "reset":return this.qa[b]=c,c.onclick=function(){yc(d)},!0}return!1};
        function Lk(a,b){var c=a.bd;c||(c=va("user"),void 0!==c?!c&&b&&(c=null,window&&(c=window.prompt("To save machine states on the pcjs.org server, you need a user ID (email support@pcjs.org).\n\nOnce you have an ID, enter it below.","")),c&&((c=Sk(a,c))||a.wa("Your user ID has not been approved."))):b&&a.wa("Browser local storage is not available"));return c}
        function Sk(a,b){a.bd=null;var c=pa(qa()+"/api/v1/user?req=verify&user="+b),d=c[1];if(!c[0]&&d)try{c=eval("("+d+")"),c.code&&"ok"==c.code&&(wa("user",c.data),a.bd=c.data)}catch(e){ra(e.message+" ("+d+")")}return a.bd}
        function Rk(a,b,c){if(c){var d={req:"store"};d.user=b;d.state=Gk(a,"1.18.3");d.data=c;b=pa(qa()+"/api/v1/user",!1,d);d=b[1];if(b[0]){if(d){var e=d.indexOf("\n");0<e&&(d=d.substr(0,e));d.indexOf("Error: ")||(d=d.substr(7))}d='{"code":'+b[0]+',"data":"'+d+'"}'}b=JSON.parse(d);b&&"ok"==b.code?a.wa("Machine state saved to server"):c&&(c=b&&b.data||"unable to save machine state",c="error"==b.code?"Error: "+c:"Error "+b.code+": "+c,a.wa(c),wa("user",""),a.bd=null)}}
        function yc(a){if(a.ad&&!a.Ij){var b=sa("Click OK to save changes to this PCjs machine.\n\nWARNING: If you CANCEL, all disk changes will be discarded.");Qk(a,b,!0);!b&&a.Mn?window&&window.location.reload():(b||(a.vk=!0),a.vj(Kk),a.vk=!1)}else a.reset(),a.U&&vc(a.U)}function gb(a,b,c){a=Ra(a.id);for(var d=0;d<a.length;d++){var e=a[d];if(c)c==e&&(c=null);else if(e.type==b)return e}return null}
        Ea(function(){for(var a=Xa(window.document,"pcjs-machine"),b=0;b<a.length;b++)for(var c=a[b],d=Ua(c),c=Xa(c,"pcjs","computer"),e=0;e<c.length;e++){var m=c[e],n=Ua(m),n=new Jk(n,d,!0);Wa(n,m);Mk(n,n.vj)}});Aa.show.push(function(){for(var a=Xa(window.document,"pcjs","computer"),b=0;b<a.length;b++){var c=Ua(a[b]);(c=Ta("Computer",c.id))&&c.Sm&&!c.ha.dc&&c.vj(-1)}});
        Aa.exit.push(function(){for(var a=Xa(window.document,"pcjs","computer"),b=0;b<a.length;b++){var c=Ua(a[b]);(c=Ta("Computer",c.id))&&c.ha.dc&&Qk(c,!(!c.ad||c.Ij),!0)}});var Tk=0;function Uk(a,b,c,d,e,m){e("Loading "+a+"...");pa(a,!0,null,null,function(n,p,v){v?(p||(p="unable to load "+a+" ("+v+")"),m(p,null)):Vk(p,a,b,c,d,e,m)})}
        function Vk(a,b,c,d,e,m,n){function p(a,m){if(m)n(m,null);else{if(c){var p=b;p&&0>p.indexOf("/")&&(p=window.location.pathname+p);a=a.replace(/(<machine[^>]*\sid=)(['"]).*?\2/,"$1$2"+c+"$2"+(d?" state=$2"+d+"$2":"")+(p?" url=$2"+p+"$2":""))}p=null;if("<"==a.charAt(0))try{window.ActiveXObject||"ActiveXObject"in window?(e||(a=a.replace(/<!DOCTYPE(.|[\r\n])*]>\s*/g,"")),p=new window.ActiveXObject("Microsoft.XMLDOM"),p.async=!1,p.loadXML(a)):p=(new window.DOMParser).parseFromString(a,"text/xml")}catch(N){p=
        null,a=N.message}else a="unrecognized XML: "+(255<a.length?a.substr(0,255)+"...":a);n(a,p)}}a?e?Wk(a,m,p):p(a,null):n("no data"+(b?" for file: "+b:""),null)}
        function Wk(a,b,c){var d;if(d=/<([a-z]+)\s+ref="(.*?)"(.*?)\/>/g.exec(a)){var e=d[2];b("Loading "+e+"...");pa(e,!0,null,null,function(m,n,p){if(p||!n)c(a,"unable to resolve XML reference: "+d[0]+" ("+p+")");else{if(m=d[3])if(p=n.match(new RegExp("<"+d[1]+"[^>]*>"))){for(var v=p[0],w,G=/( [a-z]+=)(['"])(.*?)\2/g;w=G.exec(m);)v=0>v.indexOf(w[1])?v.replace(">",w[0]+">"):v.replace(new RegExp(w[1]+"(['\"])(.*?)\\1"),w[0]);p[0]!=v&&(n=n.replace(p[0],v))}else{c(a,"missing <"+d[1]+"> in "+e);return}n=n.replace(/<\?xml[^>]*>[\r\n]*/,
        "");a=a.replace(d[0],n);Wk(a,b,c)}})}else c(a,null)}
        function Xk(a,b,c,d){function e(a){if(void 0===p){var b=n&&Xa(n,"machine-warning");p=b&&b[0]||n}p&&(p.innerHTML=ja(a))}function m(a){e("Error: "+a);v&&(--Tk||Ga(!0));v=!1}var n,p,v=!0;Tk++;try{if(n=window.document.getElementById(a)){c||(c="/versions/pcjs/1.18.3/components.xsl");var w=function(d,p){if(p){var v=function(d,v){if(v)if(v)if(e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window){var w=p.transformNode(v);w?(n.outerHTML=w,--Tk||Ga(!0)):m("transformNodeToObject failed")}else window.document.implementation&&
        window.document.implementation.createDocument?(w=new XSLTProcessor,w.importStylesheet(v),(w=w.transformToFragment(p,window.document))?n.parentNode?(n.parentNode.replaceChild(w,n),--Tk||Ga(!0)):m("invalid machine element: "+a):m("transformToFragment failed")):m("unable to transform XML: unsupported browser");else m("failed to load XSL file: "+c);else m(d)};p?Uk(c,null,null,!1,e,v):m("failed to load XML file: "+b)}else m(d)};"<"!=b.charAt(0)?Uk(b,a,d,!0,e,w):Vk(b,null,a,d,!1,e,w)}else m("missing machine element: "+
        a)}catch(G){m(G.message)}return v}window.embedPC=function(a,b,c,d){Ga(!1);return Xk(a,b,c,d)};window.enableEvents=Ga;window.sendEvent=Ha;})();
        
    • boot
      • bootUI.js
        function bootUI(document, window, base) {
        
          base.elem(document.body, {
            background: 'black',
            color: 'green',
            border: 'none',
            overflow: 'hidden',
            fontFamily: 'Segoe UI Light, Segoe UI, Ubuntu Light, Ubuntu, Toronto, Helvetica, Roboto, Droid Sans, Sans Serif'
          });
        
          var progressContainer = base.elem('div', {
            position: 'absolute',
            left: 0, top: 0,
            padding: '3em',
            opacity: 0.3
          }, document.body);
        
          var header = base.elem('h2', {
            text: 'Mini portabled shell',
            color: 'white',
            fontWeight: '100',
            fontSize: '500%',
            marginBottom: 0, paddingBottom: 0,
            textShadow: '1px 1px 3px black'
          }, progressContainer);
        
          var smallTitle = base.elem('div', {
            fontStyle: 'italic',
            paddingLeft: '1em',
            textShadow: '1px 1px 3px black',
            text: 'Loading...',
            opacity: 0.8
          }, progressContainer);
        
          var bootBar = base.elem('div', {
            marginTop: '2em',
            background: 'gold', color: 'gold',
            height: '2px',
            width: '3%',
            fontSize: '10%',
            innerHTML: '&nbsp;'
          }, progressContainer);
        
          return {
            title: function(t, ratio) {
              setText(smallTitle,t);
              if (typeof console !== 'undefined' && typeof console.log === 'function')
                console.log(t);
              if (ratio) {
                bootBar.style.width = (ratio*100) + '%';
              }
            },
            loaded: function() {
              setText(smallTitle, 'Loaded.');
            }
          };
        }
    • embed.ts
      module pcjsEmbed {
      
        export function embed(global?: any) {
          if (!global)
            global = (function() {
              return this.parent;
            })();
      
          var drive = <persistence.Drive>global.require('drive');
          var embed_pcjs = drive.read('/pcjs/versions/pcjs/1.18.2/pc.js');
          var wrapped = embed_pcjs;
      
          var frame = createFrame(global.window);
          var embedPC = frame.evalFN(wrapped);
          startWith(frame.global, embedPC);
        }
      
      
        function startWith(window, embedPC) {
      
          // do rawgit instead
          var embedPCURL = 'https://api.github.com/repos/jeffpar/pcjs/contents';
      
          var machineXML = '/devices/pc/machine/5170/ega/1152kb/rev3/machine.xml';
      
          // //devices/pc/machine/5160/cga/640kb
          // devices/pc/machine/5150/mda/64kb/machine.xml
          //docs/pcjs/demos/sample3a.xml
          // /devices/pc/machine/5160/ega/640kb/win101/machine.xml
      
      
          window.addEventListener('load', function(load_event) {
      
            var root = document.getElementById('root');
            if (!root) {
              root = document.createElement('div');
              root.id = 'root';
              document.body.appendChild(root);
            }
            else {
              root.innerHTML = '';
            }
      
            var rootInner = document.createElement('div');
            rootInner.id = Math.random() + '-' + new Date().getTime();
            root.appendChild(rootInner);
      
          }
      
        function createFrame(document: Document) {
      
              var ifr = <HTMLIFrameElement>elem(
                'iframe',
                {
                  position: 'absolute',
                  left: 0, top: 0,
                  width: '100%', height: '100%',
                  border: 'none',
                  src: 'about:blank'
                },
                window.document.body);
      
              var ifrwin = ifr.contentWindow || (<any>ifr).window;
              var ifrdoc = ifrwin.document;
      
              if (ifrdoc.open) ifrdoc.open();
              ifrdoc.write(
                '<!' + 'doctype html' + '>' +
                '<' + 'html' + '>' +
                '<' + 'head' + '><' + 'style' + '>' +
                'body,html{margin:0;padding:0;border:none;height:100%;border:none;}' +
                '*,*:before,*:after{box-sizing:inherit;}' +
                'html{box-sizing:border-box;}' +
                '</' + 'style' + '>\n' +
      
                '<' + 'body' + '>' +
      
                '<' + 'script' + '>window.__eval_export_=function(code) { return eval(code); }</' + 'script' + '>' +
      
                // it's important to have body before any long scripts (especialy external),
                // so IFRAME is immediately ready
                '<' + 'body' + '>' +
      
                '</' + 'html' + '>');
              if (ifrdoc.close) ifrdoc.close();
      
              var ifrwin_eval = ifrwin.__eval_export_;
              try {
                delete (<any>ifrwin).__eval_export_;
              }
              catch (weirdIEFailure) {
                // no big deal if it fails
              }
      
              ifrdoc.body.innerHTML = '';
      
              if (window.onerror) {
                ifrwin.onerror = delegate_onerror;
              }
      
              return {
                document: ifrdoc,
                global: ifrwin,
                iframe: ifr,
                evalFN: ifrwin_eval
              };
      
              function delegate_onerror() {
                window.onerror.apply(window, arguments);
      ments);
          }
      
        }
      
      }
    • attached
      • indexedDB.ts
        module persistence {
        
          function getIndexedDB() {
            try {
              return typeof indexedDB === 'undefined' || typeof indexedDB.open !== 'function' ? null : indexedDB;
            }
            catch (error) {
              return null;
            }
          }
        
          export module attached.indexedDB {
        
            export var name = 'indexedDB';
        
            export function detect(uniqueKey: string, callback: (detached: Drive.Detached) => void): void {
              try {
                detectCore(uniqueKey, callback);
              }
              catch (error) {
                callback(null);
              }
            }
        
            function detectCore(uniqueKey: string, callback: (detached: Drive.Detached) => void): void {
        
              var indexedDBInstance = getIndexedDB();
              if (!indexedDBInstance) {
                callback(null);
                return;
              }
        
              var dbName = uniqueKey || 'portabled';
        
              var openRequest = indexedDBInstance.open(dbName, 1);
              openRequest.onerror = (errorEvent) => callback(null);
        
              openRequest.onupgradeneeded = createDBAndTables;
        
              openRequest.onsuccess = (event) => {
                var db: IDBDatabase = openRequest.result;
        
                try {
                  var transaction = db.transaction(['files', 'metadata']);
                  // files mentioned here, but not really used to detect
                  // broken multi-store transaction implementation in Safari
        
                  transaction.onerror = (errorEvent) => callback(null);
        
                  var metadataStore = transaction.objectStore('metadata');
                  var filesStore = transaction.objectStore('files');
                  var editedUTCRequest = metadataStore.get('editedUTC');
                }
                catch (getStoreError) {
                  callback(null);
                  return;
                }
        
                if (!editedUTCRequest) {
                  callback(null);
                  return;
                }
        
                editedUTCRequest.onerror = (errorEvent) => {
                  var detached = new IndexedDBDetached(db, null);
                  callback(detached);
                };
        
                editedUTCRequest.onsuccess = (event) => {
                  var result: MetadataData = editedUTCRequest.result;
                  var detached = new IndexedDBDetached(db, result && typeof result.value === 'number' ? result.value : null);
                  callback(detached);
                };
              }
        
        
              function createDBAndTables() {
                var db: IDBDatabase = openRequest.result;
                var filesStore = db.createObjectStore('files', { keyPath: 'path' });
                var metadataStore = db.createObjectStore('metadata', { keyPath: 'property' })
              }
            }
        
        
        
            class IndexedDBDetached implements Drive.Detached {
        
              constructor(
                private _db: IDBDatabase,
                public timestamp: number) {
              }
        
              applyTo(mainDrive: Drive, callback: Drive.Detached.CallbackWithShadow): void {
                var transaction = this._db.transaction(['files', 'metadata'], 'readwrite');
                var metadataStore = transaction.objectStore('metadata');
                var filesStore = transaction.objectStore('files');
        
                var countRequest = filesStore.count();
                countRequest.onerror = (errorEvent) => {
                  console.error('Could not count files store.');
                  callback(null);
                };
        
                countRequest.onsuccess = (event) => {
        
                  var storeCount: number = countRequest.result;
        
                  var cursorRequest = filesStore.openCursor();
                  cursorRequest.onerror = (errorEvent) => callback(null);
        
                  // to cleanup any files which content is the same on the main drive
                  var deleteList: string[] = [];
                  var anyLeft = false;
        
                  var processedCount = 0;
        
                  cursorRequest.onsuccess = (event) => {
                    var cursor: IDBCursor = cursorRequest.result;
        
                    if (!cursor) {
        
                      // cleaning up files whose content is duplicating the main drive
                      if (anyLeft) {
                        for (var i = 0; i < deleteList.length; i++) {
                          filesStore['delete'](deleteList[i]);
                        }
                      }
                      else {
                        filesStore.clear();
                        metadataStore.clear();
                      }
        
                      callback(new IndexedDBShadow(this._db, this.timestamp));
                      return;
                    }
        
                    if (callback.progress)
                      callback.progress(processedCount, storeCount);
                    processedCount++;
        
                    var result: FileData = (<any>cursor).value;
                    if (result && result.path) {
        
                      var existingContent = mainDrive.read(result.path);
                      if (existingContent === result.content) {
                        deleteList.push(result.path);
                      }
                      else {
                        mainDrive.timestamp = this.timestamp;
                        mainDrive.write(result.path, result.content);
                        anyLeft = true;
                      }
                    }
        
                    cursor['continue']();
                  }; // cursorRequest.onsuccess
        
                }; // countRequest.onsuccess
        
              }
        
              purge(callback: Drive.Detached.CallbackWithShadow): void {
                var transaction = this._db.transaction(['files', 'metadata'], 'readwrite');
        
                var filesStore = transaction.objectStore('files');
                filesStore.clear();
        
                var metadataStore = transaction.objectStore('metadata');
                metadataStore.clear();
        
                callback(new IndexedDBShadow(this._db, -1));
              }
        
            }
        
            class IndexedDBShadow implements Drive.Shadow {
        
              constructor(private _db: IDBDatabase, public timestamp: number) {
              }
        
              write(file: string, content: string) {
                var transaction = this._db.transaction(['files', 'metadata'], 'readwrite');
                var filesStore = transaction.objectStore('files');
                var metadataStore = transaction.objectStore('metadata');
        
                // no file deletion here: we need to keep account of deletions too!
                var fileData: FileData = {
                  path: file,
                  content: content,
                  state: null
                };
        
                var putFile = filesStore.put(fileData);
        
                var md: MetadataData = {
                  property: 'editedUTC',
                  value: Date.now()
                };
        
                metadataStore.put(md);
        
              }
            }
        
            interface FileData {
              path: string;
              content: string;
              state: string;
            }
        
            interface MetadataData {
              property: string;
              value: any;
            }
        
        
          }
        
        }
      • localStorage.ts
        module persistence {
        
          function getLocalStorage() {
            return typeof localStorage === 'undefined' || typeof localStorage.length !== 'number' ? null : localStorage;
          }
        
          // is it OK&
          export module attached.localStorage {
        
            export var name = 'localStorage';
        
            export function detect(uniqueKey: string, callback: (detached: Drive.Detached) => void): void {
              var localStorageInstance = getLocalStorage();
              if (!localStorageInstance) {
                callback(null);
                return;
              }
        
              var access = new LocalStorageAccess(localStorageInstance, uniqueKey);
              var dt = new LocalStorageDetached(access);
              callback(dt);
            }
        
            class LocalStorageAccess {
              private _cache: { [key: string]: string; } = {};
        
              constructor(private _localStorage: Storage, private _prefix: string) {
              }
        
              get (key: string): string {
                var k = this._expandKey(key);
                var r = this._localStorage.getItem(k);
                return r;
              }
            
            	set(key: string, value: string): void {
                var k = this._expandKey(key);
                return this._localStorage.setItem(k, value);
              }
        
              remove(key: string): void {
                var k = this._expandKey(key);
                return this._localStorage.removeItem(k);
              }
        
              keys(): string[] {
                var result: string[] = [];
                var len = this._localStorage.length;
                for (var i = 0; i < len; i++) {
                  var str = this._localStorage.key(i);
                  if (str.length > this._prefix.length && str.slice(0, this._prefix.length) === this._prefix)
                    result.push(str.slice(this._prefix.length));
                }
                return result;
              }
        
              private _expandKey(key: string): string {
                var k: string;
        
                if (!key) {
                  k = this._prefix;
                }
                else {
                  k = this._cache[key];
                  if (!k)
                    this._cache[key] = k = this._prefix + key;
                }
                
                return k;
              }
          	}
        
        
            class LocalStorageDetached implements Drive.Detached {
        
              timestamp: number = 0;
        
              constructor(private _access: LocalStorageAccess) {
                var timestampStr = this._access.get('*timestamp');
                if (timestampStr && timestampStr.charAt(0)>='0' && timestampStr.charAt(0)<='9') {
                  try {
                    this.timestamp = parseInt(timestampStr);
                  }
                  catch (parseError) {
                  }
                }
              }
        
              applyTo(mainDrive: Drive, callback: Drive.Detached.CallbackWithShadow): void {
                var keys = this._access.keys();
                for (var i = 0; i < keys.length; i++) {
                  var k = keys[i];
                  if (k.charAt(0)==='/') {
                    var value = this._access.get(k);
                    mainDrive.write(k, value);
                  }
                }
                
                var shadow = new LocalStorageShadow(this._access, mainDrive.timestamp);
                callback(shadow);
              }
        
              purge(callback: Drive.Detached.CallbackWithShadow): void {
                var keys = this._access.keys();
                for (var i = 0; i < keys.length; i++) {
                  var k = keys[i];
                  if (k.charAt(0)==='/') {
                    var value = this._access.remove(k);
                  }
                }
        
                var shadow = new LocalStorageShadow(this._access, this.timestamp);
                callback(shadow);
              }
        
            }
            
            class LocalStorageShadow implements Drive.Shadow {
        
              constructor(private _access: LocalStorageAccess, public timestamp: number) {
              }
        
              write(file: string, content: string) {
                this._access.set(file, content);
                this._access.set('*timestamp', <any>this.timestamp);
              }
        
            }
        
          }
          
        } 
      • webSQL.ts
        module persistence {
        
          function getOpenDatabase() {
            return typeof openDatabase !== 'function' ? null : openDatabase;
          }
        
          export module attached.webSQL {
        
            export var name = 'webSQL';
        
            export function detect(uniqueKey: string, callback: (detached: Drive.Detached) => void): void {
        
              var openDatabaseInstance = getOpenDatabase();
              if (!openDatabaseInstance) {
                callback(null);
                return;
              }
        
              var dbName = uniqueKey || 'portabled';
        
              var db = openDatabase(
                dbName, // name
                1, // version
                'Portabled virtual filesystem data', // displayName
                1024 * 1024); // size
              // upgradeCallback?
        
        
              db.readTransaction(
                transaction => {
                  transaction.executeSql(
                    'SELECT value from "*metadata" WHERE name=\'editedUTC\'',
                    [],
                    (transaction, result) => {
                      var editedValue: number = null;
                      if (result.rows && result.rows.length === 1) {
                        var editedValueStr = result.rows.item(0).value;
                        if (typeof editedValueStr === 'string') {
                          try {
                            editedValue = parseInt(editedValueStr);
                          }
                          catch (error) {
                            // unexpected value for the timestamp, continue as if no value found
                          }
                        }
                        else if (typeof editedValueStr === 'number') {
                          editedValue = editedValueStr;
                        }
                      }
        
                      callback(new WebSQLDetached(db, editedValue || 0, true));
                    },
                    (transaction, sqlError) => {
                      // no data
                      callback(new WebSQLDetached(db, 0, false));
                    });
                },
                sqlError=> {
                  // failed to load
                  callback(null);
                });
        
            }
        
            class WebSQLDetached implements Drive.Detached {
        
              constructor(
                private _db: Database,
                public timestamp: number,
                private _metadataTableIsValid: boolean) {
              }
        
              applyTo(mainDrive: Drive, callback: Drive.Detached.CallbackWithShadow): void {
                this._db.readTransaction(
                  transaction => listAllTables(
                    transaction,
                    tables => {
        
                      var ftab = getFilenamesFromTables(tables);
        
                      this._applyToWithFiles(transaction, ftab, mainDrive, callback);
                    },
                    sqlError => {
                      reportSQLError('Failed to list tables for the webSQL database.', sqlError);
                      callback(new WebSQLShadow(this._db, this.timestamp, this._metadataTableIsValid));
                    }),
                  sqlError => {
                    reportSQLError('Failed to open read transaction for the webSQL database.', sqlError);
                    callback(new WebSQLShadow(this._db, this.timestamp, this._metadataTableIsValid));
                  });
              }
        
              purge(callback: Drive.Detached.CallbackWithShadow): void {
                this._db.transaction(
                  transaction => listAllTables(
                    transaction,
                    tables => {
                      this._purgeWithTables(transaction, tables, callback);
                    },
                    sqlError => {
                      reportSQLError('Failed to list tables for the webSQL database.', sqlError);
                      callback(new WebSQLShadow(this._db, 0, false));
                    }),
                  sqlError => {
                    reportSQLError('Failed to open read-write transaction for the webSQL database.', sqlError);
                    callback(new WebSQLShadow(this._db, 0, false));
                  });
              }
        
              private _applyToWithFiles(transaction: SQLTransaction, ftab: { file: string; table: string; }[], mainDrive: Drive, callback: Drive.Detached.CallbackWithShadow): void {
        
                if (!ftab.length) {
                  callback(new WebSQLShadow(this._db, this.timestamp, this._metadataTableIsValid));
                  return;
                }
        
                var reportedFileCount = 0;
        
                var completeOne = () => {
                  reportedFileCount++;
                  if (reportedFileCount === ftab.length) {
                    callback(new WebSQLShadow(this._db, this.timestamp, this._metadataTableIsValid));
                  }
                };
        
                var applyFile = (file: string, table: string) => {
                  transaction.executeSql(
                    'SELECT * FROM "' + table + '"',
                    [],
                    (transaction, result) => {
                      if (result.rows.length) {
                        var row = result.rows.item(0);
                        if (row.value === null)
                          mainDrive.write(file, null);
                        else if (typeof row.value === 'string')
                          mainDrive.write(file, fromSqlText(row.value));
                      }
                      completeOne();
                    },
                    sqlError => {
                      completeOne();
                    });
                };
        
                for (var i = 0; i < ftab.length; i++) {
                  applyFile(ftab[i].file, ftab[i].table);
                }
        
              }
        
              private _purgeWithTables(transaction: SQLTransaction, tables: string[], callback: Drive.Detached.CallbackWithShadow) {
                if (!tables.length) {
                  callback(new WebSQLShadow(this._db, 0, false));
                  return;
                }
        
                var droppedCount = 0;
        
                var completeOne = () => {
                  droppedCount++;
                  if (droppedCount === tables.length) {
                    callback(new WebSQLShadow(this._db, 0, false));
                  }
                };
        
                for (var i = 0; i < tables.length; i++) {
                  transaction.executeSql(
                    'DROP TABLE "' + tables[i] + '"',
                    [],
                    (transaction, result) => {
                      completeOne();
                    },
                    (transaction, sqlError) => {
                      reportSQLError('Failed to drop table for the webSQL database.', sqlError);
                      completeOne();
                    });
                }
              }
        
            }
        
            class WebSQLShadow implements Drive.Shadow {
        
              private _cachedUpdateStatementsByFile: { [name: string]: string; } = {};
              private _closures = {
                updateMetadata: (transaction: SQLTransaction) => this._updateMetadata(transaction)
              };
        
              constructor(private _db: Database, public timestamp: number, private _metadataTableIsValid: boolean) {
              }
        
              write(file: string, content: string) {
        
                if (content || typeof content === 'string') {
                  this._updateCore(file, content);
                }
                else {
                  this._dropFileTable(file);
                }
              }
        
              private _updateCore(file: string, content: string) {
                var updateSQL = this._cachedUpdateStatementsByFile[file];
                if (!updateSQL) {
                  var tableName = mangleDatabaseObjectName(file);
                  updateSQL = this._createUpdateStatement(file, tableName);
                }
                this._db.transaction(
                  transaction => {
                    transaction.executeSql(
                      updateSQL,
                      ['content', content],
                      this._closures.updateMetadata,
                      (transaction, sqlError) => this._createTableAndUpdate(transaction, file, tableName, updateSQL, content));
                  },
                  sqlError => {
                    reportSQLError('Transaction failure updating file "' + file + '".', sqlError);
                  });
              }
        
              private _createTableAndUpdate(transaction: SQLTransaction, file: string, tableName: string, updateSQL: string, content: string) {
                if (!tableName)
                  tableName = mangleDatabaseObjectName(file);
        
                transaction.executeSql(
                  'CREATE TABLE "' + tableName + '" (name PRIMARY KEY, value)',
                  [],
                  (transaction, result) => {
                    transaction.executeSql(
                      updateSQL,
                      ['content', content],
                      this._closures.updateMetadata,
                      (transaction, sqlError) => {
                        reportSQLError('Failed to update table "' + tableName + '" for file "' + file + '" after creation.', sqlError);
                      });
                  },
                  (transaction, sqlError) => {
                    reportSQLError('Failed to create a table "' + tableName + '" for file "' + file + '".', sqlError);
                  });
              }
        
              private _dropFileTable(file: string) {
                var tableName = mangleDatabaseObjectName(file);
                this._db.transaction(
                  transaction => {
                    transaction.executeSql(
                      'DROP TABLE "' + tableName + '"',
                      [],
                      this._closures.updateMetadata,
                      (transaction, sqlError) => {
                        reportSQLError('Failed to drop table "' + tableName + '" for file "' + file + '".', sqlError);
                      });
                  },
                  sqlError => {
                    reportSQLError('Transaction failure dropping table "' + tableName + '" for file "' + file + '".', sqlError);
                  });
              }
        
              private _updateMetadata(transaction: SQLTransaction) {
                var updateMetadataSQL = 'INSERT OR REPLACE INTO "*metadata" VALUES (?,?)';
                transaction.executeSql(
                  updateMetadataSQL,
                  ['editedUTC', this.timestamp],
                  (transaction, result) => { }, // TODO: generate closure statically
                  (transaction, error) => {
                    transaction.executeSql(
                      'CREATE TABLE "*metadata" (name PRIMARY KEY, value)',
                      [],
                      (transaction, result) => {
                        transaction.executeSql(updateMetadataSQL, [], () => { }, () => { });
                      },
                      (transaction, sqlError) => {
                        reportSQLError('Failed to update metadata table after creation.', sqlError);
                      });
                  });
        
              }
        
              private _createUpdateStatement(file: string, tableName: string): string {
                return this._cachedUpdateStatementsByFile[file] =
                  'INSERT OR REPLACE INTO "' + tableName + '" VALUES (?,?)';
              }
            }
        
        
            function mangleDatabaseObjectName(name: string): string {
              // no need to polyfill btoa, if webSQL exists
              if (name.toLowerCase() === name)
                return name;
              else
                return '=' + btoa(name);
            }
        
            function unmangleDatabaseObjectName(name: string): string {
              if (!name || name.charAt(0) === '*') return null;
        
              if (name.charAt(0) !== '=') return name;
        
              try {
                return atob(name.slice(1));
              }
              catch (error) {
                return name;
              }
            }
        
            export function listAllTables(
              transaction: SQLTransaction,
              callback: (tables: string[]) => void,
              errorCallback: (sqlError: SQLError) => void) {
              transaction.executeSql(
                'SELECT tbl_name  from sqlite_master WHERE type=\'table\'',
                [],
                (transaction, result) => {
                  var tables: string[] = [];
                  for (var i = 0; i < result.rows.length; i++) {
                    var row = result.rows.item(i);
                    var table = row.tbl_name;
                    if (!table || (table[0] !== '*' && table.charAt(0) !== '=' && table.charAt(0) !== '/')) continue;
                    tables.push(row.tbl_name);
                  }
                  callback(tables);
                },
                (transaction, sqlError) => errorCallback(sqlError));
            }
        
            function getFilenamesFromTables(tables: string[]) {
              var filenames: { table: string; file: string; }[] = [];
              for (var i = 0; i < tables.length; i++) {
                var file = unmangleDatabaseObjectName(tables[i]);
                if (file)
                  filenames.push({ table: tables[i], file: file });
              }
              return filenames;
            }
        
            function toSqlText(text: string) {
              if (text.indexOf('\u00FF') < 0 && text.indexOf('\u0000') < 0) return text;
        
              return text.replace(/\u00FF/g, '\u00FFf').replace(/\u0000/g, '\u00FF0');
            }
        
            function fromSqlText(sqlText: string) {
              if (sqlText.indexOf('\u00FF') < 0 && sqlText.indexOf('\u0000') < 0) return sqlText;
        
              return sqlText.replace(/\u00FFf/g, '\u00FF').replace(/\u00FF0/g, '\u0000');
            }
        
            function reportSQLError(message: string, sqlError: SQLError);
            function reportSQLError(sqlError: SQLError);
            function reportSQLError(message, sqlError?) {
              if (typeof console !== 'undefined' && typeof console.error === 'function') {
                if (sqlError)
                  console.error(message, sqlError);
                else
                  console.error(sqlError);
              }
            }
        
        
          }
        
        }
    • dom
      • CommentHeader.ts
        module persistence.dom {
        
          export class CommentHeader {
        
            header: string;
            contentOffset: number;
            contentLength: number;
        
            constructor(public node: Comment) {
              var headerLine: string;
              var content: string;
              if (typeof node.substringData === 'function'
                && typeof node.length === 'number') {
                var chunkSize = 128;
        
                if (node.length >= chunkSize) {
                  // TODO: cut chunks off the start and look for newlines
                  var headerChunks: string[] = [];
                  while (headerChunks.length * chunkSize < node.length) {
                    var nextChunk = node.substringData(headerChunks.length * chunkSize, chunkSize);
                    var posEOL = nextChunk.search(/\r|\n/);
                    if (posEOL < 0) {
                      headerChunks.push(nextChunk);
                      continue;
                    }
        
                    this.header = headerChunks.join('') + nextChunk.slice(0, posEOL);
                    this.contentOffset = this.header.length + 1; // if header is separated by a single CR or LF
        
                    if (posEOL === nextChunk.length - 1) { // we may have LF part of CRLF in the next chunk!
                      if (nextChunk.charAt(nextChunk.length - 1) === '\r'
                        && node.substringData((headerChunks.length + 1) * chunkSize, 1) === '\n')
                        this.contentOffset++;
                    }
                    else if (nextChunk.slice(posEOL, posEOL + 2) === '\r\n') {
                      this.contentOffset++;
                    }
        
                    this.contentLength = node.length - this.contentOffset;
                    return;
                  }
        
                  this.header = headerChunks.join('');
                  this.contentOffset = this.header.length;
                  this.contentLength = node.length - content.length;
                  return;
                }
              }
        
              var wholeCommentText = node.nodeValue;
              var posEOL = wholeCommentText.search(/\r|\n/);
              if (posEOL < 0) {
                this.header = wholeCommentText;
                this.contentOffset = wholeCommentText.length;
                this.contentLength = wholeCommentText.length - this.contentOffset;
                return;
              }
        
              this.contentOffset = wholeCommentText.slice(posEOL, posEOL + 2) === '\r\n' ?
                posEOL + 2 : // ends with CRLF
                posEOL + 1; // ends with singular CR or LF
        
              this.header = wholeCommentText.slice(0, posEOL),
              this.contentLength = wholeCommentText.length - this.contentOffset
            }
        
          }
        
        }
      • DOMDrive.ts
        module persistence.dom {
        
          export class DOMDrive implements Drive {
        
            private _byPath: { [path: string]: DOMFile; } = {};
        
            public timestamp: number;
        
            constructor(
              private _totals: DOMTotals,
              files: DOMFile[],
              private _document: DOMDrive.DocumentSubset) {
        
              this.timestamp = this._totals ? this._totals.timestamp : 0;
        
              for (var i = 0; i < files.length; i++) {
                this._byPath[files[i].path] = files[i];
              }
            }
        
            files(): string[] {
        
              if (typeof Object.keys === 'string') {
                var result = Object.keys(this._byPath);
              }
              else {
                var result: string[] = [];
                for (var k in this._byPath) if (this._byPath.hasOwnProperty(k)) {
                  result.push(k);
                }
              }
        
              result.sort();
        
              return result;
            }
        
            read(file: string): string {
              var file = normalizePath(file);
              var f = this._byPath[file];
              if (!f)
                return null;
              else
                return f.read();
            }
        
            write(file: string, content: string) {
        
              var totalDelta = 0;
        
              var file = normalizePath(file);
              var f = this._byPath[file];
        
              if (content === null) {
                // removal
                if (f) {
                  totalDelta -= f.contentLength;
                  f.node.parentElement.removeChild(f.node);
                  delete this._byPath[file];
                }
              }
              else {
                // addition
                if (f) {
                  var lengthBefore = f.contentLength;
                  f.write(content);
                  totalDelta += f.contentLength - lengthBefore;
                }
                else {
                  var comment = document.createComment('');
                  var f = new DOMFile(comment, file, null, 0, 0);
                  f.write(content);
                  this._document.body.appendChild(f.node);
                  this._byPath[file] = f;
                  totalDelta += f.contentLength;
                }
              }
        
              this._totals.timestamp = this.timestamp;
              this._totals.updateNode();
            }
        
          }
        
          export module DOMDrive {
        
            export interface DocumentSubset {
              body: HTMLBodyElementSubset;
        
              createComment(data: string): Comment;
            }
        
            export interface HTMLBodyElementSubset {
              appendChild(node: Node);
              insertBefore(newChild: Node, refNode?: Node);
              firstChild: Node;
            }
          }
        }
      • DOMFile.ts
        module persistence.dom {
        
          export class DOMFile {
        
            private _encodedPath: string = null;
        
            constructor(
              public node: Comment,
              public path: string,
              private _encoding: (text: string) => any,
              private _contentOffset: number,
              public contentLength: number) {
            }
        
            static tryParse(cmheader: CommentHeader): DOMFile {
        
              //    /file/path/continue
              //    "/file/path/continue"
              //    /file/path/continue   [encoding]
        
              var parseFmt = /^\s*((\/|\"\/)(\s|\S)*[^\]])\s*(\[((\s|\S)*)\])?\s*$/;
              var parsed = parseFmt.exec(cmheader.header);
              if (!parsed) return null; // does not match the format
        
              var filePath = parsed[1];
              var encodingName = parsed[5];
        
              if (filePath.charAt(0) === '"') {
                if (filePath.charAt(filePath.length - 1) !== '"') return null; // unpaired leading quote
                try {
                  if (typeof JSON !== 'undefined' && typeof JSON.parse === 'function')
                    filePath = JSON.parse(filePath);
                  else
                    filePath = eval(filePath); // security doesn't seem to be compromised, input is coming from the same file
                }
                catch (parseError) {
                  return null; // quoted path but wrong format (JSON expected)
                }
              }
              else { // filePath NOT started with quote
                if (encodingName) {
                  // regex above won't strip trailing whitespace from filePath if encoding is specified
                  // (because whitespace matches 'non-bracket' class too)
                  filePath = filePath.slice(0, filePath.search(/\S(\s*)$/) + 1);
                }
              }
        
              var encoding = encodings[encodingName || 'LF'];
              // invalid encoding considered a bogus comment, skipped
              if (encoding)
                return new DOMFile(cmheader.node, filePath, encoding, cmheader.contentOffset, cmheader.contentLength);
        
              return null;
            }
        
        
            read() {
        
              // proper HTML5 has substringData to read only a chunk
              // (that saves on string memory allocations
              // comparing to fetching the whole text including the file name)
              var contentText = typeof this.node.substringData === 'function' ?
                this.node.substringData(this._contentOffset, 1000000000) :
                this.node.nodeValue.slice(this._contentOffset);
        
              // XML end-comment is escaped when stored in DOM,
              // unescape it back
              var restoredText = contentText.
              	replace(/\-\-\*(\**)\>/g, '--$1>').
                replace(/\<\*(\**)\!/g, '<$1!');
        
              // decode
              var decodedText = this._encoding(restoredText);
        
              // update just in case it's been off
              this.contentLength = decodedText.length;
        
              return decodedText;
            }
        
            write(content: any) {
        
              var encoded = bestEncode(content);
              var protectedText = encoded.content.
              	replace(/\-\-(\**)\>/g, '--*$1>').
              	replace(/\<(\**)\!/g, '<*$1!');
        
              if (!this._encodedPath) {
                // most cases path is path,
                // but if anything is weird, it's going to be quoted
                // (actually encoded with JSON format)
                var encp = bestEncode(this.path, true /*escapePath*/);
                this._encodedPath = encp.content;
              }
        
              var leadText = ' ' + this._encodedPath + (encoded.encoding === 'LF' ? '' : ' [' + encoded.encoding + ']') + '\n';
              this.node.nodeValue = leadText + encoded.content;
        
              this._encoding = encodings[encoded.encoding || 'LF'];
              this._contentOffset = leadText.length;
        
              this.contentLength = content.length;
            }
        
          }
        
        }
      • DOMTotals.ts
        module persistence.dom {
        
          var monthsPrettyCase = ('Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec').split('|');
          var monthsUpperCase = ('Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec').toUpperCase().split('|');
        
          export class DOMTotals {
        
            constructor(
            	public timestamp: number,
            	public totalSize: number,
              private _node: Comment) {
            }
        
            static tryParse(cmheader: CommentHeader): DOMTotals {
        
              // TODO: preserve unknowns when parsing
        
              var parts = cmheader.header.split(',');
              var anythingParsed = false;
              var totalSize = 0;
              var timestamp = 0;
        
              for (var i = 0; i < parts.length; i++) {
        
                // total 234Kb
                // total 23
                // total 6Mb
        
                var totalFmt = /^\s*total\s+(\d*)\s*([KkMm])?b?\s*$/;
                var totalMatch = totalFmt.exec(parts[i]);
                if (totalMatch) {
                  try {
                    var total = parseInt(totalMatch[1]);
                    if ((totalMatch[2] + '').toUpperCase() === 'K')
                      total *= 1024;
                    else if ((totalMatch[2] + '').toUpperCase() === 'M')
                      total *= 1024 * 1024;
                    totalSize = total;
                    anythingParsed = true;
                  }
                  catch (totalParseError) { }
                  continue;
                }
        
                var savedFmt = /^\s*saved\s+(\d+)\s+(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s+(\d+)\s+(\d+)\:(\d+)(\:(\d+(\.(\d+))?))\s*(GMT\s*[\-\+]?\d+\:?\d*)?\s*$/i;
                var savedMatch = savedFmt.exec(parts[i]);
                if (savedMatch) {
                  // 25 Apr 2015 22:52:01.231
                  try {
                    var savedDay = parseInt(savedMatch[1]);
                    var savedMonth = monthsUpperCase.indexOf(savedMatch[2].toUpperCase());
                    var savedYear = parseInt(savedMatch[3]);
                    if (savedYear < 100)
                      savedYear += 2000; // no 19xx notation anymore :-(
                    var savedHour = parseInt(savedMatch[4]);
                    var savedMinute = parseInt(savedMatch[5]);
                    var savedSecond = savedMatch[7] ? parseFloat(savedMatch[7]) : 0;
        
                    timestamp = new Date(savedYear, savedMonth, savedDay, savedHour, savedMinute, savedSecond | 0).valueOf();
                    timestamp += (savedSecond - (savedSecond | 0))*1000; // milliseconds
        
                    var savedGMTStr = savedMatch[10];
                    if (savedGMTStr) {
                      var gmtColonPos = savedGMTStr.indexOf(':');
                      if (gmtColonPos>0) {
                        var gmtH = parseInt(savedGMTStr.slice(0, gmtColonPos));
                        timestamp += gmtH * 60 /*min*/ * 60 /*sec*/ * 1000 /*msec*/;
                        var gmtM = parseInt(savedGMTStr.slice(gmtColonPos + 1));
                        timestamp += gmtM * 60 /*sec*/ * 1000 /*msec*/;
                      }
                    }
        
                    anythingParsed = true;
                  }
                  catch (savedParseError) { }
                }
        
              }
        
              if (anythingParsed)
                return new DOMTotals(timestamp, totalSize, cmheader.node);
              else
                return null;
            }
        
          	updateNode() {
              // TODO: update the node content
        
              // total 4Kb, saved 25 Apr 2015 22:52:01.231
              var newTotals =
                'total ' + (
                  this.totalSize < 1024 * 9 ? this.totalSize + '' :
                    this.totalSize < 1024 * 1024 * 9 ? ((this.totalSize / 1024) | 0) + 'Kb' :
                      ((this.totalSize / (1024 * 1024)) | 0) + 'Mb') + ', ' +
                'saved ';
        
              var saveDate = new Date(this.timestamp);
              newTotals +=
                saveDate.getDate() + ' ' +
                monthsPrettyCase[saveDate.getMonth()] + ' ' +
              	saveDate.getFullYear() + ' ' +
              	num2(saveDate.getHours()) + ':' +
                num2(saveDate.getMinutes()) + ':' +
                num2(saveDate.getSeconds()) + '.' +
                this.timestamp.toString().slice(-3);
        
              var saveDateLocalStr = saveDate.toString();
              var gmtMatch = (/(GMT\s*[\-\+]\d+(\:\d+)?)/i).exec(saveDateLocalStr);
              if (gmtMatch)
                newTotals += ' ' + gmtMatch[1];
        
              this._node.nodeValue = newTotals;
        
              function num2(n: number) {
                return n <= 9 ? '0' + n : '' + n;
              }
        
            }
        
          }
        
        
        }
      • parseDOMStorage.ts
        module persistence.dom {
        
          export function parseDOMStorage(document: parseDOMStorage.DocumentSubset): parseDOMStorage.ContinueParsing {
        
            var loadedFiles: DOMFile[] = [];
            var loadedTotals: DOMTotals;
            var lastNode: Node;
            var loadedSize = 0;
        
            return continueParsing();
        
            function continueParsing(): parseDOMStorage.ContinueParsing {
        
              continueParsingDOM(false);
        
              return {
                continueParsing,
                finishParsing,
                loadedSize,
                totalSize: loadedTotals ? loadedTotals.totalSize : 0,
                loadedFileCount: loadedFiles.length
              };
        
            }
        
            function finishParsing(): DOMDrive {
        
              continueParsingDOM(true);
        
              if (loadedTotals) {
                loadedTotals.totalSize = loadedSize;
                loadedTotals.updateNode();
              }
        
              var drive = new DOMDrive(loadedTotals, loadedFiles, document);
        
              return drive;
            }
        
            function continueParsingDOM(finish: boolean) {
              if (document.body) {
                if (!lastNode)
                  lastNode = document.body.firstChild;
        
                while (true) {
                  if (!lastNode) return;
                  else if (!finish && lastNode == document.body.lastChild) return;
        
        
                  if (lastNode.nodeType === 8) {
                    processNode(<Comment>lastNode);
                  }
        
                  lastNode = lastNode.nextSibling;
                }
              }
            }
        
            function processNode(node: Comment): boolean {
              var cmheader = new CommentHeader(node);
        
              var file = DOMFile.tryParse(cmheader);
              if (file) {
                loadedFiles.push(file);
                loadedSize += file.contentLength;
                return true;
              }
        
              var totals = DOMTotals.tryParse(cmheader);
              if (totals)
                loadedTotals = totals;
            }
          }
        
          export module parseDOMStorage {
        
            export interface ContinueParsing {
        
              continueParsing(): ContinueParsing;
        
              finishParsing(): DOMDrive;
        
              loadedFileCount: number;
              loadedSize: number;
              totalSize: number;
        
            }
        
            export interface DocumentSubset extends DOMDrive.DocumentSubset {
              body: HTMLBodyElementSubset;
            }
        
            export interface HTMLBodyElementSubset extends DOMDrive.HTMLBodyElementSubset {
              lastChild: Node;
            }
        
          }
        
        }
    • encodings
      • CR.ts
        module persistence.encodings {
        
          export function CR(text: string): string {
            return text.
              replace(/\r\n|\n/g, '\r');
          }
        
        }
      • CRLF.ts
        module persistence.encodings {
        
          export function CRLF(text: string): string {
            return text.
              replace(/\r|\n/g, '\r\n');
          }
        
        }
      • LF.ts
        module persistence.encodings {
        
          export function LF(text: string): string {
            return text.
              replace(/\r\n|\r/g, '\n');
          }
        
        }
      • base64.ts
        module persistence.encodings {
        
          export function base64(text: string): any {
            // TODO: convert from base64 to text
            // TODO: invent a prefix to signify binary data
            throw new Error('Base64 encoding is not implemented yet.');
          }
        
        }
      • eval.ts
        module persistence.encodings {
        
          export function eval(text: string): any {
            return (0, window['eval'])(text);
          }
        
        }
      • json.ts
        module persistence.encodings {
        
          export function json(text: string): any {
            var result = typeof JSON ==='undefined' ? eval(text) : JSON.parse(text);
        
            if (result && typeof result !== 'string' && result.type) {
              var ctor: any = window[result.type];
              result = new ctor(result);
            }
        
            return result;
          }
        
        }
    • Drive.ts
      module persistence {
      
        export interface Drive {
      
          timestamp: number;
      
          files(): string[];
      
          read(file: string): string;
      
          write(file: string, content: string);
      
        }
      
        export module Drive {
      
          export interface Shadow {
      
            timestamp: number;
      
            write(file: string, content: string): void;
      
          }
      
          export interface Optional {
      
            name: string;
      
            detect(uniqueKey: string, callback: (detached: Detached) => void): void;
      
          }
      
          export interface Detached {
      
            timestamp: number;
            totalSize?: number;
      
            applyTo(mainDrive: Drive, callback: Detached.CallbackWithShadow): void;
      
            purge(callback: Detached.CallbackWithShadow): void;
      
          }
      
          export module Detached {
            export interface CallbackWithShadow {
      
              (loaded: Shadow): void;
              progress?: (current: number, total: number) => void;
            }
          }
      
        }
      }
    • bestEncode.ts
      module persistence {
      
        export function bestEncode(content: any, escapePath?: boolean): { content: string; encoding: string; } {
      
          if (content.length>1024*16) {
            // TODO: consider packing tightly and using eval encoding to unpack
          }
      
          if (typeof content!=='string')
            return { content: encodeArrayOrSimilarAsJSON(content), encoding: 'json' };
      
          var needsEscaping: boolean;
          if (escapePath) {
            // zero-char, newlines, leading/trailing spaces, quote and apostrophe
            needsEscaping = /\u0000|\r|\n|^\s|\s$|\"|\'/.test(content);
          }
          else {
            needsEscaping = /\u0000|\r/.test(content);
          }
      
          if (needsEscaping) {
            // ZERO character is officially unsafe in HTML,
            // CR is contentious in IE (which converts any CR or LF into CRLF)
      
            return { content: encodeUnusualStringAsJSON(content), encoding: 'json' };
          }
          else {
            return { content: content, encoding: 'LF' };
          }
        }
      
        function encodeUnusualStringAsJSON(content: string): string {
          if (typeof JSON !== 'undefined' && typeof JSON.stringify === 'function') {
            var simpleJSON = JSON.stringify(content);
            var sanitizedJSON = simpleJSON.
              replace(/\u0000/g, '\\u0000').
              replace(/\r/g, '\\r').
              replace(/\n/g, '\\n');
            return sanitizedJSON;
          }
          else {
            var result = content.replace(
              /\"\u0000|\u0001|\u0002|\u0003|\u0004|\u0005|\u0006|\u0007|\u0008|\u0009|\u00010|\u00011|\u00012|\u00013|\u00014|\u00015|\u0016|\u0017|\u0018|\u0019|\u0020|\u0021|\u0022|\u0023|\u0024|\u0025|\u0026|\u0027|\u0028|\u0029|\u0030|\u0031/g,
              (chr) =>
                chr === '\t' ? '\\t' :
                  chr === '\r' ? '\\r' :
                    chr === '\n' ? '\\n' :
                      chr === '\"' ? '\\"' :
                        chr < '\u0010' ? '\\u000' + chr.charCodeAt(0).toString(16) :
                          '\\u00' + chr.charCodeAt(0).toString(16));
            return result;
          }
        }
      
        function encodeArrayOrSimilarAsJSON(content: any): string {
            var type = content instanceof Array ? null : content.constructor.name || content.type;
            if (typeof JSON !== 'undefined' && typeof JSON.stringify === 'function') {
              if (type) {
                var wrapped = { type, content };
                var wrappedJSON = JSON.stringify(wrapped);
                return wrappedJSON;
              }
              else {
                var contentJSON = JSON.stringify(content);
                return contentJSON;
              }
            }
            else {
              var jsonArr: string[] = [];
              if (type) {
                jsonArr.push('{"type": "');
                jsonArr.push(content.type || content.prototype.constructor.name);
                jsonArr.push('", "content": [');
              }
              else {
                jsonArr.push('[');
              }
      
              for (var i = 0; i < content.length; i++) {
                if (i) jsonArr.push(',');
                jsonArr.push(content[i]);
              }
      
              if (type)
                jsonArr.push(']}');
              else
                jsonArr.push(']');
      
              return jsonArr.join('');
            }
        }
      }
    • bootMount.ts
      module persistence {
      
        // TODO: pass in progress callback
        export function bootMount(uniqueKey: string, document: Document): bootMount.ContinueLoading {
      
          var continueParse: persistence.dom.parseDOMStorage.ContinueParsing;
      
          var ondomdriveloaded;
          var domDriveLoaded: Drive;
          var storedFinishCallback;
      
          mountDrive(
            callback => {
              if (domDriveLoaded)
                callback(domDriveLoaded);
              else
                ondomdriveloaded = callback;
            },
            uniqueKey,
            [attached.indexedDB, attached.webSQL, attached.localStorage],
            mountedDrive => {
      
              storedFinishCallback(mountedDrive);
      
            });
      
          return continueLoading();
      
          function continueLoading(): bootMount.ContinueLoading {
      
            continueDOMLoading();
      
            // TODO: record progress
      
            return {
              continueLoading,
              finishLoading,
      
              loadedFileCount: continueParse.loadedFileCount,
              loadedSize: continueParse.loadedSize,
              totalSize: continueParse.totalSize
      
            };
          }
      
          function finishLoading(finishCallback: (monutedDrive: Drive) => void) {
      
            storedFinishCallback = finishCallback;
      
            continueDOMLoading();
      
            domDriveLoaded = continueParse.finishParsing();
      
            if (ondomdriveloaded) {
              ondomdriveloaded(domDriveLoaded);
            }
      
          }
      
      
          function continueDOMLoading() {
            continueParse = continueParse ? continueParse.continueParsing() : dom.parseDOMStorage(document);
          }
      
        }
      
        module bootMount {
      
          export interface ContinueLoading {
      
            continueLoading(): ContinueLoading;
      
            finishLoading(finishCallback: (mountedDrive: Drive) => void);
      
            loadedFileCount: number;
            loadedSize: number;
            totalSize: number;
      
          }
      
        }
      }
    • mountDrive.ts
      module persistence {
      
        export function mountDrive(
          loadDOMDrive: (callback: (dom: Drive) => void)=> void,
          uniqueKey: string,
          optionalModules: Drive.Optional[],
          callback: mountDrive.Callback): void {
      
          var driveIndex = 0;
      
          loadNextOptional();
      
          function loadNextOptional() {
      
            while (driveIndex < optionalModules.length &&
              (!optionalModules[driveIndex] || typeof optionalModules[driveIndex].detect !== 'function')) {
              driveIndex++;
            }
      
            if (driveIndex >= optionalModules.length) {
              loadDOMDrive(dom => callback(new MountedDrive(dom, null)));
              return;
            }
      
            var op = optionalModules[driveIndex];
            op.detect(
              uniqueKey,
              detached => {
                if (!detached) {
                  driveIndex++;
                  loadNextOptional();
                  return;
                }
      
                loadDOMDrive(dom => {
                  if (detached.timestamp > dom.timestamp) {
                    var callbackWithShadow: Drive.Detached.CallbackWithShadow = loadedDrive => {
                      dom.timestamp = detached.timestamp;
                      callback(new MountedDrive(dom, loadedDrive));
                    };
                    if (callback.progress)
                      callbackWithShadow.progress = callback.progress;
                    loadDOMDrive(dom => detached.applyTo(dom, callbackWithShadow));
                  }
                  else {
                    var callbackWithShadow: Drive.Detached.CallbackWithShadow = loadedDrive => {
                      callback(new MountedDrive(dom, loadedDrive));
                    };
                    if (callback.progress)
                      callbackWithShadow.progress = callback.progress;
                    detached.purge(callbackWithShadow);
                  }
                });
      
              });
          }
      
        }
      
        export module mountDrive {
      
          export interface Callback {
      
            (drive: Drive): void;
      
            progress?: (current: number, total: number) => void;
      
          }
      
        }
      
        class MountedDrive implements Drive {
      
          updateTime = true;
          timestamp: number = 0;
      
          constructor (private _dom: Drive, private _shadow: Drive.Shadow) {
            this.timestamp = this._dom.timestamp;
          }
      
          files(): string[] {
            return this._dom.files();
          }
      
          read(file: string): string {
            return this._dom.read(file);
          }
      
          write(file: string, content: string) {
            if (this.updateTime) {
              this.timestamp = +new Date();
            }
      
            this._dom.timestamp = this.timestamp;
            this._dom.write(file, content);
            if (this._shadow) {
              this._shadow.timestamp = this.timestamp;
              this._shadow.write(file, content);
            }
          }
        }
      
      }
    • normalizePath.ts
      module persistence {
      
        export function normalizePath(path: string) : string {
      
          if (!path) return '/'; // empty paths converted to root
      
          if (path.charAt(0) !== '/') // ensuring leading slash
            path = '/' + path;
      
          path = path.replace(/\/\/*/g, '/'); // replacing duplicate slashes with single
      
          return path;
        }
      
      }
    persistence
  • shell
    • build
      • processTemplate.ts
        module shell.build {
        
          export function processTemplate(
            template: string, scopes: any[],
            log: (logText: string) => void,
            callback: (error: Error, result?: string) => void): void {
            // <%= expr %>
            // <% statement %>
            // <%-- comment --%>
        
            log('Generating build script...');
            setTimeout(() => {
              var fnText = generateBuildScript(template, scopes);
        
              log('Preprocessing build script...');
              setTimeout(() => {
                try {
                  var fn = Function('scopes', fnText);
        
                  log('Executing build script...');
        
                  var output: any[] = fn(scopes);
                  var outputIndex = 0;
                }
                catch (error) {
                  log('Build failure ' + error);
                  callback(error);
                  return;
                }
        
                processNextOutputChunk();
        
                function processNextOutputChunk() {
                  var startTime = +new Date();
        
                  // all heavy chunks will bail out and queue the next one on setTimeout,
                  // simple literal insertions keep going for a slice of time
                  while (true) {
                    if (outputIndex >= output.length) {
                      var result = output.join('');
                      callback(null, result);
                      return;
                    }
        
                    var outputChunk = output[outputIndex];
                    if (typeof outputChunk === 'function') {
                      log('Processing ' + outputChunk + '...');
                      setTimeout(() => {
                        try {
                          var chunkResult = outputChunk();
                          var chunkResultText = String(chunkResult);
                          output[outputIndex] = chunkResultText;
                        }
                        catch (error) {
                          callback(error);
                          return;
                        }
        
                        log('...OK [' + chunkResultText.length + ']');
                        outputIndex++;
                        processNextOutputChunk();
                        //setTimeout(processNextOutputChunk, 1);
                      }, 1);
                      break;
                    }
                    else {
                      var literal = String(outputChunk);
                      output[outputIndex] = literal;
                      var literalLines = (literal.length > 100 ? literal.slice(0, 50) + '\n...\n' + literal.slice(literal.length - 5) : literal).split('\n');
                      while (literalLines.length && !literalLines[0]) literalLines.shift();
                      while (literalLines.length && !literalLines[literalLines.length - 1]) literalLines.pop();
                      log(literalLines.length <= 2 ? literalLines.join('\n') : literalLines[0] + '\n...\n' + literalLines[literalLines.length - 1]);
                      outputIndex++;
        
                      if (+new Date() - startTime > 300) {
                        setTimeout(processNextOutputChunk, 1);
                        break;
                      }
                      // keep going if haven't been processing for long yet
        
                    }
                  }
                }
        
              }, 1);
        
            }, 1);
        
          }
        
          function generateBuildScript(template: string, scopes: any[]): string {
            var generated: string[] = [];
            for (var i = 0; i < scopes.length; i++) {
              generated.push('with(scopes[' + i + ']) {');
            }
        
            generated.push('var output =[];');
        
            var index = 0;
            while (index < template.length) {
        
              var nextOpenASP = template.indexOf('<%', index);
              if (nextOpenASP < 0) {
                generateWrite(generated, template.slice(index));
                break;
              }
        
              var ch = template.charAt(nextOpenASP + 2);
              if (ch === '=') {
                var closeASP = template.indexOf('%>', nextOpenASP);
                if (closeASP < 0) {
                  generateWrite(generated, template.slice(index));
                  break;
                }
        
                generateWrite(generated, template.slice(index, nextOpenASP));
                generateRedirect(generated, template.slice(nextOpenASP + 3, closeASP));
                index = closeASP + 2;
              }
              else if (ch === '-') {
                var closeCommentMatch = template.charAt(nextOpenASP + 3) === '-' ? '--%>' : '-%>';
                var closeComment = template.indexOf(closeCommentMatch, nextOpenASP);
                if (closeComment < 0) {
                  generateWrite(generated, template.slice(index));
                  break;
                }
        
                generateWrite(generated, template.slice(index, nextOpenASP));
                index = closeComment + closeCommentMatch.length;
              }
              else {
                var closeASP = template.indexOf('%>', nextOpenASP);
                if (closeASP < 0) {
                  generateWrite(generated, template.slice(index));
                  break;
                }
        
                generateWrite(generated, template.slice(index, nextOpenASP));
                generateStatement(generated, template.slice(nextOpenASP + 2, closeASP));
                index = closeASP + 2;
              }
        
            }
        
            for (var i = 0; i < scopes.length; i++) {
              generated.push('}');
            }
        
            generated.push('return output;');
        
            var fnText = generated.join('\n');
            return fnText;
        
          }
        
        
          function generateWrite(generated: string[], chunk: string) {
            if (chunk)
              generated.push('output.push(\'' + stringLiteral(chunk) + '\');');
          }
        
          function generateRedirect(generated: string[], redirect: string) {
            generated.push('output.push(' + redirect + ');');
          }
        
          function generateStatement(generated: string[], statement: string) {
            generated.push(statement);
          }
        
          function stringLiteral(text: string) {
            return text.
              replace(/\\/g, '\\\\').
              replace(/\n/g, '\\n').
              replace(/\r/g, '\\r').
              replace(/\t/g, '\\t').
              replace(/\'/g, '\\\'').
              replace(/\"/g, '\\"');
          }
        
        }
    • editor
      • Editor.ts
        module shell.editor {
        
          export class Editor {
        
            private _textarea: HTMLTextAreaElement;
            private _title: HTMLDivElement;
        
            constructor(private _host: HTMLElement, private _file: string, text?: string) {
              this._textarea = <any>elem('textarea', {
                background: 'navy',
                color: 'silver',
                top: '0', left: '0',
                width: '100%', height: '100%', position: 'absolute',
                borderTop: 'solid 1em black'
              }, this._host);
              this._title = <any>elem('div', {
                position: 'absolute',
                top: '0', left: '0',
                width: '100%', height: '1em',
                background: 'silver', color: 'navy',
                text: this._file
              }, this._host);
              if (typeof text === 'string')
                this._textarea.value = text;
            }
        
          focus() {
            this._textarea.focus();
          }
        
            setText(text: string) {
              this._textarea.value = text;
            }
        
            getText(): string {
              return this._textarea.value;
            }
        
            close() {
              this._host.removeChild(this._textarea);
              this._host.removeChild(this._title);
            }
          }
        
        }
    • panels
      • Panel.ts
        module shell.panels {
        
          var panelClass = 'panels-panel-page';
        
          export class Panel {
        
            private _cursorPath: string;
            private _cursorEntryIndex = -1;
            private _entries: Panel.PageEntry[] = null;
            private _redrawRequested = 0;
        
            private _metrics: Panel.Metrics = null;
        
            private _scrollContent: HTMLElementWithFlags;
        
            private _pages: Panel.PageData[] = [];
        
        		private _entriesInColumn = 0;
            private _pageHeight = 0;
            private _pageInterval = 0;
            private _columnsOnPage = 0;
            private _columnWidth = 0;
        
            private _scrollTop = 0;
            private _scrollTopHeight = 0;
            private _isActive = false;
            private _nextRedrawScrollToCurrent = false;
        
            constructor(
              private _host: HTMLElement,
              private _path: string,
              private _directoryService: (path: string) => Panel.DirectoryEntry[]) {
        
              this._scrollContent = <HTMLElementWithFlags>elem('div', this._host);
              this._scrollContent.isScrollContent = true;
        
              on(this._host, 'scroll', () => this._onscroll());
        
              this._queueRedraw();
            }
        
            set(paths: {currentPath?: string; cursorPath?: string}) {
              if (paths.currentPath)
                this._path = paths.currentPath;
              if (paths.cursorPath) {
                this._cursorPath = paths.cursorPath;
                this._nextRedrawScrollToCurrent = true;
              }
              this._queueRedraw();
            }
        
          	onclick(e: MouseEvent) {
              if (!this._entries) return;
        
              var clickElem = <HTMLElementWithFlags>(e.srcElement || e.target || e.currentTarget);
              var entryDIV: HTMLElementWithFlags;
              var columnDIV: HTMLElementWithFlags;
              var pageDIV: HTMLElementWithFlags;
              var leadPaddingDIV: HTMLElementWithFlags;
        
              while (clickElem) {
        
                if (clickElem.isScrollContent) {
                  if (clickElem !== this._scrollContent) return false;
                  break;
                }
        
                if (clickElem.isPageDIV)
                  pageDIV = clickElem;
        
                if (clickElem.isColumnDIV)
                  columnDIV = clickElem;
        
                if (clickElem.isEntryDIV)
                  entryDIV = clickElem;
        
                clickElem = <any>clickElem.parentElement;
              }
        
              if (entryDIV) {
                for (var i = 0; i < this._entries.length; i++) {
                  if (this._entries[i].entryDIV === entryDIV) {
                    if (this._cursorPath ===this._entries[i].path && (this._entries[i].flags & Panel.EntryFlags.Directory)) {
                      this._cursorPath = this._path;
                      this._path = this._entries[i].path; // double click (or second click) opens directory
                    }
                    else {
                      this._cursorPath = this._entries[i].path;
                    }
                    this._nextRedrawScrollToCurrent = true;
                    this._queueRedraw();
                    break;
                  }
                }
                this._redrawNow();
              }
        
              return true;
            }
        
            currentPath() {
              return this._path;
            }
        
            cursorPath() {
              return this._cursorPath;
            }
        
            arrange(metrics: Panel.Metrics) {
              this._metrics = metrics;
              this._redrawNow();
            }
        
          	isActive() {
              return this._isActive;
            }
        
            activate() {
              this._isActive = true;
              this._scrollContent.className = 'panels-panel-active';
            }
        
            deactivate() {
              this._isActive = false;
              this._scrollContent.className = 'panels-panel-inactive';
            }
        
            cursorGo(direction: number) {
              if (!this._entries || !this._entries.length) return;
        
              var moveStep = 0;
        
              switch (direction) {
        
                case -1: // up
                  moveStep = -1;
                  break;
        
                case +1: // down
                  moveStep = +1;
                  break;
        
                case -10: // left
                  var entryIndex = this._calcEntryIndex(this._cursorEntryIndex);
                  if (this._columnsOnPage === 1) {
                    moveStep = -entryIndex || -1;
                  }
                  else {
                    var columnIndex = this._calcColumnIndex(this._cursorEntryIndex);
                    if (columnIndex > 0) {
                      moveStep = -this._entriesInColumn;
                    }
                    else {
                      moveStep = this._entriesInColumn * (this._columnsOnPage - 1) - 1;
        
                      // overflow cases
                      if (this._cursorEntryIndex === 0) {
                        moveStep = this._entriesInColumn * (this._columnsOnPage - 1);
                      }
                      else if (this._cursorEntryIndex + moveStep >= this._entries.length) { // there is no rightmost column
        
                        var endEntryIndex = this._calcEntryIndex(this._entries.length - 1);
                        var endColumnIndex = this._calcColumnIndex(this._entries.length - 1);
        
                        // if the last entry is higher vertically, stop at the previous column
                        var targetColumnIndex = endEntryIndex >= entryIndex ? endColumnIndex : endColumnIndex - 1;
        
                        if (targetColumnIndex <= columnIndex) {
                          moveStep = -entryIndex; // if nowhere to go right, go all the way up
                        }
                        else {
                          // there are columns on the right, so go there (and one up after)
                          moveStep = (targetColumnIndex - columnIndex) * this._entriesInColumn - 1;
                        }
                      }
                    }
                  }
                  break;
        
                case +10: // right
                  var columnIndex = this._calcColumnIndex(this._cursorEntryIndex);
                  if (columnIndex < this._columnsOnPage - 1) {
                    moveStep = +this._entriesInColumn;
                  }
                  else {
                    moveStep = -this._entriesInColumn * 2 + 1;
                  }
                  break;
        
                case -100: // page up
                  moveStep = -this._entriesInColumn * this._columnsOnPage;
                  break;
        
                case +100: // page down
                  moveStep = +this._entriesInColumn * this._columnsOnPage;
                  break;
              }
        
              if (moveStep) {
                var newCursorEntryIndex = Math.max(0, Math.min(this._entries.length-1, this._cursorEntryIndex + moveStep));
                var e = this._entries[newCursorEntryIndex];
                if (e) {
                  this._cursorPath = this._entries[newCursorEntryIndex].path;
                  this._nextRedrawScrollToCurrent = true;
                  this._queueRedraw();
                }
              }
            }
        
            navigateCursor() {
              if (this._cursorEntryIndex >= 0) {
                var entry = this._entries[this._cursorEntryIndex];
                if (entry) {
                  if (entry.flags & Panel.EntryFlags.Directory) {
                    this._cursorPath = this._path;
                    this._path = entry.path;
                    this._nextRedrawScrollToCurrent = true;
                    this._queueRedraw();
                    return true;
                  }
                }
              }
            }
        
            private _queueRedraw() {
              if (this._redrawRequested) return;
              this._redrawRequested = setTimeout(() => this._redrawNow(), 100);
            }
        
            private _redrawNow() {
        
              var prevOffset = this._calcEntryTopOffset(Math.max(0, this._cursorEntryIndex));
        
              var entries = this._directoryService(this._path);
              this._entries = [];
        
              entries.sort((e1, e2) => {
                var flagCompare = (e1.flags & Panel.EntryFlags.Directory) ?
                  ((e2.flags & Panel.EntryFlags.Directory) ? 0 : -1) :
                  ((e2.flags & Panel.EntryFlags.Directory) ? +1 : 0);
                if (flagCompare) return flagCompare;
        
                var nameCompare = e1.name > e2.name ? 1 : e1.name < e2.name ? -1 : 0;
                return nameCompare;
              });
        
              if (this._path !== '/') {
                var parentPath = this._path.slice(0, this._path.lastIndexOf('/')) || '/';
                entries.unshift({
                  name: '..',
                  path: parentPath,
                  flags: Panel.EntryFlags.Directory
                });
              }
        
              if (!entries || !entries.length) {
                this._scrollContent.innerHTML = '';
                this._pages = [];
                return;
              }
        
              this._cursorEntryIndex = -1;
              for (var i = 0; i < entries.length; i++) {
                if (entries[i].path === this._cursorPath) {
                  this._cursorEntryIndex = i;
                  break;
                }
              }
        
              if (this._cursorEntryIndex < 0) {
                this._cursorEntryIndex = 0;
                this._cursorPath = entries.length > 0 ? entries[0].path : null;
              }
        
              this._entriesInColumn = Math.max(3, ((this._metrics.hostHeight / this._metrics.windowMetrics.emHeight) | 0) - 2);
              this._pageHeight = this._entriesInColumn * this._metrics.windowMetrics.emHeight;
              this._pageInterval = this._metrics.hostHeight - this._pageHeight - this._metrics.windowMetrics.emHeight;
        
              var desiredColumnWidth = 17 * this._metrics.windowMetrics.emWidth;
              this._columnsOnPage = Math.max(1, Math.round(this._metrics.hostWidth / desiredColumnWidth) | 0);
              this._columnWidth = ((this._metrics.hostWidth / this._columnsOnPage) | 0) - 1;
        
              if (!this._pages)
                this._pages = [];
        
              for (var i = 0; i < entries.length; i++) {
                var pageIndex = this._calcPageIndex(i);
                var page = this._pages[pageIndex];
        
                if (page) {
                  if (page.height !== this._pageHeight) {
                    page.height = this._pageHeight;
                    page.pageDIV.style.height = this._pageHeight + 'px';
                  }
                  if (page.leadInterval !== this._pageInterval) {
                    page.leadInterval = this._pageInterval;
                    if (page.leadPaddingDIV)
                      page.leadPaddingDIV.style.height = this._pageInterval + 'px';
                  }
                }
                else {
                  if (pageIndex) {
                    var leadPaddingDIV = <HTMLElementWithFlags>elem('div', {
                      className: 'panels-page-separator',
                      height: this._pageInterval + 'px'
                    }, this._scrollContent);
                    leadPaddingDIV.isLeadPaddingDIV = true;
                  }
        
                  page = {
                    leadPaddingDIV,
                    leadInterval: this._pageInterval,
                    height: this._pageHeight,
                    pageDIV: <HTMLElementWithFlags>elem('div', {
                      className: panelClass,
                      height: this._pageHeight + 'px'
                    }, this._scrollContent),
                    columns: []
                  };
        
                  page.pageDIV.isPageDIV = true;
                  this._pages.push(page);
                }
        
                var columnIndex = this._calcColumnIndex(i);
                var column = page.columns[columnIndex];
                if (column) {
                  if (columnIndex === this._columnsOnPage - 1 && page.columns.length > this._columnsOnPage) {
                    this._removeExcessColumns(page, this._columnsOnPage);
                  }
                  if (column.height !== this._pageHeight) {
                    column.height = this._pageHeight;
                    column.columnDIV.style.height = this._pageHeight + 'px';
                  }
                  if (column.width !== this._columnWidth) {
                    column.width = this._columnWidth;
                    column.columnDIV.style.width = this._columnWidth + 'px';
                  }
                }
                else {
                  column = {
                    height: this._pageHeight,
                    width: this._columnWidth,
                    columnDIV: <HTMLElementWithFlags>elem('div', {
                      className: 'panels-panel-column',
                      height: this._pageHeight + 'px',
                      width: this._columnWidth + 'px'
                    }, page.pageDIV),
                    entries: []
                  };
                  column.columnDIV.isColumnDIV = true;
                  page.columns.push(column);
                }
        
                var dentry = entries[i];
        
                var entryIndex = this._calcEntryIndex(i);
                var entry = column.entries[entryIndex];
                if (!entry) {
        
                  var dirfileClassName = dentry.flags & Panel.EntryFlags.Directory ? ' panels-entry-dir' : ' panels-entry-file';
        
                  var entryClassName =
                    'panels-entry' +
                    dirfileClassName +
                    (this._cursorEntryIndex === i ? ' panels-entry-current' + dirfileClassName + '-current' : '');
        
                  entry = {
                    name: dentry.name,
                    path: dentry.path,
                    flags: dentry.flags,
                    selectionFlags: this._cursorEntryIndex === i ? Panel.SelectionFlags.Current : 0,
                    entryDIV: <HTMLElementWithFlags>elem('div', {
                      className: entryClassName,
                      text: dentry.name,
                      height: this._metrics.windowMetrics.emHeight + 'px'
                    }, column.columnDIV)
                  };
        
                  entry.entryDIV.isEntryDIV = true;
        
                  column.entries.push(entry);
                }
                else {
                  var expectedSelectionFlags = this._cursorEntryIndex === i ? Panel.SelectionFlags.Current : 0;
        
                  if (entry.name !== dentry.name) {
                    entry.name = dentry.name;
                    setText(entry.entryDIV, dentry.name);
                  }
                  if (entry.path !== dentry.path) {
                    entry.path = dentry.path;
                  }
                  if (entry.flags !== dentry.flags || entry.selectionFlags !== expectedSelectionFlags) {
                    var dirfileClassName = dentry.flags & Panel.EntryFlags.Directory ? ' panels-entry-dir' : ' panels-entry-file';
        
                    var entryClassName =
                      'panels-entry' +
                      dirfileClassName +
                      (this._cursorEntryIndex === i ? ' panels-entry-current' + dirfileClassName + '-current' : '');
        
                    entry.entryDIV.className = entryClassName;
        
                    entry.flags = dentry.flags;
                    entry.selectionFlags = expectedSelectionFlags;
                  }
        
        
                  if (entryIndex === this._entriesInColumn - 1 && column.entries.length > this._entriesInColumn) {
                    this._removeExcessEntries(column, this._entriesInColumn);
                  }
        
                }
        
                this._entries.push(entry);
        
              }
        
              this._removeExcessPages(pageIndex + 1);
        
              var p = this._pages[pageIndex];
              this._removeExcessColumns(p, columnIndex + 1);
        
              var c = p.columns[columnIndex];
              this._removeExcessEntries(c, entryIndex + 1);
        
        
        
              var newOffset = this._calcEntryTopOffset(Math.max(0, this._cursorEntryIndex));
              if (this._nextRedrawScrollToCurrent) {
                this._nextRedrawScrollToCurrent = false;
                var maxScroll = newOffset - this._metrics.windowMetrics.emHeight*2;
                var minScroll = newOffset - this._metrics.hostHeight + this._metrics.windowMetrics.emHeight*3;
        
                var newScrollTop =
                    this._scrollTop < minScroll ? minScroll :
                		this._scrollTop > maxScroll ? maxScroll :
                		-1;
        
                if (newScrollTop >=0) {
                  //console.log('redraw: scroll to current [' + newScrollTop + ']');
                  this._host.scrollTop = newScrollTop
                }
              }
              else {
                var prevDistanceFromCenter = prevOffset - (this._scrollTop + this._scrollTopHeight / 2);
        
                var newScrollTop = newOffset - prevDistanceFromCenter - this._metrics.hostHeight / 2;
                //console.log({
                //  prevDistanceFromCenter, prevOffset, this_scrollTop: this._scrollTop, this_scrollTopHeight: this._scrollTopHeight,
                //  newOffset, this_metrics_hostHeight: this._metrics.hostHeight, newScrollTop
                //});
                //console.log('redraw: scroll to approximate prev. [' + newScrollTop + ']');
                this._host.scrollTop = newScrollTop;
              }
        
        
              this._redrawRequested = 0;
        
              // end of _redrawNow()
            }
        
        
        
          	private _removeExcessPages(expectedCount: number) {
              for (var i = this._pages.length - 1; i >= expectedCount; i--) {
                var p = this._pages[i];
                p.pageDIV.parentElement.removeChild(p.pageDIV);
                if (p.leadPaddingDIV)
                  p.leadPaddingDIV.parentElement.removeChild(p.leadPaddingDIV);
              }
        
              if (this._pages.length > expectedCount)
                this._pages = this._pages.slice(0, expectedCount);
            }
        
        
            private _removeExcessColumns(p: { columns: Panel.ColumnData[]; }, expectedCount: number) {
              for (var i = p.columns.length - 1; i >= expectedCount; i--) {
                var c = p.columns[i];
                c.columnDIV.parentElement.removeChild(c.columnDIV);
              }
        
              if (p.columns.length > expectedCount)
                p.columns = p.columns.slice(0, expectedCount);
            }
        
        
            private _removeExcessEntries(c: { entries: Panel.PageEntry[]; }, expectedCount: number) {
              for (var i = c.entries.length - 1; i >= expectedCount; i--) {
                var e = c.entries[i];
                e.entryDIV.parentElement.removeChild(e.entryDIV);
              }
        
              if (c.entries.length > expectedCount)
                c.entries = c.entries.slice(0, expectedCount);
            }
        
        
          	private _onscroll() {
              if (this._redrawRequested) return;
              this._scrollTop = this._host.scrollTop;
              this._scrollTopHeight = this._metrics.hostHeight;
              //console.log('onscroll ' + this._scrollTop);
            }
        
        
            private _calcPageIndex(indexOfEntry: number): number {
              return (indexOfEntry / (this._columnsOnPage * this._entriesInColumn)) | 0;
            }
        
          	private _calcColumnIndex(indexOfEntry: number) {
              return ((indexOfEntry / this._entriesInColumn) | 0) % this._columnsOnPage;
            }
        
          	private _calcEntryIndex(indexOfEntry: number) {
              return indexOfEntry % this._entriesInColumn;
            }
        
          	private _calcEntryTopOffset(indexOfEntry: number) {
              if (!this._metrics || !this._metrics.windowMetrics) return 0;
        
              var pageIndex = this._calcPageIndex(indexOfEntry);
              var entryIndex = this._calcEntryIndex(indexOfEntry);
              var offset =
                pageIndex * this._entriesInColumn * this._metrics.windowMetrics.emHeight + // whole pages
                Math.max(0, pageIndex - 1) * this._pageInterval + // inter-page spaces
                entryIndex * this._metrics.windowMetrics.emHeight; // distance from the top of the page
        
              return offset;
            }
          }
        
        	interface HTMLElementWithFlags extends HTMLElement {
            isScrollContent: boolean;
            isLeadPaddingDIV?: boolean;
            isPageDIV: boolean;
            isColumnDIV: boolean;
            isEntryDIV: boolean;
          }
        
          export module Panel {
        
            export interface Metrics {
              windowMetrics: CommanderShell.Metrics;
              hostWidth: number;
              hostHeight: number;
            }
        
            export interface DirectoryEntry {
              name: string;
              path: string;
              flags: EntryFlags;
            }
        
            export enum EntryFlags {
              Directory = 1
            }
        
            export interface PageData {
              leadPaddingDIV: HTMLElementWithFlags;
              pageDIV: HTMLElementWithFlags;
              columns: ColumnData[];
              height: number;
              leadInterval: number;
            }
        
            export interface ColumnData {
              columnDIV: HTMLElementWithFlags;
              entries: PageEntry[];
              height: number;
              width: number;
            }
        
            export interface PageEntry extends DirectoryEntry {
              entryDIV: HTMLElementWithFlags;
              selectionFlags: SelectionFlags;
            }
        
            export enum SelectionFlags {
              None = 0,
              Current = 1,
              Selected = 2
            }
        
          }
        
        }
      • TwoPanels.ts
        module shell.panels {
        
          var panelHMargin = 10;
          var panelVMargin = 5;
        
          export class TwoPanels {
        
            private _scrollHost: HTMLDivElement;
            private _scrollContent: HTMLDivElement;
        
            private _leftPanelHost: HTMLDivElement;
            private _rightPanelHost: HTMLDivElement;
        
            private _leftPanel: Panel;
            private _rightPanel: Panel;
        
            constructor(
              private _host: HTMLElement,
              leftPath: string,
              rightPath: string,
              private _drive: persistence.Drive) {
        
              this._scrollHost = <any>elem('div', { className: 'panels-scroll-host' }, this._host);
              this._scrollContent = <any>elem('div', { className: 'panels-scroll-content' }, this._scrollHost);
        
              this._leftPanelHost = <any>elem('div', { className: 'panels-panel panels-left-panel' }, this._scrollContent);
              this._rightPanelHost = <any>elem('div', { className: 'panels-panel panels-right-panel' }, this._scrollContent);
        
              var directoryService = driveDirectoryService(this._drive);
        
              this._leftPanel = new Panel(
                this._leftPanelHost,
                leftPath,
                directoryService);
        
              this._rightPanel = new Panel(
                this._rightPanelHost,
                rightPath,
                directoryService);
        
              this._leftPanel.activate();
              /*
              TODO: ensure focus stays with the text input at the bottom
              elem.on(this._leftPanel, 'mousedown', e=> {
                if (e.preventDefault)
                  e.preventDefault();
                return false;
              }); */
        
              on(this._leftPanelHost, 'click', (e: MouseEvent) => this._onclick(e));
              on(this._rightPanelHost, 'click', (e: MouseEvent) => this._onclick(e));
        
            }
        
            measure() {
            }
        
            arrange(metrics: CommanderShell.Metrics) {
        
              var contentWidth = 0;
        
              if (metrics.hostWidth < metrics.emWidth * 80 && metrics.hostWidth < metrics.hostHeight * 1) { 
                // flippable layout
                contentWidth = Math.max(metrics.hostWidth / 2, metrics.hostWidth * 2 - metrics.emWidth * 4);
              }
              else {
                // full layout
                contentWidth = metrics.hostWidth;
              }
        
              var bottomGap = Math.min(metrics.hostHeight / 3, metrics.emHeight * 5.5);
        
              this._scrollHost.style.width = metrics.hostWidth + 'px';
              var panelsHeight = metrics.hostHeight - bottomGap;
              this._scrollHost.style.height = panelsHeight + 'px';
        
              this._scrollContent.style.width = contentWidth + 'px';
              this._scrollContent.style.height = panelsHeight + 'px';
        
              var panelWidth = (contentWidth / 2 - 0.5) | 0;
        
              this._leftPanelHost.style.height = panelsHeight + 'px';
              this._leftPanelHost.style.width = panelWidth + 'px';
        
              this._rightPanelHost.style.height = panelsHeight + 'px';
              this._rightPanelHost.style.width = panelWidth + 'px';
        
              if (this._leftPanelHost.style.display !== 'none') {
                this._leftPanel.arrange({
                  windowMetrics: metrics,
                  hostWidth: panelWidth - panelHMargin * 2,
                  hostHeight: panelsHeight - panelVMargin * 2
                });
              }
        
              if (this._rightPanelHost.style.display !== 'none') {
                this._rightPanel.arrange({
                  windowMetrics: metrics,
                  hostWidth: panelWidth - panelHMargin * 2,
                  hostHeight: panelsHeight - panelVMargin * 2
                });
              }
            }
        
            isVisible() {
              return this._scrollHost.style.display !== 'none';
            }
        
            toggleVisibility() {
              this._scrollHost.style.display = this.isVisible() ? 'none' : 'block';
            }
        
            isLeftActive() {
              return this._leftPanel.isActive();
            }
        
            toggleActivePanel() {
              if (!this.isVisible()) return;
        
              var isLeftActive = this._leftPanel.isActive();
              this._getPanel(isLeftActive).deactivate();
              this._getPanel(!isLeftActive).activate();
            }
        
            temporarilyHidePanels(): () => void {
        
              var start = +new Date();
              var stayTime = 200;
              var fadeTime = 500;
              var opacity = 0.1;
              var applyOpacity = () => {
                this._scrollHost.style.opacity = <any>opacity;
                this._scrollHost.style.filter = 'alpha(opacity=' + (opacity * 100) + ')';
              };
              applyOpacity();
        
              var animateBack = () => {
                animateBack = () => { };
        
                var startFade = () => {
                  var fadeStart = +new Date();
                  var ani = setInterval(() => {
                    var passed = (Date.now ? Date.now() : +new Date()) - fadeStart;
                    if (passed > fadeTime) {
                      clearInterval(ani);
                      this._scrollHost.style.opacity = null;
                      this._scrollHost.style.filter = null;
                      return;
                    }
        
                    opacity = passed / fadeTime;
                    applyOpacity();
                  }, 1);
                };
        
                var sinceStart = +new Date() - start;
                if (sinceStart >= stayTime) {
                  startFade();
                }
                else {
                  setTimeout(startFade, fadeTime - sinceStart);
                }
              };
        
              return animateBack;
            }
        
            keydown(e: KeyboardEvent): boolean {
              switch (e.keyCode) {
                case 38:
                  return this._selectionGo(-1);
                case 40:
                  return this._selectionGo(+1);
                case 33:
                  return this._selectionGo(-100);
                case 34:
                  return this._selectionGo(+100);
                case 37:
                  return this._selectionGo(-10);
                case 39:
                  return this._selectionGo(+10);
                case 9:
                  this.toggleActivePanel();
                  return true;
                case 86: // U
                  if (e.ctrlKey || e.metaKey)
                    return this.togglePanelPaths();
                  break;
        
                case 112: // F1
                  if (e.ctrlKey || e.metaKey) {
                    return this.togglePartHidden(true);
                  }
                  break;
        
                case 113: // F2
                  if (e.ctrlKey || e.metaKey) {
                    return this.togglePartHidden(false);
                  }
                  break;
        
                case 13: // Enter
                  var activePa = this._getPanel(this.isLeftActive());
                  return activePa.navigateCursor();
        
                default:
                  if (e.ctrlKey) {
                    //console.log('ctrl ' + e.keyCode);
                  }
                  break;
              }
        
              return false;
            }
        
            togglePartHidden(leftPanel: boolean) {
              var togglePanelHost = this._getPanelHost(leftPanel);
              var oppositePanelHost = this._getPanelHost(!leftPanel);
        
              if (!this.isVisible()) {
                togglePanelHost.style.display = 'block';
                oppositePanelHost.style.display = 'none';
                if (this.isLeftActive() !== leftPanel)
                  this.toggleActivePanel();
                this.toggleVisibility();
              }
              else {
                if (togglePanelHost.style.display !== 'none') {
                  if (oppositePanelHost.style.display === 'none') {
                    togglePanelHost.style.display = 'block';
                    this.toggleVisibility();
                  }
                  else {
                    togglePanelHost.style.display = 'none';
                    if (this.isLeftActive() === leftPanel)
                      this.toggleActivePanel();
                  }
                }
                else {
                  togglePanelHost.style.display = 'block';
                }
              }
              return true;
            }
        
            togglePanelPaths() {
              console.log('Ctrl+U toggle is not implemented.');
              return false;
            }
        
            cursorPath() {
              if (!this.isVisible()) return null;
              var pan = this._getPanel(this.isLeftActive());
              return pan.cursorPath();
            }
        
            currentPath() {
              if (!this.isVisible()) return null;
              var pan = this._getPanel(this.isLeftActive());
              return pan.currentPath();
            }
        
            cursorOppositePath() {
              if (!this.isVisible()) return null;
              var pan = this._getPanel(!this.isLeftActive());
              return pan.cursorPath();
            }
        
            currentOppositePath() {
              if (!this.isVisible()) return null;
              var pan = this._getPanel(!this.isLeftActive());
              return pan.currentPath();
            }
        
            private _selectionGo(direction: number) {
              var panel = this._getPanel(this.isLeftActive()).cursorGo(direction);
              return true;
            }
        
            private _getPanel(left: boolean) {
              return left ? this._leftPanel : this._rightPanel;
            }
        
            private _getPanelHost(left: boolean) {
              return left ? this._leftPanelHost : this._rightPanelHost;
            }
        
            private _onclick(e: MouseEvent) {
              var isLeft = this._leftPanel.onclick(e);
              if (!isLeft && !this._rightPanel.onclick(e))
                return;
        
              if (isLeft === this.isLeftActive()) return;
        
              this.toggleActivePanel();
            }
        
          }
        
        }
      • driveDirectoryService.ts
        module shell.panels {
        
          export function driveDirectoryService(drive: persistence.Drive) {
        
            return path => {
              var pathPrefix = path === '/' ? path : path + '/';
              var result: Panel.DirectoryEntry[] = [];
              var resByName: { [name: string]: Panel.DirectoryEntry; } = {};
              var files = drive.files();
              for (var i = 0; i < files.length; i++) {
                var fi = files[i];
                if (fi.length < pathPrefix.length + 1) continue;
        
                if (fi.slice(0, pathPrefix.length) !== pathPrefix) continue;
        
                var name: string;
                var entryPath = fi;
                var isDirectory = false;
                var nextSlashPos = fi.indexOf('/', pathPrefix.length);
                if (nextSlashPos < 0) {
                  name = fi.slice(pathPrefix.length);
                }
                else {
                  name = fi.slice(pathPrefix.length, nextSlashPos);
                  entryPath = fi.slice(0, nextSlashPos);
                  isDirectory = true;
                }
        
                if (resByName.hasOwnProperty(name)) continue;
                var entry = { path: entryPath, name, flags: isDirectory ? Panel.EntryFlags.Directory : 0 };
                result.push(entry);
                resByName[name] = entry;
              }
              return result;
            };
        
          }
        
        }
      • panels.css
        .panels-scroll-host {
          position: absolute;
          left: 0; top: 0; width: 0; height: 0;
          overflow: auto;
          overflow-y: hidden;
          background: black;
          background: transparent;
        }
        
        .panels-scroll-content {
          width: 0; height: 0;   overflow: hidden;
        }
        
        .panels-panel {
          width: 0; height: 0;
          overflow: auto;
          overflow-x: hidden;
          background: rgba(4, 12, 64, 0.95) !important;
          background: navy;
          color: darkcyan;
          padding-top: 10px;
          padding-bottom: 10px;
          cursor: default;
        }
        
        .panels-panel * {
          cursor: default;
        }
        
        .panels-left-panel {
          float: left;
        }
        
        .panels-right-panel {
          float: right;
        }
        
        .panels-panel-page {
          clear: both;
        }
        
        .panels-page-separator {
          clear: both;
        }
        
        .panels-panel-column {
          float: left;
        }
        
        .panels-entry {
          padding-left: 10px;
          padding-right: 10px;
        }
        
        .panels-entry-dir {
          color: white;
        }
        
        .panels-panel-active .panels-entry-current {
          background: darkcyan;
        }
        
        .panels-panel-active .panels-entry-file-current {
          color: navy;
        }
        
        ::-webkit-scrollbar {
            width: 0.5em;
            height: 0.5em
        }
    • terminal
      • Terminal.ts
        module shell.terminal {
        
          export class Terminal {
        
            private _history: HTMLDivElement;
            private _historyContent: HTMLDivElement;
            private _prompt: HTMLDivElement;
            private _input: HTMLTextAreaElement;
        
            private _promptWidth = 0;
            private _historyContentHeight = 0;
            private _hostMetrics: CommanderShell.Metrics = null;
        
            constructor(private _host: HTMLElement, private _repl: noapi.HostedProcess) {
              this._history = <any>elem('div', { className: 'terminal-history' }, this._host);
              this._historyContent = <any>elem('pre', {
                className: 'terminal-history-content',
                text: 'Hello world from mini-shell\n\nVersion 0.7s\n'+shell.buildMessage+'\nOleg Mihailik\n\nPlease be careful.'
              }, this._history);
        
              this._prompt = <any>elem('div', { className: 'terminal-prompt', text: '>' }, this._host);
        
              this._input = <any>elem('textarea', { className: 'terminal-input', autofocus: true }, this._host);
        
              setTimeout(() => this._input.focus(), 1);
        
            }
        
            log(args: any[]) {
              log(args, this._historyContent);
        
              if (this._hostMetrics) {
                this.measure();
                this.arrange(this._hostMetrics);
              }
            }
        
            hasInput() {
              return !!this._getInput();
            }
        
          	private _getInput() {
              return (this._input.value || '').replace(/[\r\n]/g, '');
            }
        
        
            focus() {
              this._input.focus();
            }
        
          	temporarilyHidePrompt(replacementText: string): () => void {
              // TODO: hide prompt, display replacement text instead
              return () => { };
            }
        
            measure() {
              this._promptWidth = this._prompt.offsetWidth;
              this._historyContentHeight = this._historyContent.offsetHeight;
            }
        
            arrange(metrics: CommanderShell.Metrics) {
        
              this._hostMetrics = metrics;
        
              this._history.style.width = metrics.hostWidth + 'px';
        
              this._history.style.bottom = (metrics.emHeight * 2.2) + 'px';
              if (metrics.hostHeight - metrics.emHeight * 2.2 > this._historyContentHeight) {
                this._history.style.height = this._historyContentHeight + 'px';
              }
              else {
                this._history.style.height = (metrics.hostHeight - metrics.emHeight * 2.2) + 'px';
                this._history.scrollTop = this._historyContentHeight - (metrics.hostHeight - metrics.emHeight * 2);
              }
              this._input.style.left = this._promptWidth + 'px';
              this._input.style.width = (metrics.hostWidth - this._promptWidth) + 'px';
            }
        
          	clearInput() {
              setTimeout(() => {
                var cleanInput = this._getInput();
                if (this._input.value !== cleanInput) {
                  this._input.value = cleanInput;
                }
              }, 10);
            }
        
            keydown(e: KeyboardEvent, cursorPath: string) {
              if (e.keyCode === 38) {
                // TODO history
              }
              else if (e.keyCode === 13) {
                var code = this._getInput();
        
                if (code) {
                  if (code.slice(-2) === '\r\n')
                    code = code.slice(0, code.length - 2);
                  this._input.value = '';
                  elem('div', {
                    text: code,
                    color: 'gray'
                  }, this._historyContent);
        
                  this._evalAndLogResults(code);
                  return true;
                }
                else {
                  return false;
                }
              }
            }
        
            private _evalAndLogResults(code: string) {
        
              var result;
              try {
                result = this._repl.eval(code);
              }
              catch (error) {
                elem('div', {
                  text: error && error.stack ? error.stack : error,
                  color: 'red'
                }, this._historyContent);
                if (this._hostMetrics) {
                  this.measure();
                  this.arrange(this._hostMetrics);
                }
                return;
              }
        
              this.log([result]);
            }
        
        
          }
        
        }
      • log.ts
        module shell.terminal {
        
          export function log(args: any[], historyContent: HTMLElement) {
            var output = elem('div', historyContent);
            for (var i = 0; i < args.length; i++) {
              if (i > 0)
                elem('span', { text: ' ' }, output);
              if (args[i] === null) {
                elem('span', { text: 'null', color: 'green' }, output);
              }
              else {
                logAppendObj(args[i], <any>output, 0);
              }
            }
          }
        }
      • logAppendObj.ts
        module shell.terminal {
        
          export function logAppendObj(obj: any, output: HTMLDivElement, level: number) {
            switch (typeof obj) {
              case 'number':
              case 'boolean':
                elem('span', { text: obj, color: 'green' }, output);
                break;
        
              case 'undefined':
                elem('span', { text: 'undefined', color: 'green', opacity: 0.5 }, output);
                break;
        
              case 'function':
                var funContainer = elem('span', output);
                var funFunction = elem('span', { text: 'function ', color: 'silver', opacity: 0.5 }, funContainer);
                var funName = elem('span', { text: obj.name, color: 'cornflowerblue', fontWeight: 'bold' }, funContainer);
                funContainer.title = obj;
                break;
        
              case 'string':
                var strContainer = elem('span', output);
                elem('span', { text: '"', color: 'tomato' }, strContainer);
                elem('span', { text: obj, color: 'tomato', opacity: 0.5 }, strContainer);
                elem('span', { text: '"', color: 'tomato' }, strContainer);
                break;
        
              default:
                if (obj === null) {
                  elem('span', { text: 'null', color: 'green', opacity: 0.5 }, output);
                  break;
                }
        
                if (typeof obj.getFullYear === 'function' && typeof obj.getTime === 'function' && typeof obj.constructor.parse === 'function') {
                  elem('span', { text: 'Date(', color: 'green', opacity: 0.5 }, output);
                  elem('span', { text: obj, color: 'green' }, output);
                  elem('span', { text: ')', color: 'green', opacity: 0.5 }, output);
                  break;
                }
        
                if (obj.constructor && obj.constructor.name !== 'Object' && obj.constructor.name !== 'Array') {
                  elem('span', { text: obj.constructor.name, color: 'cornflowerblue' }, output);
                  if (obj.constructor.prototype && obj.constructor.prototype.constructor
                    && obj.constructor.prototype.constructor.name
                    && obj.constructor.prototype.constructor.name !== 'Object' && obj.constructor.prototype.constructor.name !== 'Array'
                    && obj.constructor.prototype.constructor.name !== obj.constructor.name)
                    elem('span', { text: ':' + obj.constructor.prototype.constructor.name, color: 'cornflowerblue', opacity: 0.5 }, output);
                  elem('span', output);
                }
        
                if (typeof obj.length === 'number' && obj.length >= 0) {
                  elem('span', { text: '[', color: 'white' }, output);
                  if (level > 1) {
                    elem('span', { text: '...', color: 'silver' }, output);
                    // TODO: handle click
                  }
                  else {
                    for (var i = 0; i < obj.length; i++) {
                      if (i > 0) elem('span', { text: ', ', color: 'gray' }, output);
                      if (typeof obj[i] !== 'undefined')
                        logAppendObj(obj[i], output, level + 1);
                    }
                  }
                  elem('span', { text: ']', color: 'white' }, output);
                }
                else if (obj.createElement + '' === document.createElement + '' && obj.getElementById + '' === document.getElementById + '' && 'title' in obj) {
                  elem('span', { text: '#document ' + obj.title, color: 'green' }, output);
                }
                else if (obj.setInterval + '' === window.setInterval + '' && obj.setTimeout + '' === window.setTimeout + '' && 'location' in obj) {
                  elem('span', { text: '#window ' + obj.location, color: 'green' }, output);
                }
                else if (typeof obj.tagName === 'string' && obj.getElementsByTagName + '' === document.body.getElementsByTagName + '') {
                  elem('span', { text: '<' + obj.tagName + '>', color: 'green' }, output);
                }
                else if (obj + '' !== '[Object]') {
                  elem('span', { text: '{', color: 'cornflowerblue' }, output);
                  if (level > 1) {
                    elem('span', { text: '...', color: 'cornflowerblue', opacity: 0.5 }, output);
                    // TODO: handle click
                  }
                  else {
                    var first = true;
                    var hadMessage = false;
                    for (var k in obj) {
                      if (obj.hasOwnProperty && !obj.hasOwnProperty(k)) continue;
                      if (first) {
                        first = false;
                      }
                      else {
                        elem('span', { text: ', ', color: 'cornflowerblue', opacity: 0.3 }, output);
                        first = false;
                      }
                      elem('span', { text: k, color: 'cornflowerblue', fontWeight: 'bold' }, output);
                      elem('span', { text: ': ', color: 'cornflowerblue', opacity: 0.5 }, output);
                      logAppendObj(obj[k], output, level + 1);
                      if (k === 'message') hadMessage = true;
                    }
                    if (typeof obj.message === 'string' && ! hadMessage) {
                      elem('span', { text: 'message', color: 'tomato', fontWeight: 'bold' }, output);
                      elem('span', { text: ': ', color: 'tomato', opacity: 0.5 }, output);
                      elem('span', { text: obj.message, color: 'tomato' }, output);
                    }
                  }
                  elem('span', { text: '}', color: 'cornflowerblue' }, output);
                }
                else {
                  elem('span', { text: obj, color: 'cornflowerblue' }, output);
                }
                break;
            }
          }
        
        }
      • terminal.css
        .terminal-history {
          position: absolute;
          left: 0; bottom: 1.6em;
          width: 100%; height: 0;
          overflow-y: auto;
          overflow-x: hidden;
        }
        
        .terminal-history-content {
          margin: 0; padding: 0;
        }
        
        .terminal-prompt {
          position: absolute;
          left: 0; bottom: 1.5em;
          height: 1em;
        }
        
        .terminal-input {
          position: absolute;
          left: 0; bottom: 1.5em;
          width: 0; height: 1em;
          font: inherit;
          border: none;
          background: transparent;
          color: silver;
          outline: none;
          resize: none;
          overflow: hidden;
        }
    • CommanderShell.ts
      module shell {
      
        export class CommanderShell {
      
          private _metricElem: HTMLDivElement;
          private _twoPanels: panels.TwoPanels;
          private _terminal: terminal.Terminal;
      
          private _metrics: CommanderShell.Metrics = {
            hostWidth: 0,
            hostHeight: 0,
            emWidth: 0,
            emHeight: 0
          };
      
          private _onsizechangedTimeout: number = 0;
          private _repl: noapi.HostedProcess;
          private _replAlive: Function;
      
          private _editor: editor.Editor = null;
      
          private _fnKeys: HTMLElement[] = [];
      
          constructor(private _host: HTMLElement, private _drive: persistence.Drive) {
      
            this._repl = new noapi.HostedProcess({
              window: window,
              drive: this._drive,
              scriptPath: '/node_modules/repl.js',
              console: { log: (...args: any[]) => this._terminal.log(args) }
            });
            this._enhanceNoprocess(this._repl);
            this._replAlive = this._repl.keepAlive();
      
            elem(this._host, {
              background: 'black',
              color: 'silver'
            });
      
            this._metricElem = <any>elem('div', {
              position: 'absolute',
              opacity: 0,
              left: '-200px', top: '-200px',
              wdith: 'auto', height: 'auto'
            }, document.body);
            elem('div', { text: 'MMMMMMMM' }, this._metricElem);
            elem('div', { text: 'MMMMMMMM' }, this._metricElem);
            elem('div', { text: 'MMMMMMMM' }, this._metricElem);
            elem('div', { text: 'MMMMMMMM' }, this._metricElem);
            elem('div', { text: 'MMMMMMMM' }, this._metricElem);
            elem('div', { text: 'MMMMMMMM' }, this._metricElem);
            elem('div', { text: 'MMMMMMMM' }, this._metricElem);
            elem('div', { text: 'MMMMMMMM' }, this._metricElem);
      
            this._terminal = new terminal.Terminal(this._host, this._repl);
            this._twoPanels = new panels.TwoPanels(this._host, '/', '/src', this._drive);
      
            var fnKeyActions = [null, 'Help', '<None>', 'View', 'Edit', 'Copy', 'Move', 'MkDir', 'Delete', 'Options', 'Save'];
            for (var i = 1; i <= 10; i++) {
              var fnKeyText = elem('div', {
                position: 'absolute', bottom: '0',
                whiteSpace: 'nowrap',
                cursor: 'pointer'
              }, this._host);
              var keyName = (i === 1 ? 'F1' : '' + i);
              elem('span', { background: 'black', color: 'gray', text: keyName + ' ' }, fnKeyText);
              elem('span', { background: 'gray', color: 'black', text: fnKeyActions[i] }, fnKeyText);
              this._fnKeys.push(fnKeyText);
            }
      
            on(this._fnKeys[4 - 1], 'click', () => {
              var cursorPath = this._twoPanels.cursorPath();
              this._openEditor(cursorPath);
            });
            on(this._fnKeys[5 - 1], 'click', () => {
              this._copyCommand();
              return true;
            });
            on(this._fnKeys[6 - 1], 'click', () => {
              this._moveCommand();
              return true;
            });
            on(this._fnKeys[7 - 1], 'click', () => {
              this._mkdirCommand();
              return true;
            });
            on(this._fnKeys[8 - 1], 'click', () => {
              this._removeCommand();
              return true;
            });
      
            on(this._fnKeys[10 - 1], 'click', () => {
              this._exportAllHTML();
            });
      
            var resizeMod = require('resize');
            resizeMod.on(winMetrics => {
              this._metrics.hostWidth = winMetrics.windowWidth;
              this._metrics.hostHeight = winMetrics.windowHeight;
              this.measure();
              this.arrange();
            });
      
            this._metrics.hostWidth = document.body.offsetWidth;
            this._metrics.hostHeight = document.body.offsetHeight;
      
            this.measure();
            this.arrange();
      
            on(this._host, 'keydown', e => this._keydown(<any>e));
      
            var _glob = (function() { return this; })();
            var applyConsole = (glob) => {
              if (glob.console) {
                var _oldLog: Function = glob.console.log;
                var term = this._terminal;
                console.log = function() {
                  var args = [];
                  for (var i = 0; i < arguments.length; i++) {
                    args.push(arguments[i]);
                  }
                  term.log(args);
                  if (typeof _oldLog === 'function')
                    _oldLog.apply(glob.console, args);
                };
              }
              else {
                var term = this._terminal;
                glob.console = {
                  log: function() {
                    var args = [];
                    for (var i = 0; i < arguments.length; i++) {
                      args.push(arguments[i]);
                    }
                    term.log(args);
                  }
                };
              }
            };
      
            applyConsole(_glob);
            applyConsole(window);
      
          }
      
          measure() {
            this._metrics.emWidth = this._metricElem.offsetWidth/8;
            this._metrics.emHeight = this._metricElem.offsetHeight/8;
            this._twoPanels.measure();
            this._terminal.measure();
            //this._editor.measure();
          }
      
          arrange() {
            this._host.style.width = this._metrics.hostWidth + 'px';
            this._host.style.height = this._metrics.hostHeight + 'px';
            this._twoPanels.arrange(this._metrics);
            this._terminal.arrange(this._metrics);
            //this._editor.arrange();
      
            var keySize = ((this._metrics.hostWidth / 10) | 0);
            for (var i = 0; i < this._fnKeys.length; i++) {
              this._fnKeys[i].style.left = (i * keySize) + 'px';
              this._fnKeys[i].style.width = keySize + 'px';
            }
          }
      
          private _keydown(e: KeyboardEvent) {
            var res = this._keydownCore(e);
            if (res) {
              if (e.preventDefault)
                e.preventDefault();
            }
            return res;
          }
      
          private _keydownCore(e: KeyboardEvent) {
            if (this._editor) {
              if (e.keyCode === 27) {
                this._closeEditor();
                return true;
              }
              return;
            }
      
            if (e.keyCode === 27 && !e.altKey && !e.shiftKey && !e.ctrlKey && !e.metaKey) {
              this._twoPanels.toggleVisibility();
              return true;
            }
      
            if (e.keyCode === 13)
              this._terminal.clearInput();
      
            if ((e.keyCode === 13 && this._twoPanels.isVisible() && !this._terminal.hasInput())
              || (e.keyCode !== 13)) {
              if (this._twoPanels.keydown(e)) return true;
            }
      
            var cursorPath = this._twoPanels.cursorPath();
      
            this._terminal.focus();
            if (this._terminal.keydown(e, cursorPath)) return true;
      
            if (e.keyCode === 13)
              return this._execute(cursorPath, null);
      
            //if (e.keyCode < 32 || e.keyCode > 126) {
            //	this._terminal.log('CommanderShell::keydown ' + e.yCode);
            //}
      
            if (e.keyCode === 115) { // F4
              var editorPath = cursorPath;
              if (e.shiftKey) {
                editorPath = prompt('Edit file:', editorPath);
                if (!editorPath) return;
              }
              this._openEditor(editorPath);
              return true;
            }
      
            if (e.keyCode === 116) { // F5
              this._copyCommand();
              return true;
            }
      
            if (e.keyCode === 117) { // F6
              this._moveCommand();
              return true;
            }
      
            if (e.keyCode === 118) { // F7
              this._mkdirCommand();
              return true;
            }
      
            if (e.keyCode === 119) { // F8
              this._removeCommand();
              return true;
            }
      
            if (e.keyCode === 121) { // F10
              this._exportAllHTML();
              return true;
            }
      
            if (e.ctrlKey || e.altKey || e.metaKey) {
              this._terminal.log(['CommanderShell::keydown ', e.keyCode]);
            }
          }
      
          private _getFilesFor(path: string): string[] {
            var fileResult: string[] = [];
            var allFiles = this._drive.files();
            for (var i = 0; i < allFiles.length; i++) {
              var f = allFiles[i];
              if (f.slice(0, path.length) !== path) continue;
              if (f === path || f.slice(path.length, path.length + 1) === '/')
                fileResult.push(f);
            }
            return fileResult;
          }
      
          private _copyCommand() {
            var cursorPath = this._twoPanels.cursorPath();
            var currentOppositePath = this._twoPanels.currentOppositePath();
            if (!cursorPath || !currentOppositePath || cursorPath === '/') return;
      
            var filesToCopy: string[] = this._getFilesFor(cursorPath);
      
            var targetDir = prompt('Copy ' + filesToCopy.length + ' files from\n   "' + cursorPath + '"\n  to', currentOppositePath);
            if (!targetDir) return;
      
            var normTargetDir = targetDir;
      
            if (filesToCopy.length === 1 && filesToCopy[0] === cursorPath && normTargetDir.slice(-1) !== '/') {
              var content = this._drive.read(filesToCopy[0]);
              this._drive.write(normTargetDir, content);
            }
            else {
              if (normTargetDir.slice(-1) != '/') normTargetDir += '/';
              var baseDir = cursorPath.slice(0, cursorPath.lastIndexOf('/') + 1);
      
              for (var i = 0; i < filesToCopy.length; i++) {
                var content = this._drive.read(filesToCopy[i]);
                var newPath =
                  normTargetDir +
                  filesToCopy[i].slice(baseDir.length);
                this._drive.write(newPath, content);
              }
            }
            this.measure();
            this.arrange();
          }
      
          private _moveCommand() {
            var cursorPath = this._twoPanels.cursorPath();
            var currentOppositePath = this._twoPanels.currentOppositePath();
            if (!cursorPath || !currentOppositePath || cursorPath === '/') return;
      
            var filesToCopy: string[] = this._getFilesFor(cursorPath);
      
            var targetDir = prompt('Move/rename ' + filesToCopy.length + ' files from\n   "' + cursorPath + '"\n  to', currentOppositePath);
            if (!targetDir) return;
      
            var normTargetDir = targetDir;
      
            if (filesToCopy.length === 1 && filesToCopy[0] === cursorPath && normTargetDir.slice(-1) !== '/') {
              var content = this._drive.read(filesToCopy[0]);
              this._drive.write(normTargetDir, content);
              this._drive.write(filesToCopy[0], null);
            }
            else {
              if (normTargetDir.slice(-1) !== '/') normTargetDir += '/';
              var baseDir = cursorPath.slice(0, cursorPath.lastIndexOf('/') + 1);
      
              for (var i = 0; i < filesToCopy.length; i++) {
                var content = this._drive.read(filesToCopy[i]);
                var newPath =
                  normTargetDir +
                  filesToCopy[i].slice(baseDir.length);
                this._drive.write(newPath, content);
                this._drive.write(filesToCopy[i], null);
              }
            }
            this.measure();
            this.arrange();
      
          }
      
          private _mkdirCommand() {
            var dir = prompt('Make directory: ');
            if (!dir || dir === '/') return;
      
            var dirPath = dir;
            if (dir.slice(0, 1) !== '/') {
              dirPath = this._twoPanels.currentPath() + '/' + dirPath;
              if (dirPath.slice(0, 2) === '//') dirPath = dirPath.slice(1);
            }
      
            if (dirPath.slice(-1) === '/')
              dirPath = dirPath.slice(0, dirPath.length - 1);
      
            var matchFiles = this._getFilesFor(dirPath);
            if (matchFiles.length) return;
      
            this._drive.write(dirPath + '/', '');
            this.measure();
            this.arrange();
          }
      
          private _removeCommand() {
            var cursorPath = this._twoPanels.cursorPath();
            if (!cursorPath || cursorPath === '/') return;
      
            var filesToRemove: string[] = this._getFilesFor(cursorPath);
      
            if (!confirm('Remove ' + filesToRemove.length + ' files from\n   "' + cursorPath + '"?')) return;
      
            for (var i = 0; i < filesToRemove.length; i++) {
              this._drive.write(filesToRemove[i], null);
            }
            this.measure();
            this.arrange();
          }
      
          private _closeEditor() {
            var newText = this._editor.getText();
            var cursorPath = this._twoPanels.cursorPath();
            var oldText = this._drive.read(cursorPath);
            if (newText !== oldText) {
              if (confirm('File was changed: ' + cursorPath + ', save before exit?'))
                this._drive.write(cursorPath, newText);
            }
            this._editor.close();
            this._editor = null;
            this.measure();
            this.arrange();
          }
      
          private _openEditor(cursorPath: string) {
            if (cursorPath) {
              var text = this._drive.read(cursorPath);
              if (typeof text === 'string') {
                this._terminal.log(['@edit ', cursorPath]);
                this._editor = new editor.Editor(this._host, cursorPath, text);
                setTimeout(() => {
                  if (this._editor) this._editor.focus();
                }, 1);
              }
              else {
                this._terminal.log(['text at ', cursorPath, ' is ', text]);
              }
            }
            else {
              this._terminal.log(['cursorPath = ', cursorPath]);
            }
          }
      
          private _exportAllHTML() {
            var window = require('nowindow');
            var document = window.document;
      
            this._terminal.log(['@save']);
            var filename = saveFileName();
            exportBlob(filename, ['<!doctype html>\n', document.documentElement.outerHTML]);
      
            function exportBlob(filename: string, textChunks: string[]) {
              try {
                var blob: Blob = new (<any>Blob)(textChunks, { type: 'application/octet-stream' });
              }
              catch (blobError) {
                exportDocumentWrite(filename, textChunks.join(''));
                return;
              }
      
              exportBlobHTML5(filename, blob);
            }
      
            function exportBlobHTML5(filename, blob: Blob) {
              var url = URL.createObjectURL(blob);
              var a = document.createElement('a');
              a.href = url;
              a.setAttribute('download', filename);
              try {
                // safer save method, supposed to work with FireFox
                var evt = document.createEvent("MouseEvents");
                (<any>evt).initMouseEvent("click", true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
                a.dispatchEvent(evt);
              }
              catch (e) {
                a.click();
              }
            }
      
            function exportDocumentWrite(filename: string, content: string) {
              var win = document.createElement('iframe');
              win.style.width = '100px';
              win.style.height = '100px';
              win.style.display = 'none';
              document.body.appendChild(win);
      
              setTimeout(() => {
                var doc = win.contentDocument || (<any>win).document;
                doc.open();
                doc.write(content);
                doc.close();
      
                doc.execCommand('SaveAs', null, filename);
              }, 200);
      
            }
      
            function saveFileName() {
      
              if (window.location.protocol.toLowerCase() === 'blob:')
                return 'mi-save.html';
      
              var urlParts = window.location.pathname.split('/');
              var currentFileName = decodeURI(urlParts[urlParts.length - 1]);
              var lastDot = currentFileName.indexOf('.');
              if (lastDot > 0) {
                currentFileName = currentFileName.slice(0, lastDot) + '.html';
              }
              else {
                currentFileName += '.html';
              }
              return currentFileName;
            }
          }
      
          private _enhanceNoprocess(nopro: noapi.HostedProcess) {
            nopro.coreModules['nodrive'] = this._drive;
            nopro.coreModules['nowindow'] = window;
          }
      
          private _execute(cursorPath: string, callback: Function) {
      
            if (/\.js$/.test(cursorPath)) {
              var text = this._drive.read(cursorPath);
              if (typeof text !== 'undefined' && text !== null) {
                this._terminal.log(['@node ' + cursorPath]);
                var ani = this._twoPanels.temporarilyHidePanels();
      
                setTimeout(() => {
                  try {
                    var proc = new noapi.HostedProcess({
                      window: window,
                      drive: this._drive,
                      scriptPath: cursorPath,
                      console: { log: (...args: any[]) => this._terminal.log(args) }
                    });
                    this._enhanceNoprocess(proc);
                    var result = proc.eval(text);
                    if (typeof proc.exitCode == 'number')
                      result = proc.exitCode;
                    else
                      result = proc.mainModule.exports;
                  }
                  catch (error) {
                    result = error;
                  }
                  ani();
                  this._terminal.log([result]);
                },
                  1);
      
                return true;
              }
            }
            else if (/\.ts$/.test(cursorPath)) {
              var text = this._drive.read('/src/typescript/tsc.js');
              if (typeof text !== 'undefined' && text !== null) {
                this._terminal.log(['@tsc ' + cursorPath]);
                var ani = this._twoPanels.temporarilyHidePanels();
                setTimeout(() => {
                  try {
                    var proc = new noapi.HostedProcess({
                      window: window,
                      drive: this._drive,
                      scriptPath: '/src/typescript/tsc.js',
                      argv: ['node', '/src/typescript/tsc.js', cursorPath],
                      console: { log: (...args: any[]) => this._terminal.log(args) }
                    });
                    this._enhanceNoprocess(proc);
                    setTimeout(() => {
                      if (!finishedOK) {
                        var compileTime = +new Date() - start;
                        this._terminal.log(['Compilation seems to have failed after ' + compileTime / 1000 + ' sec.']);
                        ani();
                      }
                    }, 100);
                    var start = +new Date();
                    this._terminal.log(['... started at ' + (new Date())]);
                    var result = proc.eval(text);
                    this._terminal.log(['...finished at ' + (new Date())]);
                    if (typeof proc.exitCode == 'number')
                      result = proc.exitCode;
                    else
                      result = proc.mainModule.exports;
                    this._terminal.log([result]);
                  }
                  catch (error) {
                    this._terminal.log([error]);
                  }
                  var finishedOK = true;
                  ani();
                }, 1);
                return true;
              }
            }
            else if (/.html$/.test(cursorPath)) {
              this._terminal.log(['@build ' + cursorPath]);
              var ani = this._twoPanels.temporarilyHidePanels();
              setTimeout(() => {
      
                var htmlTemplate = this._drive.read(cursorPath);
      
                var blankWindow = window.open('', '_blank' + (+new Date()));
      
                var pollUntil = (+new Date()) + 1000;
      
                while (+new Date() < pollUntil) {
                  try {
                    var blankWindowDoc = blankWindow.document;
                  }
                  catch (error) { }
                }
      
                if (!blankWindowDoc) {
                  alert('Cannot open a window to host the built document');
                  ani();
                  return;
                }
      
                blankWindow.document.open();
                blankWindow.document.write([
                  '<html><title>Building ' + cursorPath + '...</title>',
                  '<style>',
                  'html, body { background: black; color: greenyellow; }',
                  'h2 { font-weight: 100; width: 40%; position: fixed; font-size: 200%; }',
                  'pre { width: 50%; padding-left: 50%; opacity: 1; transition: opacity 1s; }',
                  '</style>',
                  '<h2>Building ' + cursorPath + '</h2>',
                  '<' + 's' + 'cript>',
                  'var textContentProp = "textContent" in document.createElement("pre") ? "textContent" : "innerText";',
                  'var lastLogElem;',
                  'function log(text) {',
                  '  var logElem = document.createElement("pre");',
                  '  logElem[textContentProp]=text;',
                  '  document.body.appendChild(logElem);',
                  '  logElem.scrollIntoView();',
                  '  if (lastLogElem) {',
                  '    lastLogElem.style.opacity = 0.5;',
                  '  }',
                  '  lastLogElem = logElem;',
                  '}',
                  '<' + '/' + 's' + 'cript>'].join('\n'));
                blankWindow.document.close();
      
                var buildScope = {
                  embedFile: (file: string) => this._drive.read(file)
                };
      
                try {
                  build.processTemplate(
                    htmlTemplate,
                    [buildScope],
                    txt => {
                      this._terminal.log([txt]);
                      (<any>blankWindow).log(txt);
                    },
                    (error, result) => {
                      if (error) {
                        this._terminal.log([error]);
                        ani();
                        return;
                      }
      
                      try {
                        var blob = new Blob([result], { type: 'text/html' });
                        var url = URL.createObjectURL(blob);
                        blankWindow.location.replace(url);
                      }
                      catch (blobError) {
                        blankWindow.document.open();
                        blankWindow.document.write(result);
                        blankWindow.document.close();
                      }
      
                      ani();
      
                    });
                }
                catch (errorProcessTemplate) {
                  ani();
                  this._terminal.log([errorProcessTemplate]);
                }
              }, 1);
            }
            else {
              var ani = this._twoPanels.temporarilyHidePanels();
              this._terminal.log(['@type ' + cursorPath]);
              this._terminal.log([this._drive.read(cursorPath)]);
              ani();
            }
          }
      
        }
      
        export module CommanderShell {
      
          export interface Metrics {
            hostWidth: number;
            hostHeight: number;
            emWidth: number;
            emHeight: number;
          }
      
        }
      
      }
    • keys.ts
      module shell.keys {
      
      }
    • layout.ts
      module shell.layout {
      
        // initialize with roughly-arbitrary values
        export var windowWidth = 600;
        export var windowHeight = 400;
        export var emWidth = 18;
        export var emHeight = 28;
      
        export function update() {
          // TODO: queu on timer
        }
      
        export module update {
      
          export function now() {
            // TODO: stop timer, update layout
          }
      
          export function next(callback: Function) {
            // TODO: add to run-once list of callbacks
          }
      
          export function on(callback: Function) {
            // TODO: add to every-time list of callbacks
          }
      
          export function off(callback: Function) {
            // TODO: remove from every-time list of callbacks
          }
        }
      }
    • start.ts
      declare var require;
      
      module shell {
      
        export var buildTime: number;
        export var buildMessage: string;
      
        export function start() {
          var drive = require('nodrive');
          var parentWin = require('nowindow');
          parentWin.document.body.background = 'black';
          if (parentWin.document.parentElement)
          	parentWin.document.parentElement.body.background = 'black';
      
          document.body.style.overflow = 'hidden';
          document.body.parentElement.style.overflow = 'hidden';
      
          var commander = new CommanderShell(document.body, drive);
      
      }
      
      }
  • typescript
    • lib.d.ts
      /*! *****************************************************************************
      Copyright (c) Microsoft Corporation. All rights reserved. 
      Licensed under the Apache License, Version 2.0 (the "License"); you may not use
      this file except in compliance with the License. You may obtain a copy of the
      License at http://www.apache.org/licenses/LICENSE-2.0  
       
      THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
      KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
      WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, 
      MERCHANTABLITY OR NON-INFRINGEMENT. 
       
      See the Apache Version 2.0 License for specific language governing permissions
      and limitations under the License.
      ***************************************************************************** */
      
      /// <reference no-default-lib="true"/>
      
      /////////////////////////////
      /// ECMAScript APIs
      /////////////////////////////
      
      declare var NaN: number;
      declare var Infinity: number;
      
      /**
        * Evaluates JavaScript code and executes it. 
        * @param x A String value that contains valid JavaScript code.
        */
      declare function eval(x: string): any;
      
      /**
        * Converts A string to an integer.
        * @param s A string to convert into a number.
        * @param radix A value between 2 and 36 that specifies the base of the number in numString. 
        * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.
        * All other strings are considered decimal.
        */
      declare function parseInt(s: string, radix?: number): number;
      
      /**
        * Converts a string to a floating-point number. 
        * @param string A string that contains a floating-point number. 
        */
      declare function parseFloat(string: string): number;
      
      /**
        * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a number). 
        * @param number A numeric value.
        */
      declare function isNaN(number: number): boolean;
      
      /** 
        * Determines whether a supplied number is finite.
        * @param number Any numeric value.
        */
      declare function isFinite(number: number): boolean;
      
      /**
        * Gets the unencoded version of an encoded Uniform Resource Identifier (URI).
        * @param encodedURI A value representing an encoded URI.
        */
      declare function decodeURI(encodedURI: string): string;
      
      /**
        * Gets the unencoded version of an encoded component of a Uniform Resource Identifier (URI).
        * @param encodedURIComponent A value representing an encoded URI component.
        */
      declare function decodeURIComponent(encodedURIComponent: string): string;
      
      /** 
        * Encodes a text string as a valid Uniform Resource Identifier (URI)
        * @param uri A value representing an encoded URI.
        */
      declare function encodeURI(uri: string): string;
      
      /**
        * Encodes a text string as a valid component of a Uniform Resource Identifier (URI).
        * @param uriComponent A value representing an encoded URI component.
        */
      declare function encodeURIComponent(uriComponent: string): string;
      
      interface PropertyDescriptor {
          configurable?: boolean;
          enumerable?: boolean;
          value?: any;
          writable?: boolean;
          get? (): any;
          set? (v: any): void;
      }
      
      interface PropertyDescriptorMap {
          [s: string]: PropertyDescriptor;
      }
      
      interface Object {
          /** The initial value of Object.prototype.constructor is the standard built-in Object constructor. */
          constructor: Function;
      
          /** Returns a string representation of an object. */
          toString(): string;
      
          /** Returns a date converted to a string using the current locale. */
          toLocaleString(): string;
      
          /** Returns the primitive value of the specified object. */
          valueOf(): Object;
      
          /**
            * Determines whether an object has a property with the specified name. 
            * @param v A property name.
            */
          hasOwnProperty(v: string): boolean;
      
          /**
            * Determines whether an object exists in another object's prototype chain. 
            * @param v Another object whose prototype chain is to be checked.
            */
          isPrototypeOf(v: Object): boolean;
      
          /** 
            * Determines whether a specified property is enumerable.
            * @param v A property name.
            */
          propertyIsEnumerable(v: string): boolean;
      }
      
      interface ObjectConstructor {
          new (value?: any): Object;
          (): any;
          (value: any): any;
      
          /** A reference to the prototype for a class of objects. */
          prototype: Object;
      
          /** 
            * Returns the prototype of an object. 
            * @param o The object that references the prototype.
            */
          getPrototypeOf(o: any): any;
      
          /**
            * Gets the own property descriptor of the specified object. 
            * An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype. 
            * @param o Object that contains the property.
            * @param p Name of the property.
          */
          getOwnPropertyDescriptor(o: any, p: string): PropertyDescriptor;
      
          /** 
            * Returns the names of the own properties of an object. The own properties of an object are those that are defined directly 
            * on that object, and are not inherited from the object's prototype. The properties of an object include both fields (objects) and functions.
            * @param o Object that contains the own properties.
            */
          getOwnPropertyNames(o: any): string[];
      
          /** 
            * Creates an object that has the specified prototype, and that optionally contains specified properties.
            * @param o Object to use as a prototype. May be null
            * @param properties JavaScript object that contains one or more property descriptors. 
            */
          create(o: any, properties?: PropertyDescriptorMap): any;
      
          /**
            * Adds a property to an object, or modifies attributes of an existing property. 
            * @param o Object on which to add or modify the property. This can be a native JavaScript object (that is, a user-defined object or a built in object) or a DOM object.
            * @param p The property name.
            * @param attributes Descriptor for the property. It can be for a data property or an accessor property.
            */
          defineProperty(o: any, p: string, attributes: PropertyDescriptor): any;
      
          /**
            * Adds one or more properties to an object, and/or modifies attributes of existing properties. 
            * @param o Object on which to add or modify the properties. This can be a native JavaScript object or a DOM object.
            * @param properties JavaScript object that contains one or more descriptor objects. Each descriptor object describes a data property or an accessor property.
            */
          defineProperties(o: any, properties: PropertyDescriptorMap): any;
      
          /**
            * Prevents the modification of attributes of existing properties, and prevents the addition of new properties.
            * @param o Object on which to lock the attributes. 
            */
          seal<T>(o: T): T;
      
          /**
            * Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
            * @param o Object on which to lock the attributes.
            */
          freeze<T>(o: T): T;
      
          /**
            * Prevents the addition of new properties to an object.
            * @param o Object to make non-extensible. 
            */
          preventExtensions<T>(o: T): T;
      
          /**
            * Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object.
            * @param o Object to test. 
            */
          isSealed(o: any): boolean;
      
          /**
            * Returns true if existing property attributes and values cannot be modified in an object, and new properties cannot be added to the object.
            * @param o Object to test.  
            */
          isFrozen(o: any): boolean;
      
          /**
            * Returns a value that indicates whether new properties can be added to an object.
            * @param o Object to test. 
            */
          isExtensible(o: any): boolean;
      
          /**
            * Returns the names of the enumerable properties and methods of an object.
            * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
            */
          keys(o: any): string[];
      }
      
      /**
        * Provides functionality common to all JavaScript objects.
        */
      declare var Object: ObjectConstructor;
      
      /**
        * Creates a new function.
        */
      interface Function {
          /**
            * Calls the function, substituting the specified object for the this value of the function, and the specified array for the arguments of the function.
            * @param thisArg The object to be used as the this object.
            * @param argArray A set of arguments to be passed to the function.
            */
          apply(thisArg: any, argArray?: any): any;
      
          /**
            * Calls a method of an object, substituting another object for the current object.
            * @param thisArg The object to be used as the current object.
            * @param argArray A list of arguments to be passed to the method.
            */
          call(thisArg: any, ...argArray: any[]): any;
      
          /**
            * For a given function, creates a bound function that has the same body as the original function. 
            * The this object of the bound function is associated with the specified object, and has the specified initial parameters.
            * @param thisArg An object to which the this keyword can refer inside the new function.
            * @param argArray A list of arguments to be passed to the new function.
            */
          bind(thisArg: any, ...argArray: any[]): any;
      
          prototype: any;
          length: number;
      
          // Non-standard extensions
          arguments: any;
          caller: Function;
      }
      
      interface FunctionConstructor {
          /**
            * Creates a new function.
            * @param args A list of arguments the function accepts.
            */
          new (...args: string[]): Function;
          (...args: string[]): Function;
          prototype: Function;
      }
      
      declare var Function: FunctionConstructor;
      
      interface IArguments {
          [index: number]: any;
          length: number;
          callee: Function;
      }
      
      interface String {
          /** Returns a string representation of a string. */
          toString(): string;
      
          /**
            * Returns the character at the specified index.
            * @param pos The zero-based index of the desired character.
            */
          charAt(pos: number): string;
      
          /** 
            * Returns the Unicode value of the character at the specified location.
            * @param index The zero-based index of the desired character. If there is no character at the specified index, NaN is returned.
            */
          charCodeAt(index: number): number;
      
          /**
            * Returns a string that contains the concatenation of two or more strings.
            * @param strings The strings to append to the end of the string.  
            */
          concat(...strings: string[]): string;
      
          /**
            * Returns the position of the first occurrence of a substring. 
            * @param searchString The substring to search for in the string
            * @param position The index at which to begin searching the String object. If omitted, search starts at the beginning of the string.
            */
          indexOf(searchString: string, position?: number): number;
      
          /**
            * Returns the last occurrence of a substring in the string.
            * @param searchString The substring to search for.
            * @param position The index at which to begin searching. If omitted, the search begins at the end of the string.
            */
          lastIndexOf(searchString: string, position?: number): number;
      
          /**
            * Determines whether two strings are equivalent in the current locale.
            * @param that String to compare to target string
            */
          localeCompare(that: string): number;
      
          /** 
            * Matches a string with a regular expression, and returns an array containing the results of that search.
            * @param regexp A variable name or string literal containing the regular expression pattern and flags.
            */
          match(regexp: string): RegExpMatchArray;
      
          /** 
            * Matches a string with a regular expression, and returns an array containing the results of that search.
            * @param regexp A regular expression object that contains the regular expression pattern and applicable flags. 
            */
          match(regexp: RegExp): RegExpMatchArray;
      
          /**
            * Replaces text in a string, using a regular expression or search string.
            * @param searchValue A String object or string literal that represents the regular expression
            * @param replaceValue A String object or string literal containing the text to replace for every successful match of rgExp in stringObj.
            */
          replace(searchValue: string, replaceValue: string): string;
      
          /**
            * Replaces text in a string, using a regular expression or search string.
            * @param searchValue A String object or string literal that represents the regular expression
            * @param replaceValue A function that returns the replacement text.
            */
          replace(searchValue: string, replaceValue: (substring: string, ...args: any[]) => string): string;
      
          /**
            * Replaces text in a string, using a regular expression or search string.
            * @param searchValue A Regular Expression object containing the regular expression pattern and applicable flags
            * @param replaceValue A String object or string literal containing the text to replace for every successful match of rgExp in stringObj.
            */
          replace(searchValue: RegExp, replaceValue: string): string;
      
          /**
            * Replaces text in a string, using a regular expression or search string.
            * @param searchValue A Regular Expression object containing the regular expression pattern and applicable flags
            * @param replaceValue A function that returns the replacement text.
            */
          replace(searchValue: RegExp, replaceValue: (substring: string, ...args: any[]) => string): string;
      
          /**
            * Finds the first substring match in a regular expression search.
            * @param regexp The regular expression pattern and applicable flags. 
            */
          search(regexp: string): number;
      
          /**
            * Finds the first substring match in a regular expression search.
            * @param regexp The regular expression pattern and applicable flags. 
            */
          search(regexp: RegExp): number;
      
          /**
            * Returns a section of a string.
            * @param start The index to the beginning of the specified portion of stringObj. 
            * @param end The index to the end of the specified portion of stringObj. The substring includes the characters up to, but not including, the character indicated by end. 
            * If this value is not specified, the substring continues to the end of stringObj.
            */
          slice(start?: number, end?: number): string;
      
          /**
            * Split a string into substrings using the specified separator and return them as an array.
            * @param separator A string that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned. 
            * @param limit A value used to limit the number of elements returned in the array.
            */
          split(separator: string, limit?: number): string[];
      
          /**
            * Split a string into substrings using the specified separator and return them as an array.
            * @param separator A Regular Express that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned. 
            * @param limit A value used to limit the number of elements returned in the array.
            */
          split(separator: RegExp, limit?: number): string[];
      
          /**
            * Returns the substring at the specified location within a String object. 
            * @param start The zero-based index number indicating the beginning of the substring.
            * @param end Zero-based index number indicating the end of the substring. The substring includes the characters up to, but not including, the character indicated by end.
            * If end is omitted, the characters from start through the end of the original string are returned.
            */
          substring(start: number, end?: number): string;
      
          /** Converts all the alphabetic characters in a string to lowercase. */
          toLowerCase(): string;
      
          /** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */
          toLocaleLowerCase(): string;
      
          /** Converts all the alphabetic characters in a string to uppercase. */
          toUpperCase(): string;
      
          /** Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. */
          toLocaleUpperCase(): string;
      
          /** Removes the leading and trailing white space and line terminator characters from a string. */
          trim(): string;
      
          /** Returns the length of a String object. */
          length: number;
      
          // IE extensions
          /**
            * Gets a substring beginning at the specified location and having the specified length.
            * @param from The starting position of the desired substring. The index of the first character in the string is zero.
            * @param length The number of characters to include in the returned substring.
            */
          substr(from: number, length?: number): string;
      
          /** Returns the primitive value of the specified object. */
          valueOf(): string;
      
          [index: number]: string;
      }
      
      interface StringConstructor {
          new (value?: any): String;
          (value?: any): string;
          prototype: String;
          fromCharCode(...codes: number[]): string;
      }
      
      /** 
        * Allows manipulation and formatting of text strings and determination and location of substrings within strings. 
        */
      declare var String: StringConstructor;
      
      interface Boolean {
          /** Returns the primitive value of the specified object. */
          valueOf(): boolean;
      }
      
      interface BooleanConstructor {
          new (value?: any): Boolean;
          (value?: any): boolean;
          prototype: Boolean;
      }
      
      declare var Boolean: BooleanConstructor;
      
      interface Number {
          /**
            * Returns a string representation of an object.
            * @param radix Specifies a radix for converting numeric values to strings. This value is only used for numbers.
            */
          toString(radix?: number): string;
      
          /** 
            * Returns a string representing a number in fixed-point notation.
            * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.
            */
          toFixed(fractionDigits?: number): string;
      
          /**
            * Returns a string containing a number represented in exponential notation.
            * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.
            */
          toExponential(fractionDigits?: number): string;
      
          /**
            * Returns a string containing a number represented either in exponential or fixed-point notation with a specified number of digits.
            * @param precision Number of significant digits. Must be in the range 1 - 21, inclusive.
            */
          toPrecision(precision?: number): string;
      
          /** Returns the primitive value of the specified object. */
          valueOf(): number;
      }
      
      interface NumberConstructor {
          new (value?: any): Number;
          (value?: any): number;
          prototype: Number;
      
          /** The largest number that can be represented in JavaScript. Equal to approximately 1.79E+308. */
          MAX_VALUE: number;
      
          /** The closest number to zero that can be represented in JavaScript. Equal to approximately 5.00E-324. */
          MIN_VALUE: number;
      
          /** 
            * A value that is not a number.
            * In equality comparisons, NaN does not equal any value, including itself. To test whether a value is equivalent to NaN, use the isNaN function.
            */
          NaN: number;
      
          /** 
            * A value that is less than the largest negative number that can be represented in JavaScript.
            * JavaScript displays NEGATIVE_INFINITY values as -infinity. 
            */
          NEGATIVE_INFINITY: number;
      
          /**
            * A value greater than the largest number that can be represented in JavaScript. 
            * JavaScript displays POSITIVE_INFINITY values as infinity. 
            */
          POSITIVE_INFINITY: number;
      }
      
      /** An object that represents a number of any kind. All JavaScript numbers are 64-bit floating-point numbers. */
      declare var Number: NumberConstructor;
      
      interface TemplateStringsArray extends Array<string> {
          raw: string[];
      }
      
      interface Math {
          /** The mathematical constant e. This is Euler's number, the base of natural logarithms. */
          E: number;
          /** The natural logarithm of 10. */
          LN10: number;
          /** The natural logarithm of 2. */
          LN2: number;
          /** The base-2 logarithm of e. */
          LOG2E: number;
          /** The base-10 logarithm of e. */
          LOG10E: number;
          /** Pi. This is the ratio of the circumference of a circle to its diameter. */
          PI: number;
          /** The square root of 0.5, or, equivalently, one divided by the square root of 2. */
          SQRT1_2: number;
          /** The square root of 2. */
          SQRT2: number;
          /**
            * Returns the absolute value of a number (the value without regard to whether it is positive or negative). 
            * For example, the absolute value of -5 is the same as the absolute value of 5.
            * @param x A numeric expression for which the absolute value is needed.
            */
          abs(x: number): number;
          /**
            * Returns the arc cosine (or inverse cosine) of a number. 
            * @param x A numeric expression.
            */
          acos(x: number): number;
          /** 
            * Returns the arcsine of a number. 
            * @param x A numeric expression.
            */
          asin(x: number): number;
          /**
            * Returns the arctangent of a number. 
            * @param x A numeric expression for which the arctangent is needed.
            */
          atan(x: number): number;
          /**
            * Returns the angle (in radians) from the X axis to a point.
            * @param y A numeric expression representing the cartesian y-coordinate.
            * @param x A numeric expression representing the cartesian x-coordinate.
            */
          atan2(y: number, x: number): number;
          /**
            * Returns the smallest number greater than or equal to its numeric argument. 
            * @param x A numeric expression.
            */
          ceil(x: number): number;
          /**
            * Returns the cosine of a number. 
            * @param x A numeric expression that contains an angle measured in radians.
            */
          cos(x: number): number;
          /**
            * Returns e (the base of natural logarithms) raised to a power. 
            * @param x A numeric expression representing the power of e.
            */
          exp(x: number): number;
          /**
            * Returns the greatest number less than or equal to its numeric argument. 
            * @param x A numeric expression.
            */
          floor(x: number): number;
          /**
            * Returns the natural logarithm (base e) of a number. 
            * @param x A numeric expression.
            */
          log(x: number): number;
          /**
            * Returns the larger of a set of supplied numeric expressions. 
            * @param values Numeric expressions to be evaluated.
            */
          max(...values: number[]): number;
          /**
            * Returns the smaller of a set of supplied numeric expressions. 
            * @param values Numeric expressions to be evaluated.
            */
          min(...values: number[]): number;
          /**
            * Returns the value of a base expression taken to a specified power. 
            * @param x The base value of the expression.
            * @param y The exponent value of the expression.
            */
          pow(x: number, y: number): number;
          /** Returns a pseudorandom number between 0 and 1. */
          random(): number;
          /** 
            * Returns a supplied numeric expression rounded to the nearest number.
            * @param x The value to be rounded to the nearest number.
            */
          round(x: number): number;
          /**
            * Returns the sine of a number.
            * @param x A numeric expression that contains an angle measured in radians.
            */
          sin(x: number): number;
          /**
            * Returns the square root of a number.
            * @param x A numeric expression.
            */
          sqrt(x: number): number;
          /**
            * Returns the tangent of a number.
            * @param x A numeric expression that contains an angle measured in radians.
            */
          tan(x: number): number;
      }
      /** An intrinsic object that provides basic mathematics functionality and constants. */
      declare var Math: Math;
      
      /** Enables basic storage and retrieval of dates and times. */
      interface Date {
          /** Returns a string representation of a date. The format of the string depends on the locale. */
          toString(): string;
          /** Returns a date as a string value. */
          toDateString(): string;
          /** Returns a time as a string value. */
          toTimeString(): string;
          /** Returns a value as a string value appropriate to the host environment's current locale. */
          toLocaleString(): string;
          /** Returns a date as a string value appropriate to the host environment's current locale. */
          toLocaleDateString(): string;
          /** Returns a time as a string value appropriate to the host environment's current locale. */
          toLocaleTimeString(): string;
          /** Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC. */
          valueOf(): number;
          /** Gets the time value in milliseconds. */
          getTime(): number;
          /** Gets the year, using local time. */
          getFullYear(): number;
          /** Gets the year using Universal Coordinated Time (UTC). */
          getUTCFullYear(): number;
          /** Gets the month, using local time. */
          getMonth(): number;
          /** Gets the month of a Date object using Universal Coordinated Time (UTC). */
          getUTCMonth(): number;
          /** Gets the day-of-the-month, using local time. */
          getDate(): number;
          /** Gets the day-of-the-month, using Universal Coordinated Time (UTC). */
          getUTCDate(): number;
          /** Gets the day of the week, using local time. */
          getDay(): number;
          /** Gets the day of the week using Universal Coordinated Time (UTC). */
          getUTCDay(): number;
          /** Gets the hours in a date, using local time. */
          getHours(): number;
          /** Gets the hours value in a Date object using Universal Coordinated Time (UTC). */
          getUTCHours(): number;
          /** Gets the minutes of a Date object, using local time. */
          getMinutes(): number;
          /** Gets the minutes of a Date object using Universal Coordinated Time (UTC). */
          getUTCMinutes(): number;
          /** Gets the seconds of a Date object, using local time. */
          getSeconds(): number;
          /** Gets the seconds of a Date object using Universal Coordinated Time (UTC). */
          getUTCSeconds(): number;
          /** Gets the milliseconds of a Date, using local time. */
          getMilliseconds(): number;
          /** Gets the milliseconds of a Date object using Universal Coordinated Time (UTC). */
          getUTCMilliseconds(): number;
          /** Gets the difference in minutes between the time on the local computer and Universal Coordinated Time (UTC). */
          getTimezoneOffset(): number;
          /** 
            * Sets the date and time value in the Date object.
            * @param time A numeric value representing the number of elapsed milliseconds since midnight, January 1, 1970 GMT. 
            */
          setTime(time: number): number;
          /**
            * Sets the milliseconds value in the Date object using local time. 
            * @param ms A numeric value equal to the millisecond value.
            */
          setMilliseconds(ms: number): number;
          /** 
            * Sets the milliseconds value in the Date object using Universal Coordinated Time (UTC).
            * @param ms A numeric value equal to the millisecond value. 
            */
          setUTCMilliseconds(ms: number): number;
      
          /**
            * Sets the seconds value in the Date object using local time. 
            * @param sec A numeric value equal to the seconds value.
            * @param ms A numeric value equal to the milliseconds value.
            */
          setSeconds(sec: number, ms?: number): number;
          /**
            * Sets the seconds value in the Date object using Universal Coordinated Time (UTC).
            * @param sec A numeric value equal to the seconds value.
            * @param ms A numeric value equal to the milliseconds value.
            */
          setUTCSeconds(sec: number, ms?: number): number;
          /**
            * Sets the minutes value in the Date object using local time. 
            * @param min A numeric value equal to the minutes value. 
            * @param sec A numeric value equal to the seconds value. 
            * @param ms A numeric value equal to the milliseconds value.
            */
          setMinutes(min: number, sec?: number, ms?: number): number;
          /**
            * Sets the minutes value in the Date object using Universal Coordinated Time (UTC).
            * @param min A numeric value equal to the minutes value. 
            * @param sec A numeric value equal to the seconds value. 
            * @param ms A numeric value equal to the milliseconds value.
            */
          setUTCMinutes(min: number, sec?: number, ms?: number): number;
          /**
            * Sets the hour value in the Date object using local time.
            * @param hours A numeric value equal to the hours value.
            * @param min A numeric value equal to the minutes value.
            * @param sec A numeric value equal to the seconds value. 
            * @param ms A numeric value equal to the milliseconds value.
            */
          setHours(hours: number, min?: number, sec?: number, ms?: number): number;
          /**
            * Sets the hours value in the Date object using Universal Coordinated Time (UTC).
            * @param hours A numeric value equal to the hours value.
            * @param min A numeric value equal to the minutes value.
            * @param sec A numeric value equal to the seconds value. 
            * @param ms A numeric value equal to the milliseconds value.
            */
          setUTCHours(hours: number, min?: number, sec?: number, ms?: number): number;
          /**
            * Sets the numeric day-of-the-month value of the Date object using local time. 
            * @param date A numeric value equal to the day of the month.
            */
          setDate(date: number): number;
          /** 
            * Sets the numeric day of the month in the Date object using Universal Coordinated Time (UTC).
            * @param date A numeric value equal to the day of the month. 
            */
          setUTCDate(date: number): number;
          /** 
            * Sets the month value in the Date object using local time. 
            * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. 
            * @param date A numeric value representing the day of the month. If this value is not supplied, the value from a call to the getDate method is used.
            */
          setMonth(month: number, date?: number): number;
          /**
            * Sets the month value in the Date object using Universal Coordinated Time (UTC).
            * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.
            * @param date A numeric value representing the day of the month. If it is not supplied, the value from a call to the getUTCDate method is used.
            */
          setUTCMonth(month: number, date?: number): number;
          /**
            * Sets the year of the Date object using local time.
            * @param year A numeric value for the year.
            * @param month A zero-based numeric value for the month (0 for January, 11 for December). Must be specified if numDate is specified.
            * @param date A numeric value equal for the day of the month.
            */
          setFullYear(year: number, month?: number, date?: number): number;
          /**
            * Sets the year value in the Date object using Universal Coordinated Time (UTC).
            * @param year A numeric value equal to the year.
            * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. Must be supplied if numDate is supplied.
            * @param date A numeric value equal to the day of the month.
            */
          setUTCFullYear(year: number, month?: number, date?: number): number;
          /** Returns a date converted to a string using Universal Coordinated Time (UTC). */
          toUTCString(): string;
          /** Returns a date as a string value in ISO format. */
          toISOString(): string;
          /** Used by the JSON.stringify method to enable the transformation of an object's data for JavaScript Object Notation (JSON) serialization. */
          toJSON(key?: any): string;
      }
      
      interface DateConstructor {
          new (): Date;
          new (value: number): Date;
          new (value: string): Date;
          new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date;
          (): string;
          prototype: Date;
          /**
            * Parses a string containing a date, and returns the number of milliseconds between that date and midnight, January 1, 1970.
            * @param s A date string
            */
          parse(s: string): number;
          /**
            * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date. 
            * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year.
            * @param month The month as an number between 0 and 11 (January to December).
            * @param date The date as an number between 1 and 31.
            * @param hours Must be supplied if minutes is supplied. An number from 0 to 23 (midnight to 11pm) that specifies the hour.
            * @param minutes Must be supplied if seconds is supplied. An number from 0 to 59 that specifies the minutes.
            * @param seconds Must be supplied if milliseconds is supplied. An number from 0 to 59 that specifies the seconds.
            * @param ms An number from 0 to 999 that specifies the milliseconds.
            */
          UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number;
          now(): number;
      }
      
      declare var Date: DateConstructor;
      
      interface RegExpMatchArray extends Array<string> {
          index?: number;
          input?: string;
      }
      
      interface RegExpExecArray extends Array<string> {
          index: number;
          input: string;
      }
      
      interface RegExp {
          /** 
            * Executes a search on a string using a regular expression pattern, and returns an array containing the results of that search.
            * @param string The String object or string literal on which to perform the search.
            */
          exec(string: string): RegExpExecArray;
      
          /** 
            * Returns a Boolean value that indicates whether or not a pattern exists in a searched string.
            * @param string String on which to perform the search.
            */
          test(string: string): boolean;
      
          /** Returns a copy of the text of the regular expression pattern. Read-only. The regExp argument is a Regular expression object. It can be a variable name or a literal. */
          source: string;
      
          /** Returns a Boolean value indicating the state of the global flag (g) used with a regular expression. Default is false. Read-only. */
          global: boolean;
      
          /** Returns a Boolean value indicating the state of the ignoreCase flag (i) used with a regular expression. Default is false. Read-only. */
          ignoreCase: boolean;
      
          /** Returns a Boolean value indicating the state of the multiline flag (m) used with a regular expression. Default is false. Read-only. */
          multiline: boolean;
      
          lastIndex: number;
      
          // Non-standard extensions
          compile(): RegExp;
      }
      
      interface RegExpConstructor {
          new (pattern: string, flags?: string): RegExp;
          (pattern: string, flags?: string): RegExp;
          prototype: RegExp;
      
          // Non-standard extensions
          $1: string;
          $2: string;
          $3: string;
          $4: string;
          $5: string;
          $6: string;
          $7: string;
          $8: string;
          $9: string;
          lastMatch: string;
      }
      
      declare var RegExp: RegExpConstructor;
      
      interface Error {
          name: string;
          message: string;
      }
      
      interface ErrorConstructor {
          new (message?: string): Error;
          (message?: string): Error;
          prototype: Error;
      }
      
      declare var Error: ErrorConstructor;
      
      interface EvalError extends Error {
      }
      
      interface EvalErrorConstructor {
          new (message?: string): EvalError;
          (message?: string): EvalError;
          prototype: EvalError;
      }
      
      declare var EvalError: EvalErrorConstructor;
      
      interface RangeError extends Error {
      }
      
      interface RangeErrorConstructor {
          new (message?: string): RangeError;
          (message?: string): RangeError;
          prototype: RangeError;
      }
      
      declare var RangeError: RangeErrorConstructor;
      
      interface ReferenceError extends Error {
      }
      
      interface ReferenceErrorConstructor {
          new (message?: string): ReferenceError;
          (message?: string): ReferenceError;
          prototype: ReferenceError;
      }
      
      declare var ReferenceError: ReferenceErrorConstructor;
      
      interface SyntaxError extends Error {
      }
      
      interface SyntaxErrorConstructor {
          new (message?: string): SyntaxError;
          (message?: string): SyntaxError;
          prototype: SyntaxError;
      }
      
      declare var SyntaxError: SyntaxErrorConstructor;
      
      interface TypeError extends Error {
      }
      
      interface TypeErrorConstructor {
          new (message?: string): TypeError;
          (message?: string): TypeError;
          prototype: TypeError;
      }
      
      declare var TypeError: TypeErrorConstructor;
      
      interface URIError extends Error {
      }
      
      interface URIErrorConstructor {
          new (message?: string): URIError;
          (message?: string): URIError;
          prototype: URIError;
      }
      
      declare var URIError: URIErrorConstructor;
      
      interface JSON {
          /**
            * Converts a JavaScript Object Notation (JSON) string into an object.
            * @param text A valid JSON string.
            * @param reviver A function that transforms the results. This function is called for each member of the object. 
            * If a member contains nested objects, the nested objects are transformed before the parent object is. 
            */
          parse(text: string, reviver?: (key: any, value: any) => any): any;
          /**
            * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
            * @param value A JavaScript value, usually an object or array, to be converted.
            */
          stringify(value: any): string;
          /**
            * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
            * @param value A JavaScript value, usually an object or array, to be converted.
            * @param replacer A function that transforms the results.
            */
          stringify(value: any, replacer: (key: string, value: any) => any): string;
          /**
            * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
            * @param value A JavaScript value, usually an object or array, to be converted.
            * @param replacer Array that transforms the results.
            */
          stringify(value: any, replacer: any[]): string;
          /**
            * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
            * @param value A JavaScript value, usually an object or array, to be converted.
            * @param replacer A function that transforms the results.
            * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
            */
          stringify(value: any, replacer: (key: string, value: any) => any, space: any): string;
          /**
            * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
            * @param value A JavaScript value, usually an object or array, to be converted.
            * @param replacer Array that transforms the results.
            * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
            */
          stringify(value: any, replacer: any[], space: any): string;
      }
      /**
        * An intrinsic object that provides functions to convert JavaScript values to and from the JavaScript Object Notation (JSON) format.
        */
      declare var JSON: JSON;
      
      
      /////////////////////////////
      /// ECMAScript Array API (specially handled by compiler)
      /////////////////////////////
      
      interface Array<T> {
          /**
            * Gets or sets the length of the array. This is a number one higher than the highest element defined in an array.
            */
          length: number;
          /**
            * Returns a string representation of an array.
            */
          toString(): string;
          toLocaleString(): string;
          /**
            * Appends new elements to an array, and returns the new length of the array.
            * @param items New elements of the Array.
            */
          push(...items: T[]): number;
          /**
            * Removes the last element from an array and returns it.
            */
          pop(): T;
          /**
            * Combines two or more arrays.
            * @param items Additional items to add to the end of array1.
            */
          concat<U extends T[]>(...items: U[]): T[];
          /**
            * Combines two or more arrays.
            * @param items Additional items to add to the end of array1.
            */
          concat(...items: T[]): T[];
          /**
            * Adds all the elements of an array separated by the specified separator string.
            * @param separator A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma.
            */
          join(separator?: string): string;
          /**
            * Reverses the elements in an Array. 
            */
          reverse(): T[];
          /**
            * Removes the first element from an array and returns it.
            */
          shift(): T;
          /** 
            * Returns a section of an array.
            * @param start The beginning of the specified portion of the array.
            * @param end The end of the specified portion of the array.
            */
          slice(start?: number, end?: number): T[];
      
          /**
            * Sorts an array.
            * @param compareFn The name of the function used to determine the order of the elements. If omitted, the elements are sorted in ascending, ASCII character order.
            */
          sort(compareFn?: (a: T, b: T) => number): T[];
      
          /**
            * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
            * @param start The zero-based location in the array from which to start removing elements.
            */
          splice(start: number): T[];
      
          /**
            * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
            * @param start The zero-based location in the array from which to start removing elements.
            * @param deleteCount The number of elements to remove.
            * @param items Elements to insert into the array in place of the deleted elements.
            */
          splice(start: number, deleteCount: number, ...items: T[]): T[];
      
          /**
            * Inserts new elements at the start of an array.
            * @param items  Elements to insert at the start of the Array.
            */
          unshift(...items: T[]): number;
      
          /**
            * Returns the index of the first occurrence of a value in an array.
            * @param searchElement The value to locate in the array.
            * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.
            */
          indexOf(searchElement: T, fromIndex?: number): number;
      
          /**
            * Returns the index of the last occurrence of a specified value in an array.
            * @param searchElement The value to locate in the array.
            * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array.
            */
          lastIndexOf(searchElement: T, fromIndex?: number): number;
      
          /**
            * Determines whether all the members of an array satisfy the specified test.
            * @param callbackfn A function that accepts up to three arguments. The every method calls the callbackfn function for each element in array1 until the callbackfn returns false, or until the end of the array.
            * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
            */
          every(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): boolean;
      
          /**
            * Determines whether the specified callback function returns true for any element of an array.
            * @param callbackfn A function that accepts up to three arguments. The some method calls the callbackfn function for each element in array1 until the callbackfn returns true, or until the end of the array.
            * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
            */
          some(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): boolean;
      
          /**
            * Performs the specified action for each element in an array.
            * @param callbackfn  A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array. 
            * @param thisArg  An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
            */
          forEach(callbackfn: (value: T, index: number, array: T[]) => void, thisArg?: any): void;
      
          /**
            * Calls a defined callback function on each element of an array, and returns an array that contains the results.
            * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array. 
            * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
            */
          map<U>(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[];
      
          /**
            * Returns the elements of an array that meet the condition specified in a callback function. 
            * @param callbackfn A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array. 
            * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
            */
          filter(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): T[];
      
          /**
            * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
            * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
            * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
            */
          reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T;
          /**
            * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
            * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
            * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
            */
          reduce<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U;
      
          /** 
            * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
            * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. 
            * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
            */
          reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T;
          /** 
            * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
            * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. 
            * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
            */
          reduceRight<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U;
      
          [n: number]: T;
      }
      
      interface ArrayConstructor {
          new (arrayLength?: number): any[];
          new <T>(arrayLength: number): T[];
          new <T>(...items: T[]): T[];
          (arrayLength?: number): any[];
          <T>(arrayLength: number): T[];
          <T>(...items: T[]): T[];
          isArray(arg: any): boolean;
          prototype: Array<any>;
      }
      
      declare var Array: ArrayConstructor;
      
      interface TypedPropertyDescriptor<T> {
          enumerable?: boolean;
          configurable?: boolean;
          writable?: boolean;
          value?: T;
          get?: () => T;
          set?: (value: T) => void;
      }
      
      declare type ClassDecorator = <TFunction extends Function>(target: TFunction) => TFunction | void;
      declare type PropertyDecorator = (target: Object, propertyKey: string | symbol) => void;
      declare type MethodDecorator = <T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void;
      declare type ParameterDecorator = (target: Object, propertyKey: string | symbol, parameterIndex: number) => void;
      
      /////////////////////////////
      /// IE10 ECMAScript Extensions
      /////////////////////////////
      
      /**
        * Represents a raw buffer of binary data, which is used to store data for the 
        * different typed arrays. ArrayBuffers cannot be read from or written to directly, 
        * but can be passed to a typed array or DataView Object to interpret the raw 
        * buffer as needed. 
        */
      interface ArrayBuffer {
          /**
            * Read-only. The length of the ArrayBuffer (in bytes).
            */
          byteLength: number;
      
          /**
            * Returns a section of an ArrayBuffer.
            */
          slice(begin:number, end?:number): ArrayBuffer;
      }
      
      interface ArrayBufferConstructor {
          prototype: ArrayBuffer;
          new (byteLength: number): ArrayBuffer;
          isView(arg: any): boolean;
      }
      declare var ArrayBuffer: ArrayBufferConstructor;
      
      interface ArrayBufferView {
          /**
            * The ArrayBuffer instance referenced by the array. 
            */
          buffer: ArrayBuffer;
      
          /**
            * The length in bytes of the array.
            */
          byteLength: number;
      
          /**
            * The offset in bytes of the array.
            */
          byteOffset: number;
      }
      
      interface DataView {
          buffer: ArrayBuffer;
          byteLength: number;
          byteOffset: number;
          /**
            * Gets the Float32 value at the specified byte offset from the start of the view. There is 
            * no alignment constraint; multi-byte values may be fetched from any offset. 
            * @param byteOffset The place in the buffer at which the value should be retrieved.
            */
          getFloat32(byteOffset: number, littleEndian: boolean): number;
      
          /**
            * Gets the Float64 value at the specified byte offset from the start of the view. There is
            * no alignment constraint; multi-byte values may be fetched from any offset. 
            * @param byteOffset The place in the buffer at which the value should be retrieved.
            */
          getFloat64(byteOffset: number, littleEndian: boolean): number;
      
          /**
            * Gets the Int8 value at the specified byte offset from the start of the view. There is 
            * no alignment constraint; multi-byte values may be fetched from any offset. 
            * @param byteOffset The place in the buffer at which the value should be retrieved.
            */
          getInt8(byteOffset: number): number;
      
          /**
            * Gets the Int16 value at the specified byte offset from the start of the view. There is 
            * no alignment constraint; multi-byte values may be fetched from any offset. 
            * @param byteOffset The place in the buffer at which the value should be retrieved.
            */
          getInt16(byteOffset: number, littleEndian: boolean): number;
          /**
            * Gets the Int32 value at the specified byte offset from the start of the view. There is 
            * no alignment constraint; multi-byte values may be fetched from any offset. 
            * @param byteOffset The place in the buffer at which the value should be retrieved.
            */
          getInt32(byteOffset: number, littleEndian: boolean): number;
      
          /**
            * Gets the Uint8 value at the specified byte offset from the start of the view. There is 
            * no alignment constraint; multi-byte values may be fetched from any offset. 
            * @param byteOffset The place in the buffer at which the value should be retrieved.
            */
          getUint8(byteOffset: number): number;
      
          /**
            * Gets the Uint16 value at the specified byte offset from the start of the view. There is 
            * no alignment constraint; multi-byte values may be fetched from any offset. 
            * @param byteOffset The place in the buffer at which the value should be retrieved.
            */
          getUint16(byteOffset: number, littleEndian: boolean): number;
      
          /**
            * Gets the Uint32 value at the specified byte offset from the start of the view. There is 
            * no alignment constraint; multi-byte values may be fetched from any offset. 
            * @param byteOffset The place in the buffer at which the value should be retrieved.
            */
          getUint32(byteOffset: number, littleEndian: boolean): number;
      
          /**
            * Stores an Float32 value at the specified byte offset from the start of the view. 
            * @param byteOffset The place in the buffer at which the value should be set.
            * @param value The value to set.
            * @param littleEndian If false or undefined, a big-endian value should be written, 
            * otherwise a little-endian value should be written.
            */
          setFloat32(byteOffset: number, value: number, littleEndian: boolean): void;
      
          /**
            * Stores an Float64 value at the specified byte offset from the start of the view. 
            * @param byteOffset The place in the buffer at which the value should be set.
            * @param value The value to set.
            * @param littleEndian If false or undefined, a big-endian value should be written, 
            * otherwise a little-endian value should be written.
            */
          setFloat64(byteOffset: number, value: number, littleEndian: boolean): void;
      
          /**
            * Stores an Int8 value at the specified byte offset from the start of the view. 
            * @param byteOffset The place in the buffer at which the value should be set.
            * @param value The value to set.
            */
          setInt8(byteOffset: number, value: number): void;
      
          /**
            * Stores an Int16 value at the specified byte offset from the start of the view. 
            * @param byteOffset The place in the buffer at which the value should be set.
            * @param value The value to set.
            * @param littleEndian If false or undefined, a big-endian value should be written, 
            * otherwise a little-endian value should be written.
            */
          setInt16(byteOffset: number, value: number, littleEndian: boolean): void;
      
          /**
            * Stores an Int32 value at the specified byte offset from the start of the view. 
            * @param byteOffset The place in the buffer at which the value should be set.
            * @param value The value to set.
            * @param littleEndian If false or undefined, a big-endian value should be written, 
            * otherwise a little-endian value should be written.
            */
          setInt32(byteOffset: number, value: number, littleEndian: boolean): void;
      
          /**
            * Stores an Uint8 value at the specified byte offset from the start of the view. 
            * @param byteOffset The place in the buffer at which the value should be set.
            * @param value The value to set.
            */
          setUint8(byteOffset: number, value: number): void;
      
          /**
            * Stores an Uint16 value at the specified byte offset from the start of the view. 
            * @param byteOffset The place in the buffer at which the value should be set.
            * @param value The value to set.
            * @param littleEndian If false or undefined, a big-endian value should be written, 
            * otherwise a little-endian value should be written.
            */
          setUint16(byteOffset: number, value: number, littleEndian: boolean): void;
      
          /**
            * Stores an Uint32 value at the specified byte offset from the start of the view. 
            * @param byteOffset The place in the buffer at which the value should be set.
            * @param value The value to set.
            * @param littleEndian If false or undefined, a big-endian value should be written, 
            * otherwise a little-endian value should be written.
            */
          setUint32(byteOffset: number, value: number, littleEndian: boolean): void;
      }
      
      interface DataViewConstructor {
          new (buffer: ArrayBuffer, byteOffset?: number, byteLength?: number): DataView;
      }
      declare var DataView: DataViewConstructor;
      
      /**
        * A typed array of 8-bit integer values. The contents are initialized to 0. If the requested 
        * number of bytes could not be allocated an exception is raised.
        */
      interface Int8Array {
          /**
            * The size in bytes of each element in the array. 
            */
          BYTES_PER_ELEMENT: number;
      
          /**
            * The ArrayBuffer instance referenced by the array. 
            */
          buffer: ArrayBuffer;
      
          /**
            * The length in bytes of the array.
            */
          byteLength: number;
      
          /**
            * The offset in bytes of the array.
            */
          byteOffset: number;
      
          /** 
            * Returns the this object after copying a section of the array identified by start and end
            * to the same array starting at position target
            * @param target If target is negative, it is treated as length+target where length is the 
            * length of the array. 
            * @param start If start is negative, it is treated as length+start. If end is negative, it 
            * is treated as length+end.
            * @param end If not specified, length of the this object is used as its default value. 
            */
          copyWithin(target: number, start: number, end?: number): Int8Array;
      
          /**
            * Determines whether all the members of an array satisfy the specified test.
            * @param callbackfn A function that accepts up to three arguments. The every method calls 
            * the callbackfn function for each element in array1 until the callbackfn returns false, 
            * or until the end of the array.
            * @param thisArg An object to which the this keyword can refer in the callbackfn function.
            * If thisArg is omitted, undefined is used as the this value.
            */
          every(callbackfn: (value: number, index: number, array: Int8Array) => boolean, thisArg?: any): boolean;
      
          /**
              * Returns the this object after filling the section identified by start and end with value
              * @param value value to fill array section with
              * @param start index to start filling the array at. If start is negative, it is treated as 
              * length+start where length is the length of the array. 
              * @param end index to stop filling the array at. If end is negative, it is treated as 
              * length+end.
              */
          fill(value: number, start?: number, end?: number): Int8Array;
      
          /**
            * Returns the elements of an array that meet the condition specified in a callback function. 
            * @param callbackfn A function that accepts up to three arguments. The filter method calls 
            * the callbackfn function one time for each element in the array. 
            * @param thisArg An object to which the this keyword can refer in the callbackfn function. 
            * If thisArg is omitted, undefined is used as the this value.
            */
          filter(callbackfn: (value: number, index: number, array: Int8Array) => boolean, thisArg?: any): Int8Array;
      
          /** 
            * Returns the value of the first element in the array where predicate is true, and undefined 
            * otherwise.
            * @param predicate find calls predicate once for each element of the array, in ascending 
            * order, until it finds one where predicate returns true. If such an element is found, find 
            * immediately returns that element value. Otherwise, find returns undefined.
            * @param thisArg If provided, it will be used as the this value for each invocation of 
            * predicate. If it is not provided, undefined is used instead.
            */
          find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
      
          /** 
            * Returns the index of the first element in the array where predicate is true, and undefined 
            * otherwise.
            * @param predicate find calls predicate once for each element of the array, in ascending 
            * order, until it finds one where predicate returns true. If such an element is found, find 
            * immediately returns that element value. Otherwise, find returns undefined.
            * @param thisArg If provided, it will be used as the this value for each invocation of 
            * predicate. If it is not provided, undefined is used instead.
            */
          findIndex(predicate: (value: number) => boolean, thisArg?: any): number;
      
          /**
            * Performs the specified action for each element in an array.
            * @param callbackfn  A function that accepts up to three arguments. forEach calls the 
            * callbackfn function one time for each element in the array. 
            * @param thisArg  An object to which the this keyword can refer in the callbackfn function. 
            * If thisArg is omitted, undefined is used as the this value.
            */
          forEach(callbackfn: (value: number, index: number, array: Int8Array) => void, thisArg?: any): void;
      
          /**
            * Returns the index of the first occurrence of a value in an array.
            * @param searchElement The value to locate in the array.
            * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
            *  search starts at index 0.
            */
          indexOf(searchElement: number, fromIndex?: number): number;
      
          /**
            * Adds all the elements of an array separated by the specified separator string.
            * @param separator A string used to separate one element of an array from the next in the 
            * resulting String. If omitted, the array elements are separated with a comma.
            */
          join(separator?: string): string;
      
          /**
            * Returns the index of the last occurrence of a value in an array.
            * @param searchElement The value to locate in the array.
            * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the 
            * search starts at index 0.
            */
          lastIndexOf(searchElement: number, fromIndex?: number): number;
      
          /**
            * The length of the array.
            */
          length: number;
      
          /**
            * Calls a defined callback function on each element of an array, and returns an array that 
            * contains the results.
            * @param callbackfn A function that accepts up to three arguments. The map method calls the 
            * callbackfn function one time for each element in the array. 
            * @param thisArg An object to which the this keyword can refer in the callbackfn function. 
            * If thisArg is omitted, undefined is used as the this value.
            */
          map(callbackfn: (value: number, index: number, array: Int8Array) => number, thisArg?: any): Int8Array;
      
          /**
            * Calls the specified callback function for all the elements in an array. The return value of 
            * the callback function is the accumulated result, and is provided as an argument in the next 
            * call to the callback function.
            * @param callbackfn A function that accepts up to four arguments. The reduce method calls the 
            * callbackfn function one time for each element in the array.
            * @param initialValue If initialValue is specified, it is used as the initial value to start 
            * the accumulation. The first call to the callbackfn function provides this value as an argument
            * instead of an array value.
            */
          reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number, initialValue?: number): number;
      
          /**
            * Calls the specified callback function for all the elements in an array. The return value of 
            * the callback function is the accumulated result, and is provided as an argument in the next 
            * call to the callback function.
            * @param callbackfn A function that accepts up to four arguments. The reduce method calls the 
            * callbackfn function one time for each element in the array.
            * @param initialValue If initialValue is specified, it is used as the initial value to start 
            * the accumulation. The first call to the callbackfn function provides this value as an argument 
            * instead of an array value.
            */
          reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int8Array) => U, initialValue: U): U;
      
          /** 
            * Calls the specified callback function for all the elements in an array, in descending order. 
            * The return value of the callback function is the accumulated result, and is provided as an 
            * argument in the next call to the callback function.
            * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls 
            * the callbackfn function one time for each element in the array. 
            * @param initialValue If initialValue is specified, it is used as the initial value to start 
            * the accumulation. The first call to the callbackfn function provides this value as an 
            * argument instead of an array value.
            */
          reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number, initialValue?: number): number;
      
          /** 
            * Calls the specified callback function for all the elements in an array, in descending order. 
            * The return value of the callback function is the accumulated result, and is provided as an 
            * argument in the next call to the callback function.
            * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
            * the callbackfn function one time for each element in the array. 
            * @param initialValue If initialValue is specified, it is used as the initial value to start 
            * the accumulation. The first call to the callbackfn function provides this value as an argument
            * instead of an array value.
            */
          reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int8Array) => U, initialValue: U): U;
      
          /**
            * Reverses the elements in an Array. 
            */
          reverse(): Int8Array;
      
          /**
            * Sets a value or an array of values.
            * @param index The index of the location to set.
            * @param value The value to set.
            */
          set(index: number, value: number): void;
      
          /**
            * Sets a value or an array of values.
            * @param array A typed or untyped array of values to set.
            * @param offset The index in the current array at which the values are to be written.
            */
          set(array: Int8Array, offset?: number): void;
      
          /** 
            * Returns a section of an array.
            * @param start The beginning of the specified portion of the array.
            * @param end The end of the specified portion of the array.
            */
          slice(start?: number, end?: number): Int8Array;
      
          /**
            * Determines whether the specified callback function returns true for any element of an array.
            * @param callbackfn A function that accepts up to three arguments. The some method calls the 
            * callbackfn function for each element in array1 until the callbackfn returns true, or until 
            * the end of the array.
            * @param thisArg An object to which the this keyword can refer in the callbackfn function. 
            * If thisArg is omitted, undefined is used as the this value.
            */
          some(callbackfn: (value: number, index: number, array: Int8Array) => boolean, thisArg?: any): boolean;
      
          /**
            * Sorts an array.
            * @param compareFn The name of the function used to determine the order of the elements. If 
            * omitted, the elements are sorted in ascending, ASCII character order.
            */
          sort(compareFn?: (a: number, b: number) => number): Int8Array;
      
          /**
            * Gets a new Int8Array view of the ArrayBuffer store for this array, referencing the elements
            * at begin, inclusive, up to end, exclusive. 
            * @param begin The index of the beginning of the array.
            * @param end The index of the end of the array.
            */
          subarray(begin: number, end?: number): Int8Array;
      
          /**
            * Converts a number to a string by using the current locale. 
            */
          toLocaleString(): string;
      
          /**
            * Returns a string representation of an array.
            */
          toString(): string;
      
          [index: number]: number;
      }
      interface Int8ArrayConstructor {
          prototype: Int8Array;
          new (length: number): Int8Array;
          new (array: Int8Array): Int8Array;
          new (array: number[]): Int8Array;
          new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int8Array;
      
          /**
            * The size in bytes of each element in the array. 
            */
          BYTES_PER_ELEMENT: number;
      
          /**
            * Returns a new array from a set of elements.
            * @param items A set of elements to include in the new array object.
            */
          of(...items: number[]): Int8Array;
      }
      declare var Int8Array: Int8ArrayConstructor;
      
      /**
        * A typed array of 8-bit unsigned integer values. The contents are initialized to 0. If the 
        * requested number of bytes could not be allocated an exception is raised.
        */
      interface Uint8Array {
          /**
            * The size in bytes of each element in the array. 
            */
          BYTES_PER_ELEMENT: number;
      
          /**
            * The ArrayBuffer instance referenced by the array. 
            */
          buffer: ArrayBuffer;
      
          /**
            * The length in bytes of the array.
            */
          byteLength: number;
      
          /**
            * The offset in bytes of the array.
            */
          byteOffset: number;
      
          /** 
            * Returns the this object after copying a section of the array identified by start and end
            * to the same array starting at position target
            * @param target If target is negative, it is treated as length+target where length is the 
            * length of the array. 
            * @param start If start is negative, it is treated as length+start. If end is negative, it 
            * is treated as length+end.
            * @param end If not specified, length of the this object is used as its default value. 
            */
          copyWithin(target: number, start: number, end?: number): Uint8Array;
      
          /**
            * Determines whether all the members of an array satisfy the specified test.
            * @param callbackfn A function that accepts up to three arguments. The every method calls 
            * the callbackfn function for each element in array1 until the callbackfn returns false, 
            * or until the end of the array.
            * @param thisArg An object to which the this keyword can refer in the callbackfn function.
            * If thisArg is omitted, undefined is used as the this value.
            */
          every(callbackfn: (value: number, index: number, array: Uint8Array) => boolean, thisArg?: any): boolean;
      
          /**
              * Returns the this object after filling the section identified by start and end with value
              * @param value value to fill array section with
              * @param start index to start filling the array at. If start is negative, it is treated as 
              * length+start where length is the length of the array. 
              * @param end index to stop filling the array at. If end is negative, it is treated as 
              * length+end.
              */
          fill(value: number, start?: number, end?: number): Uint8Array;
      
          /**
            * Returns the elements of an array that meet the condition specified in a callback function. 
            * @param callbackfn A function that accepts up to three arguments. The filter method calls 
            * the callbackfn function one time for each element in the array. 
            * @param thisArg An object to which the this keyword can refer in the callbackfn function. 
            * If thisArg is omitted, undefined is used as the this value.
            */
          filter(callbackfn: (value: number, index: number, array: Uint8Array) => boolean, thisArg?: any): Uint8Array;
      
          /** 
            * Returns the value of the first element in the array where predicate is true, and undefined 
            * otherwise.
            * @param predicate find calls predicate once for each element of the array, in ascending 
            * order, until it finds one where predicate returns true. If such an element is found, find 
            * immediately returns that element value. Otherwise, find returns undefined.
            * @param thisArg If provided, it will be used as the this value for each invocation of 
            * predicate. If it is not provided, undefined is used instead.
            */
          find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
      
          /** 
            * Returns the index of the first element in the array where predicate is true, and undefined 
            * otherwise.
            * @param predicate find calls predicate once for each element of the array, in ascending 
            * order, until it finds one where predicate returns true. If such an element is found, find 
            * immediately returns that element value. Otherwise, find returns undefined.
            * @param thisArg If provided, it will be used as the this value for each invocation of 
            * predicate. If it is not provided, undefined is used instead.
            */
          findIndex(predicate: (value: number) => boolean, thisArg?: any): number;
      
          /**
            * Performs the specified action for each element in an array.
            * @param callbackfn  A function that accepts up to three arguments. forEach calls the 
            * callbackfn function one time for each element in the array. 
            * @param thisArg  An object to which the this keyword can refer in the callbackfn function. 
            * If thisArg is omitted, undefined is used as the this value.
            */
          forEach(callbackfn: (value: number, index: number, array: Uint8Array) => void, thisArg?: any): void;
      
          /**
            * Returns the index of the first occurrence of a value in an array.
            * @param searchElement The value to locate in the array.
            * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
            *  search starts at index 0.
            */
          indexOf(searchElement: number, fromIndex?: number): number;
      
          /**
            * Adds all the elements of an array separated by the specified separator string.
            * @param separator A string used to separate one element of an array from the next in the 
            * resulting String. If omitted, the array elements are separated with a comma.
            */
          join(separator?: string): string;
      
          /**
            * Returns the index of the last occurrence of a value in an array.
            * @param searchElement The value to locate in the array.
            * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the 
            * search starts at index 0.
            */
          lastIndexOf(searchElement: number, fromIndex?: number): number;
      
          /**
            * The length of the array.
            */
          length: number;
      
          /**
            * Calls a defined callback function on each element of an array, and returns an array that 
            * contains the results.
            * @param callbackfn A function that accepts up to three arguments. The map method calls the 
            * callbackfn function one time for each element in the array. 
            * @param thisArg An object to which the this keyword can refer in the callbackfn function. 
            * If thisArg is omitted, undefined is used as the this value.
            */
          map(callbackfn: (value: number, index: number, array: Uint8Array) => number, thisArg?: any): Uint8Array;
      
          /**
            * Calls the specified callback function for all the elements in an array. The return value of 
            * the callback function is the accumulated result, and is provided as an argument in the next 
            * call to the callback function.
            * @param callbackfn A function that accepts up to four arguments. The reduce method calls the 
            * callbackfn function one time for each element in the array.
            * @param initialValue If initialValue is specified, it is used as the initial value to start 
            * the accumulation. The first call to the callbackfn function provides this value as an argument
            * instead of an array value.
            */
          reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number, initialValue?: number): number;
      
          /**
            * Calls the specified callback function for all the elements in an array. The return value of 
            * the callback function is the accumulated result, and is provided as an argument in the next 
            * call to the callback function.
            * @param callbackfn A function that accepts up to four arguments. The reduce method calls the 
            * callbackfn function one time for each element in the array.
            * @param initialValue If initialValue is specified, it is used as the initial value to start 
            * the accumulation. The first call to the callbackfn function provides this value as an argument 
            * instead of an array value.
            */
          reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8Array) => U, initialValue: U): U;
      
          /** 
            * Calls the specified callback function for all the elements in an array, in descending order. 
            * The return value of the callback function is the accumulated result, and is provided as an 
            * argument in the next call to the callback function.
            * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls 
            * the callbackfn function one time for each element in the array. 
            * @param initialValue If initialValue is specified, it is used as the initial value to start 
            * the accumulation. The first call to the callbackfn function provides this value as an 
            * argument instead of an array value.
            */
          reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number, initialValue?: number): number;
      
          /** 
            * Calls the specified callback function for all the elements in an array, in descending order. 
            * The return value of the callback function is the accumulated result, and is provided as an 
            * argument in the next call to the callback function.
            * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
            * the callbackfn function one time for each element in the array. 
            * @param initialValue If initialValue is specified, it is used as the initial value to start 
            * the accumulation. The first call to the callbackfn function provides this value as an argument
            * instead of an array value.
            */
          reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8Array) => U, initialValue: U): U;
      
          /**
            * Reverses the elements in an Array. 
            */
          reverse(): Uint8Array;
      
          /**
            * Sets a value or an array of values.
            * @param index The index of the location to set.
            * @param value The value to set.
            */
          set(index: number, value: number): void;
      
          /**
            * Sets a value or an array of values.
            * @param array A typed or untyped array of values to set.
            * @param offset The index in the current array at which the values are to be written.
            */
          set(array: Uint8Array, offset?: number): void;
      
          /** 
            * Returns a section of an array.
            * @param start The beginning of the specified portion of the array.
            * @param end The end of the specified portion of the array.
            */
          slice(start?: number, end?: number): Uint8Array;
      
          /**
            * Determines whether the specified callback function returns true for any element of an array.
            * @param callbackfn A function that accepts up to three arguments. The some method calls the 
            * callbackfn function for each element in array1 until the callbackfn returns true, or until 
            * the end of the array.
            * @param thisArg An object to which the this keyword can refer in the callbackfn function. 
            * If thisArg is omitted, undefined is used as the this value.
            */
          some(callbackfn: (value: number, index: number, array: Uint8Array) => boolean, thisArg?: any): boolean;
      
          /**
            * Sorts an array.
            * @param compareFn The name of the function used to determine the order of the elements. If 
            * omitted, the elements are sorted in ascending, ASCII character order.
            */
          sort(compareFn?: (a: number, b: number) => number): Uint8Array;
      
          /**
            * Gets a new Uint8Array view of the ArrayBuffer store for this array, referencing the elements
            * at begin, inclusive, up to end, exclusive. 
            * @param begin The index of the beginning of the array.
            * @param end The index of the end of the array.
            */
          subarray(begin: number, end?: number): Uint8Array;
      
          /**
            * Converts a number to a string by using the current locale. 
            */
          toLocaleString(): string;
      
          /**
            * Returns a string representation of an array.
            */
          toString(): string;
      
          [index: number]: number;
      }
      
      interface Uint8ArrayConstructor {
          prototype: Uint8Array;
          new (length: number): Uint8Array;
          new (array: Uint8Array): Uint8Array;
          new (array: number[]): Uint8Array;
          new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8Array;
      
          /**
            * The size in bytes of each element in the array. 
            */
          BYTES_PER_ELEMENT: number;
      
          /**
            * Returns a new array from a set of elements.
            * @param items A set of elements to include in the new array object.
            */
          of(...items: number[]): Uint8Array;
      }
      declare var Uint8Array: Uint8ArrayConstructor;
      
      /**
        * A typed array of 16-bit signed integer values. The contents are initialized to 0. If the 
        * requested number of bytes could not be allocated an exception is raised.
        */
      interface Int16Array {
          /**
            * The size in bytes of each element in the array. 
            */
          BYTES_PER_ELEMENT: number;
      
          /**
            * The ArrayBuffer instance referenced by the array. 
            */
          buffer: ArrayBuffer;
      
          /**
            * The length in bytes of the array.
            */
          byteLength: number;
      
          /**
            * The offset in bytes of the array.
            */
          byteOffset: number;
      
          /** 
            * Returns the this object after copying a section of the array identified by start and end
            * to the same array starting at position target
            * @param target If target is negative, it is treated as length+target where length is the 
            * length of the array. 
            * @param start If start is negative, it is treated as length+start. If end is negative, it 
            * is treated as length+end.
            * @param end If not specified, length of the this object is used as its default value. 
            */
          copyWithin(target: number, start: number, end?: number): Int16Array;
      
          /**
            * Determines whether all the members of an array satisfy the specified test.
            * @param callbackfn A function that accepts up to three arguments. The every method calls 
            * the callbackfn function for each element in array1 until the callbackfn returns false, 
            * or until the end of the array.
            * @param thisArg An object to which the this keyword can refer in the callbackfn function.
            * If thisArg is omitted, undefined is used as the this value.
            */
          every(callbackfn: (value: number, index: number, array: Int16Array) => boolean, thisArg?: any): boolean;
      
          /**
              * Returns the this object after filling the section identified by start and end with value
              * @param value value to fill array section with
              * @param start index to start filling the array at. If start is negative, it is treated as 
              * length+start where length is the length of the array. 
              * @param end index to stop filling the array at. If end is negative, it is treated as 
              * length+end.
              */
          fill(value: number, start?: number, end?: number): Int16Array;
      
          /**
            * Returns the elements of an array that meet the condition specified in a callback function. 
            * @param callbackfn A function that accepts up to three arguments. The filter method calls 
            * the callbackfn function one time for each element in the array. 
            * @param thisArg An object to which the this keyword can refer in the callbackfn function. 
            * If thisArg is omitted, undefined is used as the this value.
            */
          filter(callbackfn: (value: number, index: number, array: Int16Array) => boolean, thisArg?: any): Int16Array;
      
          /** 
            * Returns the value of the first element in the array where predicate is true, and undefined 
            * otherwise.
            * @param predicate find calls predicate once for each element of the array, in ascending 
            * order, until it finds one where predicate returns true. If such an element is found, find 
            * immediately returns that element value. Otherwise, find returns undefined.
            * @param thisArg If provided, it will be used as the this value for each invocation of 
            * predicate. If it is not provided, undefined is used instead.
            */
          find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
      
          /** 
            * Returns the index of the first element in the array where predicate is true, and undefined 
            * otherwise.
            * @param predicate find calls predicate once for each element of the array, in ascending 
            * order, until it finds one where predicate returns true. If such an element is found, find 
            * immediately returns that element value. Otherwise, find returns undefined.
            * @param thisArg If provided, it will be used as the this value for each invocation of 
            * predicate. If it is not provided, undefined is used instead.
            */
          findIndex(predicate: (value: number) => boolean, thisArg?: any): number;
      
          /**
            * Performs the specified action for each element in an array.
            * @param callbackfn  A function that accepts up to three arguments. forEach calls the 
            * callbackfn function one time for each element in the array. 
            * @param thisArg  An object to which the this keyword can refer in the callbackfn function. 
            * If thisArg is omitted, undefined is used as the this value.
            */
          forEach(callbackfn: (value: number, index: number, array: Int16Array) => void, thisArg?: any): void;
      
          /**
            * Returns the index of the first occurrence of a value in an array.
            * @param searchElement The value to locate in the array.
            * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
            *  search starts at index 0.
            */
          indexOf(searchElement: number, fromIndex?: number): number;
      
          /**
            * Adds all the elements of an array separated by the specified separator string.
            * @param separator A string used to separate one element of an array from the next in the 
            * resulting String. If omitted, the array elements are separated with a comma.
            */
          join(separator?: string): string;
      
          /**
            * Returns the index of the last occurrence of a value in an array.
            * @param searchElement The value to locate in the array.
            * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the 
            * search starts at index 0.
            */
          lastIndexOf(searchElement: number, fromIndex?: number): number;
      
          /**
            * The length of the array.
            */
          length: number;
      
          /**
            * Calls a defined callback function on each element of an array, and returns an array that 
            * contains the results.
            * @param callbackfn A function that accepts up to three arguments. The map method calls the 
            * callbackfn function one time for each element in the array. 
            * @param thisArg An object to which the this keyword can refer in the callbackfn function. 
            * If thisArg is omitted, undefined is used as the this value.
            */
          map(callbackfn: (value: number, index: number, array: Int16Array) => number, thisArg?: any): Int16Array;
      
          /**
            * Calls the specified callback function for all the elements in an array. The return value of 
            * the callback function is the accumulated result, and is provided as an argument in the next 
            * call to the callback function.
            * @param callbackfn A function that accepts up to four arguments. The reduce method calls the 
            * callbackfn function one time for each element in the array.
            * @param initialValue If initialValue is specified, it is used as the initial value to start 
            * the accumulation. The first call to the callbackfn function provides this value as an argument
            * instead of an array value.
            */
          reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number, initialValue?: number): number;
      
          /**
            * Calls the specified callback function for all the elements in an array. The return value of 
            * the callback function is the accumulated result, and is provided as an argument in the next 
            * call to the callback function.
            * @param callbackfn A function that accepts up to four arguments. The reduce method calls the 
            * callbackfn function one time for each element in the array.
            * @param initialValue If initialValue is specified, it is used as the initial value to start 
            * the accumulation. The first call to the callbackfn function provides this value as an argument 
            * instead of an array value.
            */
          reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int16Array) => U, initialValue: U): U;
      
          /** 
            * Calls the specified callback function for all the elements in an array, in descending order. 
            * The return value of the callback function is the accumulated result, and is provided as an 
            * argument in the next call to the callback function.
            * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls 
            * the callbackfn function one time for each element in the array. 
            * @param initialValue If initialValue is specified, it is used as the initial value to start 
            * the accumulation. The first call to the callbackfn function provides this value as an 
            * argument instead of an array value.
            */
          reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number, initialValue?: number): number;
      
          /** 
            * Calls the specified callback function for all the elements in an array, in descending order. 
            * The return value of the callback function is the accumulated result, and is provided as an 
            * argument in the next call to the callback function.
            * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
            * the callbackfn function one time for each element in the array. 
            * @param initialValue If initialValue is specified, it is used as the initial value to start 
            * the accumulation. The first call to the callbackfn function provides this value as an argument
            * instead of an array value.
            */
          reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int16Array) => U, initialValue: U): U;
      
          /**
            * Reverses the elements in an Array. 
            */
          reverse(): Int16Array;
      
          /**
            * Sets a value or an array of values.
            * @param index The index of the location to set.
            * @param value The value to set.
            */
          set(index: number, value: number): void;
      
          /**
            * Sets a value or an array of values.
            * @param array A typed or untyped array of values to set.
            * @param offset The index in the current array at which the values are to be written.
            */
          set(array: Int16Array, offset?: number): void;
      
          /** 
            * Returns a section of an array.
            * @param start The beginning of the specified portion of the array.
            * @param end The end of the specified portion of the array.
            */
          slice(start?: number, end?: number): Int16Array;
      
          /**
            * Determines whether the specified callback function returns true for any element of an array.
            * @param callbackfn A function that accepts up to three arguments. The some method calls the 
            * callbackfn function for each element in array1 until the callbackfn returns true, or until 
            * the end of the array.
            * @param thisArg An object to which the this keyword can refer in the callbackfn function. 
            * If thisArg is omitted, undefined is used as the this value.
            */
          some(callbackfn: (value: number, index: number, array: Int16Array) => boolean, thisArg?: any): boolean;
      
          /**
            * Sorts an array.
            * @param compareFn The name of the function used to determine the order of the elements. If 
            * omitted, the elements are sorted in ascending, ASCII character order.
            */
          sort(compareFn?: (a: number, b: number) => number): Int16Array;
      
          /**
            * Gets a new Int16Array view of the ArrayBuffer store for this array, referencing the elements
            * at begin, inclusive, up to end, exclusive. 
            * @param begin The index of the beginning of the array.
            * @param end The index of the end of the array.
            */
          subarray(begin: number, end?: number): Int16Array;
      
          /**
            * Converts a number to a string by using the current locale. 
            */
          toLocaleString(): string;
      
          /**
            * Returns a string representation of an array.
            */
          toString(): string;
      
          [index: number]: number;
      }
      
      interface Int16ArrayConstructor {
          prototype: Int16Array;
          new (length: number): Int16Array;
          new (array: Int16Array): Int16Array;
          new (array: number[]): Int16Array;
          new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int16Array;
      
          /**
            * The size in bytes of each element in the array. 
            */
          BYTES_PER_ELEMENT: number;
      
          /**
            * Returns a new array from a set of elements.
            * @param items A set of elements to include in the new array object.
            */
          of(...items: number[]): Int16Array;
      }
      declare var Int16Array: Int16ArrayConstructor;
      
      /**
        * A typed array of 16-bit unsigned integer values. The contents are initialized to 0. If the 
        * requested number of bytes could not be allocated an exception is raised.
        */
      interface Uint16Array {
          /**
            * The size in bytes of each element in the array. 
            */
          BYTES_PER_ELEMENT: number;
      
          /**
            * The ArrayBuffer instance referenced by the array. 
            */
          buffer: ArrayBuffer;
      
          /**
            * The length in bytes of the array.
            */
          byteLength: number;
      
          /**
            * The offset in bytes of the array.
            */
          byteOffset: number;
      
          /** 
            * Returns the this object after copying a section of the array identified by start and end
            * to the same array starting at position target
            * @param target If target is negative, it is treated as length+target where length is the 
            * length of the array. 
            * @param start If start is negative, it is treated as length+start. If end is negative, it 
            * is treated as length+end.
            * @param end If not specified, length of the this object is used as its default value. 
            */
          copyWithin(target: number, start: number, end?: number): Uint16Array;
      
          /**
            * Determines whether all the members of an array satisfy the specified test.
            * @param callbackfn A function that accepts up to three arguments. The every method calls 
            * the callbackfn function for each element in array1 until the callbackfn returns false, 
            * or until the end of the array.
            * @param thisArg An object to which the this keyword can refer in the callbackfn function.
            * If thisArg is omitted, undefined is used as the this value.
            */
          every(callbackfn: (value: number, index: number, array: Uint16Array) => boolean, thisArg?: any): boolean;
      
          /**
              * Returns the this object after filling the section identified by start and end with value
              * @param value value to fill array section with
              * @param start index to start filling the array at. If start is negative, it is treated as 
              * length+start where length is the length of the array. 
              * @param end index to stop filling the array at. If end is negative, it is treated as 
              * length+end.
              */
          fill(value: number, start?: number, end?: number): Uint16Array;
      
          /**
            * Returns the elements of an array that meet the condition specified in a callback function. 
            * @param callbackfn A function that accepts up to three arguments. The filter method calls 
            * the callbackfn function one time for each element in the array. 
            * @param thisArg An object to which the this keyword can refer in the callbackfn function. 
            * If thisArg is omitted, undefined is used as the this value.
            */
          filter(callbackfn: (value: number, index: number, array: Uint16Array) => boolean, thisArg?: any): Uint16Array;
      
          /** 
            * Returns the value of the first element in the array where predicate is true, and undefined 
            * otherwise.
            * @param predicate find calls predicate once for each element of the array, in ascending 
            * order, until it finds one where predicate returns true. If such an element is found, find 
            * immediately returns that element value. Otherwise, find returns undefined.
            * @param thisArg If provided, it will be used as the this value for each invocation of 
            * predicate. If it is not provided, undefined is used instead.
            */
          find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
      
          /** 
            * Returns the index of the first element in the array where predicate is true, and undefined 
            * otherwise.
            * @param predicate find calls predicate once for each element of the array, in ascending 
            * order, until it finds one where predicate returns true. If such an element is found, find 
            * immediately returns that element value. Otherwise, find returns undefined.
            * @param thisArg If provided, it will be used as the this value for each invocation of 
            * predicate. If it is not provided, undefined is used instead.
            */
          findIndex(predicate: (value: number) => boolean, thisArg?: any): number;
      
          /**
            * Performs the specified action for each element in an array.
            * @param callbackfn  A function that accepts up to three arguments. forEach calls the 
            * callbackfn function one time for each element in the array. 
            * @param thisArg  An object to which the this keyword can refer in the callbackfn function. 
            * If thisArg is omitted, undefined is used as the this value.
            */
          forEach(callbackfn: (value: number, index: number, array: Uint16Array) => void, thisArg?: any): void;
      
          /**
            * Returns the index of the first occurrence of a value in an array.
            * @param searchElement The value to locate in the array.
            * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
            *  search starts at index 0.
            */
          indexOf(searchElement: number, fromIndex?: number): number;
      
          /**
            * Adds all the elements of an array separated by the specified separator string.
            * @param separator A string used to separate one element of an array from the next in the 
            * resulting String. If omitted, the array elements are separated with a comma.
            */
          join(separator?: string): string;
      
          /**
            * Returns the index of the last occurrence of a value in an array.
            * @param searchElement The value to locate in the array.
            * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the 
            * search starts at index 0.
            */
          lastIndexOf(searchElement: number, fromIndex?: number): number;
      
          /**
            * The length of the array.
            */
          length: number;
      
          /**
            * Calls a defined callback function on each element of an array, and returns an array that 
            * contains the results.
            * @param callbackfn A function that accepts up to three arguments. The map method calls the 
            * callbackfn function one time for each element in the array. 
            * @param thisArg An object to which the this keyword can refer in the callbackfn function. 
            * If thisArg is omitted, undefined is used as the this value.
            */
          map(callbackfn: (value: number, index: number, array: Uint16Array) => number, thisArg?: any): Uint16Array;
      
          /**
            * Calls the specified callback function for all the elements in an array. The return value of 
            * the callback function is the accumulated result, and is provided as an argument in the next 
            * call to the callback function.
            * @param callbackfn A function that accepts up to four arguments. The reduce method calls the 
            * callbackfn function one time for each element in the array.
            * @param initialValue If initialValue is specified, it is used as the initial value to start 
            * the accumulation. The first call to the callbackfn function provides this value as an argument
            * instead of an array value.
            */
          reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number, initialValue?: number): number;
      
          /**
            * Calls the specified callback function for all the elements in an array. The return value of 
            * the callback function is the accumulated result, and is provided as an argument in the next 
            * call to the callback function.
            * @param callbackfn A function that accepts up to four arguments. The reduce method calls the 
            * callbackfn function one time for each element in the array.
            * @param initialValue If initialValue is specified, it is used as the initial value to start 
            * the accumulation. The first call to the callbackfn function provides this value as an argument 
            * instead of an array value.
            */
          reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint16Array) => U, initialValue: U): U;
      
          /** 
            * Calls the specified callback function for all the elements in an array, in descending order. 
            * The return value of the callback function is the accumulated result, and is provided as an 
            * argument in the next call to the callback function.
            * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls 
            * the callbackfn function one time for each element in the array. 
            * @param initialValue If initialValue is specified, it is used as the initial value to start 
            * the accumulation. The first call to the callbackfn function provides this value as an 
            * argument instead of an array value.
            */
          reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number, initialValue?: number): number;
      
          /** 
            * Calls the specified callback function for all the elements in an array, in descending order. 
            * The return value of the callback function is the accumulated result, and is provided as an 
            * argument in the next call to the callback function.
            * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
            * the callbackfn function one time for each element in the array. 
            * @param initialValue If initialValue is specified, it is used as the initial value to start 
            * the accumulation. The first call to the callbackfn function provides this value as an argument
            * instead of an array value.
            */
          reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint16Array) => U, initialValue: U): U;
      
          /**
            * Reverses the elements in an Array. 
            */
          reverse(): Uint16Array;
      
          /**
            * Sets a value or an array of values.
            * @param index The index of the location to set.
            * @param value The value to set.
            */
          set(index: number, value: number): void;
      
          /**
            * Sets a value or an array of values.
            * @param array A typed or untyped array of values to set.
            * @param offset The index in the current array at which the values are to be written.
            */
          set(array: Uint16Array, offset?: number): void;
      
          /** 
            * Returns a section of an array.
            * @param start The beginning of the specified portion of the array.
            * @param end The end of the specified portion of the array.
            */
          slice(start?: number, end?: number): Uint16Array;
      
          /**
            * Determines whether the specified callback function returns true for any element of an array.
            * @param callbackfn A function that accepts up to three arguments. The some method calls the 
            * callbackfn function for each element in array1 until the callbackfn returns true, or until 
            * the end of the array.
            * @param thisArg An object to which the this keyword can refer in the callbackfn function. 
            * If thisArg is omitted, undefined is used as the this value.
            */
          some(callbackfn: (value: number, index: number, array: Uint16Array) => boolean, thisArg?: any): boolean;
      
          /**
            * Sorts an array.
            * @param compareFn The name of the function used to determine the order of the elements. If 
            * omitted, the elements are sorted in ascending, ASCII character order.
            */
          sort(compareFn?: (a: number, b: number) => number): Uint16Array;
      
          /**
            * Gets a new Uint16Array view of the ArrayBuffer store for this array, referencing the elements
            * at begin, inclusive, up to end, exclusive. 
            * @param begin The index of the beginning of the array.
            * @param end The index of the end of the array.
            */
          subarray(begin: number, end?: number): Uint16Array;
      
          /**
            * Converts a number to a string by using the current locale. 
            */
          toLocaleString(): string;
      
          /**
            * Returns a string representation of an array.
            */
          toString(): string;
      
          [index: number]: number;
      }
      
      interface Uint16ArrayConstructor {
          prototype: Uint16Array;
          new (length: number): Uint16Array;
          new (array: Uint16Array): Uint16Array;
          new (array: number[]): Uint16Array;
          new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint16Array;
      
          /**
            * The size in bytes of each element in the array. 
            */
          BYTES_PER_ELEMENT: number;
      
          /**
            * Returns a new array from a set of elements.
            * @param items A set of elements to include in the new array object.
            */
          of(...items: number[]): Uint16Array;
      }
      declare var Uint16Array: Uint16ArrayConstructor;
      /**
        * A typed array of 32-bit signed integer values. The contents are initialized to 0. If the 
        * requested number of bytes could not be allocated an exception is raised.
        */
      interface Int32Array {
          /**
            * The size in bytes of each element in the array. 
            */
          BYTES_PER_ELEMENT: number;
      
          /**
            * The ArrayBuffer instance referenced by the array. 
            */
          buffer: ArrayBuffer;
      
          /**
            * The length in bytes of the array.
            */
          byteLength: number;
      
          /**
            * The offset in bytes of the array.
            */
          byteOffset: number;
      
          /** 
            * Returns the this object after copying a section of the array identified by start and end
            * to the same array starting at position target
            * @param target If target is negative, it is treated as length+target where length is the 
            * length of the array. 
            * @param start If start is negative, it is treated as length+start. If end is negative, it 
            * is treated as length+end.
            * @param end If not specified, length of the this object is used as its default value. 
            */
          copyWithin(target: number, start: number, end?: number): Int32Array;
      
          /**
            * Determines whether all the members of an array satisfy the specified test.
            * @param callbackfn A function that accepts up to three arguments. The every method calls 
            * the callbackfn function for each element in array1 until the callbackfn returns false, 
            * or until the end of the array.
            * @param thisArg An object to which the this keyword can refer in the callbackfn function.
            * If thisArg is omitted, undefined is used as the this value.
            */
          every(callbackfn: (value: number, index: number, array: Int32Array) => boolean, thisArg?: any): boolean;
      
          /**
              * Returns the this object after filling the section identified by start and end with value
              * @param value value to fill array section with
              * @param start index to start filling the array at. If start is negative, it is treated as 
              * length+start where length is the length of the array. 
              * @param end index to stop filling the array at. If end is negative, it is treated as 
              * length+end.
              */
          fill(value: number, start?: number, end?: number): Int32Array;
      
          /**
            * Returns the elements of an array that meet the condition specified in a callback function. 
            * @param callbackfn A function that accepts up to three arguments. The filter method calls 
            * the callbackfn function one time for each element in the array. 
            * @param thisArg An object to which the this keyword can refer in the callbackfn function. 
            * If thisArg is omitted, undefined is used as the this value.
            */
          filter(callbackfn: (value: number, index: number, array: Int32Array) => boolean, thisArg?: any): Int32Array;
      
          /** 
            * Returns the value of the first element in the array where predicate is true, and undefined 
            * otherwise.
            * @param predicate find calls predicate once for each element of the array, in ascending 
            * order, until it finds one where predicate returns true. If such an element is found, find 
            * immediately returns that element value. Otherwise, find returns undefined.
            * @param thisArg If provided, it will be used as the this value for each invocation of 
            * predicate. If it is not provided, undefined is used instead.
            */
          find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
      
          /** 
            * Returns the index of the first element in the array where predicate is true, and undefined 
            * otherwise.
            * @param predicate find calls predicate once for each element of the array, in ascending 
            * order, until it finds one where predicate returns true. If such an element is found, find 
            * immediately returns that element value. Otherwise, find returns undefined.
            * @param thisArg If provided, it will be used as the this value for each invocation of 
            * predicate. If it is not provided, undefined is used instead.
            */
          findIndex(predicate: (value: number) => boolean, thisArg?: any): number;
      
          /**
            * Performs the specified action for each element in an array.
            * @param callbackfn  A function that accepts up to three arguments. forEach calls the 
            * callbackfn function one time for each element in the array. 
            * @param thisArg  An object to which the this keyword can refer in the callbackfn function. 
            * If thisArg is omitted, undefined is used as the this value.
            */
          forEach(callbackfn: (value: number, index: number, array: Int32Array) => void, thisArg?: any): void;
      
          /**
            * Returns the index of the first occurrence of a value in an array.
            * @param searchElement The value to locate in the array.
            * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
            *  search starts at index 0.
            */
          indexOf(searchElement: number, fromIndex?: number): number;
      
          /**
            * Adds all the elements of an array separated by the specified separator string.
            * @param separator A string used to separate one element of an array from the next in the 
            * resulting String. If omitted, the array elements are separated with a comma.
            */
          join(separator?: string): string;
      
          /**
            * Returns the index of the last occurrence of a value in an array.
            * @param searchElement The value to locate in the array.
            * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the 
            * search starts at index 0.
            */
          lastIndexOf(searchElement: number, fromIndex?: number): number;
      
          /**
            * The length of the array.
            */
          length: number;
      
          /**
            * Calls a defined callback function on each element of an array, and returns an array that 
            * contains the results.
            * @param callbackfn A function that accepts up to three arguments. The map method calls the 
            * callbackfn function one time for each element in the array. 
            * @param thisArg An object to which the this keyword can refer in the callbackfn function. 
            * If thisArg is omitted, undefined is used as the this value.
            */
          map(callbackfn: (value: number, index: number, array: Int32Array) => number, thisArg?: any): Int32Array;
      
          /**
            * Calls the specified callback function for all the elements in an array. The return value of 
            * the callback function is the accumulated result, and is provided as an argument in the next 
            * call to the callback function.
            * @param callbackfn A function that accepts up to four arguments. The reduce method calls the 
            * callbackfn function one time for each element in the array.
            * @param initialValue If initialValue is specified, it is used as the initial value to start 
            * the accumulation. The first call to the callbackfn function provides this value as an argument
            * instead of an array value.
            */
          reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number, initialValue?: number): number;
      
          /**
            * Calls the specified callback function for all the elements in an array. The return value of 
            * the callback function is the accumulated result, and is provided as an argument in the next 
            * call to the callback function.
            * @param callbackfn A function that accepts up to four arguments. The reduce method calls the 
            * callbackfn function one time for each element in the array.
            * @param initialValue If initialValue is specified, it is used as the initial value to start 
            * the accumulation. The first call to the callbackfn function provides this value as an argument 
            * instead of an array value.
            */
          reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int32Array) => U, initialValue: U): U;
      
          /** 
            * Calls the specified callback function for all the elements in an array, in descending order. 
            * The return value of the callback function is the accumulated result, and is provided as an 
            * argument in the next call to the callback function.
            * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls 
            * the callbackfn function one time for each element in the array. 
            * @param initialValue If initialValue is specified, it is used as the initial value to start 
            * the accumulation. The first call to the callbackfn function provides this value as an 
            * argument instead of an array value.
            */
          reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number, initialValue?: number): number;
      
          /** 
            * Calls the specified callback function for all the elements in an array, in descending order. 
            * The return value of the callback function is the accumulated result, and is provided as an 
            * argument in the next call to the callback function.
            * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
            * the callbackfn function one time for each element in the array. 
            * @param initialValue If initialValue is specified, it is used as the initial value to start 
            * the accumulation. The first call to the callbackfn function provides this value as an argument
            * instead of an array value.
            */
          reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int32Array) => U, initialValue: U): U;
      
          /**
            * Reverses the elements in an Array. 
            */
          reverse(): Int32Array;
      
          /**
            * Sets a value or an array of values.
            * @param index The index of the location to set.
            * @param value The value to set.
            */
          set(index: number, value: number): void;
      
          /**
            * Sets a value or an array of values.
            * @param array A typed or untyped array of values to set.
            * @param offset The index in the current array at which the values are to be written.
            */
          set(array: Int32Array, offset?: number): void;
      
          /** 
            * Returns a section of an array.
            * @param start The beginning of the specified portion of the array.
            * @param end The end of the specified portion of the array.
            */
          slice(start?: number, end?: number): Int32Array;
      
          /**
            * Determines whether the specified callback function returns true for any element of an array.
            * @param callbackfn A function that accepts up to three arguments. The some method calls the 
            * callbackfn function for each element in array1 until the callbackfn returns true, or until 
            * the end of the array.
            * @param thisArg An object to which the this keyword can refer in the callbackfn function. 
            * If thisArg is omitted, undefined is used as the this value.
            */
          some(callbackfn: (value: number, index: number, array: Int32Array) => boolean, thisArg?: any): boolean;
      
          /**
            * Sorts an array.
            * @param compareFn The name of the function used to determine the order of the elements. If 
            * omitted, the elements are sorted in ascending, ASCII character order.
            */
          sort(compareFn?: (a: number, b: number) => number): Int32Array;
      
          /**
            * Gets a new Int32Array view of the ArrayBuffer store for this array, referencing the elements
            * at begin, inclusive, up to end, exclusive. 
            * @param begin The index of the beginning of the array.
            * @param end The index of the end of the array.
            */
          subarray(begin: number, end?: number): Int32Array;
      
          /**
            * Converts a number to a string by using the current locale. 
            */
          toLocaleString(): string;
      
          /**
            * Returns a string representation of an array.
            */
          toString(): string;
      
          [index: number]: number;
      }
      
      interface Int32ArrayConstructor {
          prototype: Int32Array;
          new (length: number): Int32Array;
          new (array: Int32Array): Int32Array;
          new (array: number[]): Int32Array;
          new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int32Array;
      
          /**
            * The size in bytes of each element in the array. 
            */
          BYTES_PER_ELEMENT: number;
      
          /**
            * Returns a new array from a set of elements.
            * @param items A set of elements to include in the new array object.
            */
          of(...items: number[]): Int32Array;
      }
      declare var Int32Array: Int32ArrayConstructor;
      
      /**
        * A typed array of 32-bit unsigned integer values. The contents are initialized to 0. If the 
        * requested number of bytes could not be allocated an exception is raised.
        */
      interface Uint32Array {
          /**
            * The size in bytes of each element in the array. 
            */
          BYTES_PER_ELEMENT: number;
      
          /**
            * The ArrayBuffer instance referenced by the array. 
            */
          buffer: ArrayBuffer;
      
          /**
            * The length in bytes of the array.
            */
          byteLength: number;
      
          /**
            * The offset in bytes of the array.
            */
          byteOffset: number;
      
          /** 
            * Returns the this object after copying a section of the array identified by start and end
            * to the same array starting at position target
            * @param target If target is negative, it is treated as length+target where length is the 
            * length of the array. 
            * @param start If start is negative, it is treated as length+start. If end is negative, it 
            * is treated as length+end.
            * @param end If not specified, length of the this object is used as its default value. 
            */
          copyWithin(target: number, start: number, end?: number): Uint32Array;
      
          /**
            * Determines whether all the members of an array satisfy the specified test.
            * @param callbackfn A function that accepts up to three arguments. The every method calls 
            * the callbackfn function for each element in array1 until the callbackfn returns false, 
            * or until the end of the array.
            * @param thisArg An object to which the this keyword can refer in the callbackfn function.
            * If thisArg is omitted, undefined is used as the this value.
            */
          every(callbackfn: (value: number, index: number, array: Uint32Array) => boolean, thisArg?: any): boolean;
      
          /**
              * Returns the this object after filling the section identified by start and end with value
              * @param value value to fill array section with
              * @param start index to start filling the array at. If start is negative, it is treated as 
              * length+start where length is the length of the array. 
              * @param end index to stop filling the array at. If end is negative, it is treated as 
              * length+end.
              */
          fill(value: number, start?: number, end?: number): Uint32Array;
      
          /**
            * Returns the elements of an array that meet the condition specified in a callback function. 
            * @param callbackfn A function that accepts up to three arguments. The filter method calls 
            * the callbackfn function one time for each element in the array. 
            * @param thisArg An object to which the this keyword can refer in the callbackfn function. 
            * If thisArg is omitted, undefined is used as the this value.
            */
          filter(callbackfn: (value: number, index: number, array: Uint32Array) => boolean, thisArg?: any): Uint32Array;
      
          /** 
            * Returns the value of the first element in the array where predicate is true, and undefined 
            * otherwise.
            * @param predicate find calls predicate once for each element of the array, in ascending 
            * order, until it finds one where predicate returns true. If such an element is found, find 
            * immediately returns that element value. Otherwise, find returns undefined.
            * @param thisArg If provided, it will be used as the this value for each invocation of 
            * predicate. If it is not provided, undefined is used instead.
            */
          find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
      
          /** 
            * Returns the index of the first element in the array where predicate is true, and undefined 
            * otherwise.
            * @param predicate find calls predicate once for each element of the array, in ascending 
            * order, until it finds one where predicate returns true. If such an element is found, find 
            * immediately returns that element value. Otherwise, find returns undefined.
            * @param thisArg If provided, it will be used as the this value for each invocation of 
            * predicate. If it is not provided, undefined is used instead.
            */
          findIndex(predicate: (value: number) => boolean, thisArg?: any): number;
      
          /**
            * Performs the specified action for each element in an array.
            * @param callbackfn  A function that accepts up to three arguments. forEach calls the 
            * callbackfn function one time for each element in the array. 
            * @param thisArg  An object to which the this keyword can refer in the callbackfn function. 
            * If thisArg is omitted, undefined is used as the this value.
            */
          forEach(callbackfn: (value: number, index: number, array: Uint32Array) => void, thisArg?: any): void;
      
          /**
            * Returns the index of the first occurrence of a value in an array.
            * @param searchElement The value to locate in the array.
            * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
            *  search starts at index 0.
            */
          indexOf(searchElement: number, fromIndex?: number): number;
      
          /**
            * Adds all the elements of an array separated by the specified separator string.
            * @param separator A string used to separate one element of an array from the next in the 
            * resulting String. If omitted, the array elements are separated with a comma.
            */
          join(separator?: string): string;
      
          /**
            * Returns the index of the last occurrence of a value in an array.
            * @param searchElement The value to locate in the array.
            * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the 
            * search starts at index 0.
            */
          lastIndexOf(searchElement: number, fromIndex?: number): number;
      
          /**
            * The length of the array.
            */
          length: number;
      
          /**
            * Calls a defined callback function on each element of an array, and returns an array that 
            * contains the results.
            * @param callbackfn A function that accepts up to three arguments. The map method calls the 
            * callbackfn function one time for each element in the array. 
            * @param thisArg An object to which the this keyword can refer in the callbackfn function. 
            * If thisArg is omitted, undefined is used as the this value.
            */
          map(callbackfn: (value: number, index: number, array: Uint32Array) => number, thisArg?: any): Uint32Array;
      
          /**
            * Calls the specified callback function for all the elements in an array. The return value of 
            * the callback function is the accumulated result, and is provided as an argument in the next 
            * call to the callback function.
            * @param callbackfn A function that accepts up to four arguments. The reduce method calls the 
            * callbackfn function one time for each element in the array.
            * @param initialValue If initialValue is specified, it is used as the initial value to start 
            * the accumulation. The first call to the callbackfn function provides this value as an argument
            * instead of an array value.
            */
          reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number, initialValue?: number): number;
      
          /**
            * Calls the specified callback function for all the elements in an array. The return value of 
            * the callback function is the accumulated result, and is provided as an argument in the next 
            * call to the callback function.
            * @param callbackfn A function that accepts up to four arguments. The reduce method calls the 
            * callbackfn function one time for each element in the array.
            * @param initialValue If initialValue is specified, it is used as the initial value to start 
            * the accumulation. The first call to the callbackfn function provides this value as an argument 
            * instead of an array value.
            */
          reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint32Array) => U, initialValue: U): U;
      
          /** 
            * Calls the specified callback function for all the elements in an array, in descending order. 
            * The return value of the callback function is the accumulated result, and is provided as an 
            * argument in the next call to the callback function.
            * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls 
            * the callbackfn function one time for each element in the array. 
            * @param initialValue If initialValue is specified, it is used as the initial value to start 
            * the accumulation. The first call to the callbackfn function provides this value as an 
            * argument instead of an array value.
            */
          reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number, initialValue?: number): number;
      
          /** 
            * Calls the specified callback function for all the elements in an array, in descending order. 
            * The return value of the callback function is the accumulated result, and is provided as an 
            * argument in the next call to the callback function.
            * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
            * the callbackfn function one time for each element in the array. 
            * @param initialValue If initialValue is specified, it is used as the initial value to start 
            * the accumulation. The first call to the callbackfn function provides this value as an argument
            * instead of an array value.
            */
          reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint32Array) => U, initialValue: U): U;
      
          /**
            * Reverses the elements in an Array. 
            */
          reverse(): Uint32Array;
      
          /**
            * Sets a value or an array of values.
            * @param index The index of the location to set.
            * @param value The value to set.
            */
          set(index: number, value: number): void;
      
          /**
            * Sets a value or an array of values.
            * @param array A typed or untyped array of values to set.
            * @param offset The index in the current array at which the values are to be written.
            */
          set(array: Uint32Array, offset?: number): void;
      
          /** 
            * Returns a section of an array.
            * @param start The beginning of the specified portion of the array.
            * @param end The end of the specified portion of the array.
            */
          slice(start?: number, end?: number): Uint32Array;
      
          /**
            * Determines whether the specified callback function returns true for any element of an array.
            * @param callbackfn A function that accepts up to three arguments. The some method calls the 
            * callbackfn function for each element in array1 until the callbackfn returns true, or until 
            * the end of the array.
            * @param thisArg An object to which the this keyword can refer in the callbackfn function. 
            * If thisArg is omitted, undefined is used as the this value.
            */
          some(callbackfn: (value: number, index: number, array: Uint32Array) => boolean, thisArg?: any): boolean;
      
          /**
            * Sorts an array.
            * @param compareFn The name of the function used to determine the order of the elements. If 
            * omitted, the elements are sorted in ascending, ASCII character order.
            */
          sort(compareFn?: (a: number, b: number) => number): Uint32Array;
      
          /**
            * Gets a new Uint32Array view of the ArrayBuffer store for this array, referencing the elements
            * at begin, inclusive, up to end, exclusive. 
            * @param begin The index of the beginning of the array.
            * @param end The index of the end of the array.
            */
          subarray(begin: number, end?: number): Uint32Array;
      
          /**
            * Converts a number to a string by using the current locale. 
            */
          toLocaleString(): string;
      
          /**
            * Returns a string representation of an array.
            */
          toString(): string;
      
          [index: number]: number;
      }
      
      interface Uint32ArrayConstructor {
          prototype: Uint32Array;
          new (length: number): Uint32Array;
          new (array: Uint32Array): Uint32Array;
          new (array: number[]): Uint32Array;
          new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint32Array;
      
          /**
            * The size in bytes of each element in the array. 
            */
          BYTES_PER_ELEMENT: number;
      
          /**
            * Returns a new array from a set of elements.
            * @param items A set of elements to include in the new array object.
            */
          of(...items: number[]): Uint32Array;
      }
      declare var Uint32Array: Uint32ArrayConstructor;
      
      /**
        * A typed array of 32-bit float values. The contents are initialized to 0. If the requested number
        * of bytes could not be allocated an exception is raised.
        */
      interface Float32Array {
          /**
            * The size in bytes of each element in the array. 
            */
          BYTES_PER_ELEMENT: number;
      
          /**
            * The ArrayBuffer instance referenced by the array. 
            */
          buffer: ArrayBuffer;
      
          /**
            * The length in bytes of the array.
            */
          byteLength: number;
      
          /**
            * The offset in bytes of the array.
            */
          byteOffset: number;
      
          /** 
            * Returns the this object after copying a section of the array identified by start and end
            * to the same array starting at position target
            * @param target If target is negative, it is treated as length+target where length is the 
            * length of the array. 
            * @param start If start is negative, it is treated as length+start. If end is negative, it 
            * is treated as length+end.
            * @param end If not specified, length of the this object is used as its default value. 
            */
          copyWithin(target: number, start: number, end?: number): Float32Array;
      
          /**
            * Determines whether all the members of an array satisfy the specified test.
            * @param callbackfn A function that accepts up to three arguments. The every method calls 
            * the callbackfn function for each element in array1 until the callbackfn returns false, 
            * or until the end of the array.
            * @param thisArg An object to which the this keyword can refer in the callbackfn function.
            * If thisArg is omitted, undefined is used as the this value.
            */
          every(callbackfn: (value: number, index: number, array: Float32Array) => boolean, thisArg?: any): boolean;
      
          /**
              * Returns the this object after filling the section identified by start and end with value
              * @param value value to fill array section with
              * @param start index to start filling the array at. If start is negative, it is treated as 
              * length+start where length is the length of the array. 
              * @param end index to stop filling the array at. If end is negative, it is treated as 
              * length+end.
              */
          fill(value: number, start?: number, end?: number): Float32Array;
      
          /**
            * Returns the elements of an array that meet the condition specified in a callback function. 
            * @param callbackfn A function that accepts up to three arguments. The filter method calls 
            * the callbackfn function one time for each element in the array. 
            * @param thisArg An object to which the this keyword can refer in the callbackfn function. 
            * If thisArg is omitted, undefined is used as the this value.
            */
          filter(callbackfn: (value: number, index: number, array: Float32Array) => boolean, thisArg?: any): Float32Array;
      
          /** 
            * Returns the value of the first element in the array where predicate is true, and undefined 
            * otherwise.
            * @param predicate find calls predicate once for each element of the array, in ascending 
            * order, until it finds one where predicate returns true. If such an element is found, find 
            * immediately returns that element value. Otherwise, find returns undefined.
            * @param thisArg If provided, it will be used as the this value for each invocation of 
            * predicate. If it is not provided, undefined is used instead.
            */
          find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
      
          /** 
            * Returns the index of the first element in the array where predicate is true, and undefined 
            * otherwise.
            * @param predicate find calls predicate once for each element of the array, in ascending 
            * order, until it finds one where predicate returns true. If such an element is found, find 
            * immediately returns that element value. Otherwise, find returns undefined.
            * @param thisArg If provided, it will be used as the this value for each invocation of 
            * predicate. If it is not provided, undefined is used instead.
            */
          findIndex(predicate: (value: number) => boolean, thisArg?: any): number;
      
          /**
            * Performs the specified action for each element in an array.
            * @param callbackfn  A function that accepts up to three arguments. forEach calls the 
            * callbackfn function one time for each element in the array. 
            * @param thisArg  An object to which the this keyword can refer in the callbackfn function. 
            * If thisArg is omitted, undefined is used as the this value.
            */
          forEach(callbackfn: (value: number, index: number, array: Float32Array) => void, thisArg?: any): void;
      
          /**
            * Returns the index of the first occurrence of a value in an array.
            * @param searchElement The value to locate in the array.
            * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
            *  search starts at index 0.
            */
          indexOf(searchElement: number, fromIndex?: number): number;
      
          /**
            * Adds all the elements of an array separated by the specified separator string.
            * @param separator A string used to separate one element of an array from the next in the 
            * resulting String. If omitted, the array elements are separated with a comma.
            */
          join(separator?: string): string;
      
          /**
            * Returns the index of the last occurrence of a value in an array.
            * @param searchElement The value to locate in the array.
            * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the 
            * search starts at index 0.
            */
          lastIndexOf(searchElement: number, fromIndex?: number): number;
      
          /**
            * The length of the array.
            */
          length: number;
      
          /**
            * Calls a defined callback function on each element of an array, and returns an array that 
            * contains the results.
            * @param callbackfn A function that accepts up to three arguments. The map method calls the 
            * callbackfn function one time for each element in the array. 
            * @param thisArg An object to which the this keyword can refer in the callbackfn function. 
            * If thisArg is omitted, undefined is used as the this value.
            */
          map(callbackfn: (value: number, index: number, array: Float32Array) => number, thisArg?: any): Float32Array;
      
          /**
            * Calls the specified callback function for all the elements in an array. The return value of 
            * the callback function is the accumulated result, and is provided as an argument in the next 
            * call to the callback function.
            * @param callbackfn A function that accepts up to four arguments. The reduce method calls the 
            * callbackfn function one time for each element in the array.
            * @param initialValue If initialValue is specified, it is used as the initial value to start 
            * the accumulation. The first call to the callbackfn function provides this value as an argument
            * instead of an array value.
            */
          reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number, initialValue?: number): number;
      
          /**
            * Calls the specified callback function for all the elements in an array. The return value of 
            * the callback function is the accumulated result, and is provided as an argument in the next 
            * call to the callback function.
            * @param callbackfn A function that accepts up to four arguments. The reduce method calls the 
            * callbackfn function one time for each element in the array.
            * @param initialValue If initialValue is specified, it is used as the initial value to start 
            * the accumulation. The first call to the callbackfn function provides this value as an argument 
            * instead of an array value.
            */
          reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float32Array) => U, initialValue: U): U;
      
          /** 
            * Calls the specified callback function for all the elements in an array, in descending order. 
            * The return value of the callback function is the accumulated result, and is provided as an 
            * argument in the next call to the callback function.
            * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls 
            * the callbackfn function one time for each element in the array. 
            * @param initialValue If initialValue is specified, it is used as the initial value to start 
            * the accumulation. The first call to the callbackfn function provides this value as an 
            * argument instead of an array value.
            */
          reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number, initialValue?: number): number;
      
          /** 
            * Calls the specified callback function for all the elements in an array, in descending order. 
            * The return value of the callback function is the accumulated result, and is provided as an 
            * argument in the next call to the callback function.
            * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
            * the callbackfn function one time for each element in the array. 
            * @param initialValue If initialValue is specified, it is used as the initial value to start 
            * the accumulation. The first call to the callbackfn function provides this value as an argument
            * instead of an array value.
            */
          reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float32Array) => U, initialValue: U): U;
      
          /**
            * Reverses the elements in an Array. 
            */
          reverse(): Float32Array;
      
          /**
            * Sets a value or an array of values.
            * @param index The index of the location to set.
            * @param value The value to set.
            */
          set(index: number, value: number): void;
      
          /**
            * Sets a value or an array of values.
            * @param array A typed or untyped array of values to set.
            * @param offset The index in the current array at which the values are to be written.
            */
          set(array: Float32Array, offset?: number): void;
      
          /** 
            * Returns a section of an array.
            * @param start The beginning of the specified portion of the array.
            * @param end The end of the specified portion of the array.
            */
          slice(start?: number, end?: number): Float32Array;
      
          /**
            * Determines whether the specified callback function returns true for any element of an array.
            * @param callbackfn A function that accepts up to three arguments. The some method calls the 
            * callbackfn function for each element in array1 until the callbackfn returns true, or until 
            * the end of the array.
            * @param thisArg An object to which the this keyword can refer in the callbackfn function. 
            * If thisArg is omitted, undefined is used as the this value.
            */
          some(callbackfn: (value: number, index: number, array: Float32Array) => boolean, thisArg?: any): boolean;
      
          /**
            * Sorts an array.
            * @param compareFn The name of the function used to determine the order of the elements. If 
            * omitted, the elements are sorted in ascending, ASCII character order.
            */
          sort(compareFn?: (a: number, b: number) => number): Float32Array;
      
          /**
            * Gets a new Float32Array view of the ArrayBuffer store for this array, referencing the elements
            * at begin, inclusive, up to end, exclusive. 
            * @param begin The index of the beginning of the array.
            * @param end The index of the end of the array.
            */
          subarray(begin: number, end?: number): Float32Array;
      
          /**
            * Converts a number to a string by using the current locale. 
            */
          toLocaleString(): string;
      
          /**
            * Returns a string representation of an array.
            */
          toString(): string;
      
          [index: number]: number;
      }
      
      interface Float32ArrayConstructor {
          prototype: Float32Array;
          new (length: number): Float32Array;
          new (array: Float32Array): Float32Array;
          new (array: number[]): Float32Array;
          new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float32Array;
      
          /**
            * The size in bytes of each element in the array. 
            */
          BYTES_PER_ELEMENT: number;
      
          /**
            * Returns a new array from a set of elements.
            * @param items A set of elements to include in the new array object.
            */
          of(...items: number[]): Float32Array;
      }
      declare var Float32Array: Float32ArrayConstructor;
      
      /**
        * A typed array of 64-bit float values. The contents are initialized to 0. If the requested 
        * number of bytes could not be allocated an exception is raised.
        */
      interface Float64Array {
          /**
            * The size in bytes of each element in the array. 
            */
          BYTES_PER_ELEMENT: number;
      
          /**
            * The ArrayBuffer instance referenced by the array. 
            */
          buffer: ArrayBuffer;
      
          /**
            * The length in bytes of the array.
            */
          byteLength: number;
      
          /**
            * The offset in bytes of the array.
            */
          byteOffset: number;
      
          /** 
            * Returns the this object after copying a section of the array identified by start and end
            * to the same array starting at position target
            * @param target If target is negative, it is treated as length+target where length is the 
            * length of the array. 
            * @param start If start is negative, it is treated as length+start. If end is negative, it 
            * is treated as length+end.
            * @param end If not specified, length of the this object is used as its default value. 
            */
          copyWithin(target: number, start: number, end?: number): Float64Array;
      
          /**
            * Determines whether all the members of an array satisfy the specified test.
            * @param callbackfn A function that accepts up to three arguments. The every method calls 
            * the callbackfn function for each element in array1 until the callbackfn returns false, 
            * or until the end of the array.
            * @param thisArg An object to which the this keyword can refer in the callbackfn function.
            * If thisArg is omitted, undefined is used as the this value.
            */
          every(callbackfn: (value: number, index: number, array: Float64Array) => boolean, thisArg?: any): boolean;
      
          /**
              * Returns the this object after filling the section identified by start and end with value
              * @param value value to fill array section with
              * @param start index to start filling the array at. If start is negative, it is treated as 
              * length+start where length is the length of the array. 
              * @param end index to stop filling the array at. If end is negative, it is treated as 
              * length+end.
              */
          fill(value: number, start?: number, end?: number): Float64Array;
      
          /**
            * Returns the elements of an array that meet the condition specified in a callback function. 
            * @param callbackfn A function that accepts up to three arguments. The filter method calls 
            * the callbackfn function one time for each element in the array. 
            * @param thisArg An object to which the this keyword can refer in the callbackfn function. 
            * If thisArg is omitted, undefined is used as the this value.
            */
          filter(callbackfn: (value: number, index: number, array: Float64Array) => boolean, thisArg?: any): Float64Array;
      
          /** 
            * Returns the value of the first element in the array where predicate is true, and undefined 
            * otherwise.
            * @param predicate find calls predicate once for each element of the array, in ascending 
            * order, until it finds one where predicate returns true. If such an element is found, find 
            * immediately returns that element value. Otherwise, find returns undefined.
            * @param thisArg If provided, it will be used as the this value for each invocation of 
            * predicate. If it is not provided, undefined is used instead.
            */
          find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
      
          /** 
            * Returns the index of the first element in the array where predicate is true, and undefined 
            * otherwise.
            * @param predicate find calls predicate once for each element of the array, in ascending 
            * order, until it finds one where predicate returns true. If such an element is found, find 
            * immediately returns that element value. Otherwise, find returns undefined.
            * @param thisArg If provided, it will be used as the this value for each invocation of 
            * predicate. If it is not provided, undefined is used instead.
            */
          findIndex(predicate: (value: number) => boolean, thisArg?: any): number;
      
          /**
            * Performs the specified action for each element in an array.
            * @param callbackfn  A function that accepts up to three arguments. forEach calls the 
            * callbackfn function one time for each element in the array. 
            * @param thisArg  An object to which the this keyword can refer in the callbackfn function. 
            * If thisArg is omitted, undefined is used as the this value.
            */
          forEach(callbackfn: (value: number, index: number, array: Float64Array) => void, thisArg?: any): void;
      
          /**
            * Returns the index of the first occurrence of a value in an array.
            * @param searchElement The value to locate in the array.
            * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
            *  search starts at index 0.
            */
          indexOf(searchElement: number, fromIndex?: number): number;
      
          /**
            * Adds all the elements of an array separated by the specified separator string.
            * @param separator A string used to separate one element of an array from the next in the 
            * resulting String. If omitted, the array elements are separated with a comma.
            */
          join(separator?: string): string;
      
          /**
            * Returns the index of the last occurrence of a value in an array.
            * @param searchElement The value to locate in the array.
            * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the 
            * search starts at index 0.
            */
          lastIndexOf(searchElement: number, fromIndex?: number): number;
      
          /**
            * The length of the array.
            */
          length: number;
      
          /**
            * Calls a defined callback function on each element of an array, and returns an array that 
            * contains the results.
            * @param callbackfn A function that accepts up to three arguments. The map method calls the 
            * callbackfn function one time for each element in the array. 
            * @param thisArg An object to which the this keyword can refer in the callbackfn function. 
            * If thisArg is omitted, undefined is used as the this value.
            */
          map(callbackfn: (value: number, index: number, array: Float64Array) => number, thisArg?: any): Float64Array;
      
          /**
            * Calls the specified callback function for all the elements in an array. The return value of 
            * the callback function is the accumulated result, and is provided as an argument in the next 
            * call to the callback function.
            * @param callbackfn A function that accepts up to four arguments. The reduce method calls the 
            * callbackfn function one time for each element in the array.
            * @param initialValue If initialValue is specified, it is used as the initial value to start 
            * the accumulation. The first call to the callbackfn function provides this value as an argument
            * instead of an array value.
            */
          reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number, initialValue?: number): number;
      
          /**
            * Calls the specified callback function for all the elements in an array. The return value of 
            * the callback function is the accumulated result, and is provided as an argument in the next 
            * call to the callback function.
            * @param callbackfn A function that accepts up to four arguments. The reduce method calls the 
            * callbackfn function one time for each element in the array.
            * @param initialValue If initialValue is specified, it is used as the initial value to start 
            * the accumulation. The first call to the callbackfn function provides this value as an argument 
            * instead of an array value.
            */
          reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float64Array) => U, initialValue: U): U;
      
          /** 
            * Calls the specified callback function for all the elements in an array, in descending order. 
            * The return value of the callback function is the accumulated result, and is provided as an 
            * argument in the next call to the callback function.
            * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls 
            * the callbackfn function one time for each element in the array. 
            * @param initialValue If initialValue is specified, it is used as the initial value to start 
            * the accumulation. The first call to the callbackfn function provides this value as an 
            * argument instead of an array value.
            */
          reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number, initialValue?: number): number;
      
          /** 
            * Calls the specified callback function for all the elements in an array, in descending order. 
            * The return value of the callback function is the accumulated result, and is provided as an 
            * argument in the next call to the callback function.
            * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
            * the callbackfn function one time for each element in the array. 
            * @param initialValue If initialValue is specified, it is used as the initial value to start 
            * the accumulation. The first call to the callbackfn function provides this value as an argument
            * instead of an array value.
            */
          reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float64Array) => U, initialValue: U): U;
      
          /**
            * Reverses the elements in an Array. 
            */
          reverse(): Float64Array;
      
          /**
            * Sets a value or an array of values.
            * @param index The index of the location to set.
            * @param value The value to set.
            */
          set(index: number, value: number): void;
      
          /**
            * Sets a value or an array of values.
            * @param array A typed or untyped array of values to set.
            * @param offset The index in the current array at which the values are to be written.
            */
          set(array: Float64Array, offset?: number): void;
      
          /** 
            * Returns a section of an array.
            * @param start The beginning of the specified portion of the array.
            * @param end The end of the specified portion of the array.
            */
          slice(start?: number, end?: number): Float64Array;
      
          /**
            * Determines whether the specified callback function returns true for any element of an array.
            * @param callbackfn A function that accepts up to three arguments. The some method calls the 
            * callbackfn function for each element in array1 until the callbackfn returns true, or until 
            * the end of the array.
            * @param thisArg An object to which the this keyword can refer in the callbackfn function. 
            * If thisArg is omitted, undefined is used as the this value.
            */
          some(callbackfn: (value: number, index: number, array: Float64Array) => boolean, thisArg?: any): boolean;
      
          /**
            * Sorts an array.
            * @param compareFn The name of the function used to determine the order of the elements. If 
            * omitted, the elements are sorted in ascending, ASCII character order.
            */
          sort(compareFn?: (a: number, b: number) => number): Float64Array;
      
          /**
            * Gets a new Float64Array view of the ArrayBuffer store for this array, referencing the elements
            * at begin, inclusive, up to end, exclusive. 
            * @param begin The index of the beginning of the array.
            * @param end The index of the end of the array.
            */
          subarray(begin: number, end?: number): Float64Array;
      
          /**
            * Converts a number to a string by using the current locale. 
            */
          toLocaleString(): string;
      
          /**
            * Returns a string representation of an array.
            */
          toString(): string;
      
          [index: number]: number;
      }
      
      interface Float64ArrayConstructor {
          prototype: Float64Array;
          new (length: number): Float64Array;
          new (array: Float64Array): Float64Array;
          new (array: number[]): Float64Array;
          new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float64Array;
      
          /**
            * The size in bytes of each element in the array. 
            */
          BYTES_PER_ELEMENT: number;
      
          /**
            * Returns a new array from a set of elements.
            * @param items A set of elements to include in the new array object.
            */
          of(...items: number[]): Float64Array;
      }
      declare var Float64Array: Float64ArrayConstructor;/////////////////////////////
      /// ECMAScript Internationalization API 
      /////////////////////////////
      
      declare module Intl {
          interface CollatorOptions {
              usage?: string;
              localeMatcher?: string;
              numeric?: boolean;
              caseFirst?: string;
              sensitivity?: string;
              ignorePunctuation?: boolean;
          }
      
          interface ResolvedCollatorOptions {
              locale: string;
              usage: string;
              sensitivity: string;
              ignorePunctuation: boolean;
              collation: string;
              caseFirst: string;
              numeric: boolean;
          }
      
          interface Collator {
              compare(x: string, y: string): number;
              resolvedOptions(): ResolvedCollatorOptions;
          }
          var Collator: {
              new (locales?: string[], options?: CollatorOptions): Collator;
              new (locale?: string, options?: CollatorOptions): Collator;
              (locales?: string[], options?: CollatorOptions): Collator;
              (locale?: string, options?: CollatorOptions): Collator;
              supportedLocalesOf(locales: string[], options?: CollatorOptions): string[];
              supportedLocalesOf(locale: string, options?: CollatorOptions): string[];
          }
      
          interface NumberFormatOptions {
              localeMatcher?: string;
              style?: string;
              currency?: string;
              currencyDisplay?: string;
              useGrouping?: boolean;
          }
      
          interface ResolvedNumberFormatOptions {
              locale: string;
              numberingSystem: string;
              style: string;
              currency?: string;
              currencyDisplay?: string;
              minimumintegerDigits: number;
              minimumFractionDigits: number;
              maximumFractionDigits: number;
              minimumSignificantDigits?: number;
              maximumSignificantDigits?: number;
              useGrouping: boolean;
          }
      
          interface NumberFormat {
              format(value: number): string;
              resolvedOptions(): ResolvedNumberFormatOptions;
          }
          var NumberFormat: {
              new (locales?: string[], options?: NumberFormatOptions): Collator;
              new (locale?: string, options?: NumberFormatOptions): Collator;
              (locales?: string[], options?: NumberFormatOptions): Collator;
              (locale?: string, options?: NumberFormatOptions): Collator;
              supportedLocalesOf(locales: string[], options?: NumberFormatOptions): string[];
              supportedLocalesOf(locale: string, options?: NumberFormatOptions): string[];
          }
      
          interface DateTimeFormatOptions {
              localeMatcher?: string;
              weekday?: string;
              era?: string;
              year?: string;
              month?: string;
              day?: string;
              hour?: string;
              minute?: string;
              second?: string;
              timeZoneName?: string;
              formatMatcher?: string;
              hour12?: boolean;
          }
      
          interface ResolvedDateTimeFormatOptions {
              locale: string;
              calendar: string;
              numberingSystem: string;
              timeZone: string;
              hour12?: boolean;
              weekday?: string;
              era?: string;
              year?: string;
              month?: string;
              day?: string;
              hour?: string;
              minute?: string;
              second?: string;
              timeZoneName?: string;
          }
      
          interface DateTimeFormat {
              format(date: number): string;
              resolvedOptions(): ResolvedDateTimeFormatOptions;
          }
          var DateTimeFormat: {
              new (locales?: string[], options?: DateTimeFormatOptions): Collator;
              new (locale?: string, options?: DateTimeFormatOptions): Collator;
              (locales?: string[], options?: DateTimeFormatOptions): Collator;
              (locale?: string, options?: DateTimeFormatOptions): Collator;
              supportedLocalesOf(locales: string[], options?: DateTimeFormatOptions): string[];
              supportedLocalesOf(locale: string, options?: DateTimeFormatOptions): string[];
          }
      }
      
      interface String {
          /**
            * Determines whether two strings are equivalent in the current locale.
            * @param that String to compare to target string
            * @param locales An array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details.
            * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details.
            */
          localeCompare(that: string, locales: string[], options?: Intl.CollatorOptions): number;
      
          /**
            * Determines whether two strings are equivalent in the current locale.
            * @param that String to compare to target string
            * @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details.
            * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details.
            */
          localeCompare(that: string, locale: string, options?: Intl.CollatorOptions): number;
      }
      
      interface Number {
          /**
            * Converts a number to a string by using the current or specified locale. 
            * @param locales An array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
            * @param options An object that contains one or more properties that specify comparison options.
            */
          toLocaleString(locales?: string[], options?: Intl.NumberFormatOptions): string;
      
          /**
            * Converts a number to a string by using the current or specified locale. 
            * @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
            * @param options An object that contains one or more properties that specify comparison options.
            */
          toLocaleString(locale?: string, options?: Intl.NumberFormatOptions): string;
      }
      
      interface Date {
          /**
            * Converts a date to a string by using the current or specified locale.  
            * @param locales An array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
            * @param options An object that contains one or more properties that specify comparison options.
            */
          toLocaleString(locales?: string[], options?: Intl.DateTimeFormatOptions): string;
      
          /**
            * Converts a date to a string by using the current or specified locale.  
            * @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
            * @param options An object that contains one or more properties that specify comparison options.
            */
          toLocaleString(locale?: string, options?: Intl.DateTimeFormatOptions): string;
      }
      
      
      /////////////////////////////
      /// IE DOM APIs
      /////////////////////////////
      
      interface Algorithm {
          name?: string;
      }
      
      interface AriaRequestEventInit extends EventInit {
          attributeName?: string;
          attributeValue?: string;
      }
      
      interface ClipboardEventInit extends EventInit {
          data?: string;
          dataType?: string;
      }
      
      interface CommandEventInit extends EventInit {
          commandName?: string;
          detail?: string;
      }
      
      interface CompositionEventInit extends UIEventInit {
          data?: string;
      }
      
      interface ConfirmSiteSpecificExceptionsInformation extends ExceptionInformation {
          arrayOfDomainStrings?: string[];
      }
      
      interface CustomEventInit extends EventInit {
          detail?: any;
      }
      
      interface DeviceAccelerationDict {
          x?: number;
          y?: number;
          z?: number;
      }
      
      interface DeviceRotationRateDict {
          alpha?: number;
          beta?: number;
          gamma?: number;
      }
      
      interface EventInit {
          bubbles?: boolean;
          cancelable?: boolean;
      }
      
      interface ExceptionInformation {
          domain?: string;
      }
      
      interface FocusEventInit extends UIEventInit {
          relatedTarget?: EventTarget;
      }
      
      interface HashChangeEventInit extends EventInit {
          newURL?: string;
          oldURL?: string;
      }
      
      interface KeyAlgorithm {
          name?: string;
      }
      
      interface KeyboardEventInit extends SharedKeyboardAndMouseEventInit {
          key?: string;
          location?: number;
          repeat?: boolean;
      }
      
      interface MouseEventInit extends SharedKeyboardAndMouseEventInit {
          screenX?: number;
          screenY?: number;
          clientX?: number;
          clientY?: number;
          button?: number;
          buttons?: number;
          relatedTarget?: EventTarget;
      }
      
      interface MsZoomToOptions {
          contentX?: number;
          contentY?: number;
          viewportX?: string;
          viewportY?: string;
          scaleFactor?: number;
          animate?: string;
      }
      
      interface MutationObserverInit {
          childList?: boolean;
          attributes?: boolean;
          characterData?: boolean;
          subtree?: boolean;
          attributeOldValue?: boolean;
          characterDataOldValue?: boolean;
          attributeFilter?: string[];
      }
      
      interface ObjectURLOptions {
          oneTimeOnly?: boolean;
      }
      
      interface PointerEventInit extends MouseEventInit {
          pointerId?: number;
          width?: number;
          height?: number;
          pressure?: number;
          tiltX?: number;
          tiltY?: number;
          pointerType?: string;
          isPrimary?: boolean;
      }
      
      interface PositionOptions {
          enableHighAccuracy?: boolean;
          timeout?: number;
          maximumAge?: number;
      }
      
      interface SharedKeyboardAndMouseEventInit extends UIEventInit {
          ctrlKey?: boolean;
          shiftKey?: boolean;
          altKey?: boolean;
          metaKey?: boolean;
          keyModifierStateAltGraph?: boolean;
          keyModifierStateCapsLock?: boolean;
          keyModifierStateFn?: boolean;
          keyModifierStateFnLock?: boolean;
          keyModifierStateHyper?: boolean;
          keyModifierStateNumLock?: boolean;
          keyModifierStateOS?: boolean;
          keyModifierStateScrollLock?: boolean;
          keyModifierStateSuper?: boolean;
          keyModifierStateSymbol?: boolean;
          keyModifierStateSymbolLock?: boolean;
      }
      
      interface StoreExceptionsInformation extends ExceptionInformation {
          siteName?: string;
          explanationString?: string;
          detailURI?: string;
      }
      
      interface StoreSiteSpecificExceptionsInformation extends StoreExceptionsInformation {
          arrayOfDomainStrings?: string[];
      }
      
      interface UIEventInit extends EventInit {
          view?: Window;
          detail?: number;
      }
      
      interface WebGLContextAttributes {
          alpha?: boolean;
          depth?: boolean;
          stencil?: boolean;
          antialias?: boolean;
          premultipliedAlpha?: boolean;
          preserveDrawingBuffer?: boolean;
      }
      
      interface WebGLContextEventInit extends EventInit {
          statusMessage?: string;
      }
      
      interface WheelEventInit extends MouseEventInit {
          deltaX?: number;
          deltaY?: number;
          deltaZ?: number;
          deltaMode?: number;
      }
      
      interface EventListener {
          (evt: Event): void;
      }
      
      interface ANGLE_instanced_arrays {
          drawArraysInstancedANGLE(mode: number, first: number, count: number, primcount: number): void;
          drawElementsInstancedANGLE(mode: number, count: number, type: number, offset: number, primcount: number): void;
          vertexAttribDivisorANGLE(index: number, divisor: number): void;
          VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE: number;
      }
      
      declare var ANGLE_instanced_arrays: {
          prototype: ANGLE_instanced_arrays;
          new(): ANGLE_instanced_arrays;
          VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE: number;
      }
      
      interface AnalyserNode extends AudioNode {
          fftSize: number;
          frequencyBinCount: number;
          maxDecibels: number;
          minDecibels: number;
          smoothingTimeConstant: number;
          getByteFrequencyData(array: Uint8Array): void;
          getByteTimeDomainData(array: Uint8Array): void;
          getFloatFrequencyData(array: any): void;
          getFloatTimeDomainData(array: any): void;
      }
      
      declare var AnalyserNode: {
          prototype: AnalyserNode;
          new(): AnalyserNode;
      }
      
      interface AnimationEvent extends Event {
          animationName: string;
          elapsedTime: number;
          initAnimationEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, animationNameArg: string, elapsedTimeArg: number): void;
      }
      
      declare var AnimationEvent: {
          prototype: AnimationEvent;
          new(): AnimationEvent;
      }
      
      interface ApplicationCache extends EventTarget {
          oncached: (ev: Event) => any;
          onchecking: (ev: Event) => any;
          ondownloading: (ev: Event) => any;
          onerror: (ev: Event) => any;
          onnoupdate: (ev: Event) => any;
          onobsolete: (ev: Event) => any;
          onprogress: (ev: ProgressEvent) => any;
          onupdateready: (ev: Event) => any;
          status: number;
          abort(): void;
          swapCache(): void;
          update(): void;
          CHECKING: number;
          DOWNLOADING: number;
          IDLE: number;
          OBSOLETE: number;
          UNCACHED: number;
          UPDATEREADY: number;
          addEventListener(type: "cached", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "checking", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "downloading", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "noupdate", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "obsolete", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "updateready", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var ApplicationCache: {
          prototype: ApplicationCache;
          new(): ApplicationCache;
          CHECKING: number;
          DOWNLOADING: number;
          IDLE: number;
          OBSOLETE: number;
          UNCACHED: number;
          UPDATEREADY: number;
      }
      
      interface AriaRequestEvent extends Event {
          attributeName: string;
          attributeValue: string;
      }
      
      declare var AriaRequestEvent: {
          prototype: AriaRequestEvent;
          new(type: string, eventInitDict?: AriaRequestEventInit): AriaRequestEvent;
      }
      
      interface Attr extends Node {
          name: string;
          ownerElement: Element;
          specified: boolean;
          value: string;
      }
      
      declare var Attr: {
          prototype: Attr;
          new(): Attr;
      }
      
      interface AudioBuffer {
          duration: number;
          length: number;
          numberOfChannels: number;
          sampleRate: number;
          getChannelData(channel: number): any;
      }
      
      declare var AudioBuffer: {
          prototype: AudioBuffer;
          new(): AudioBuffer;
      }
      
      interface AudioBufferSourceNode extends AudioNode {
          buffer: AudioBuffer;
          loop: boolean;
          loopEnd: number;
          loopStart: number;
          onended: (ev: Event) => any;
          playbackRate: AudioParam;
          start(when?: number, offset?: number, duration?: number): void;
          stop(when?: number): void;
          addEventListener(type: "ended", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var AudioBufferSourceNode: {
          prototype: AudioBufferSourceNode;
          new(): AudioBufferSourceNode;
      }
      
      interface AudioContext extends EventTarget {
          currentTime: number;
          destination: AudioDestinationNode;
          listener: AudioListener;
          sampleRate: number;
          createAnalyser(): AnalyserNode;
          createBiquadFilter(): BiquadFilterNode;
          createBuffer(numberOfChannels: number, length: number, sampleRate: number): AudioBuffer;
          createBufferSource(): AudioBufferSourceNode;
          createChannelMerger(numberOfInputs?: number): ChannelMergerNode;
          createChannelSplitter(numberOfOutputs?: number): ChannelSplitterNode;
          createConvolver(): ConvolverNode;
          createDelay(maxDelayTime?: number): DelayNode;
          createDynamicsCompressor(): DynamicsCompressorNode;
          createGain(): GainNode;
          createMediaElementSource(mediaElement: HTMLMediaElement): MediaElementAudioSourceNode;
          createOscillator(): OscillatorNode;
          createPanner(): PannerNode;
          createPeriodicWave(real: any, imag: any): PeriodicWave;
          createScriptProcessor(bufferSize?: number, numberOfInputChannels?: number, numberOfOutputChannels?: number): ScriptProcessorNode;
          createStereoPanner(): StereoPannerNode;
          createWaveShaper(): WaveShaperNode;
          decodeAudioData(audioData: ArrayBuffer, successCallback: DecodeSuccessCallback, errorCallback?: DecodeErrorCallback): void;
      }
      
      declare var AudioContext: {
          prototype: AudioContext;
          new(): AudioContext;
      }
      
      interface AudioDestinationNode extends AudioNode {
          maxChannelCount: number;
      }
      
      declare var AudioDestinationNode: {
          prototype: AudioDestinationNode;
          new(): AudioDestinationNode;
      }
      
      interface AudioListener {
          dopplerFactor: number;
          speedOfSound: number;
          setOrientation(x: number, y: number, z: number, xUp: number, yUp: number, zUp: number): void;
          setPosition(x: number, y: number, z: number): void;
          setVelocity(x: number, y: number, z: number): void;
      }
      
      declare var AudioListener: {
          prototype: AudioListener;
          new(): AudioListener;
      }
      
      interface AudioNode extends EventTarget {
          channelCount: number;
          channelCountMode: string;
          channelInterpretation: string;
          context: AudioContext;
          numberOfInputs: number;
          numberOfOutputs: number;
          connect(destination: AudioNode, output?: number, input?: number): void;
          disconnect(output?: number): void;
      }
      
      declare var AudioNode: {
          prototype: AudioNode;
          new(): AudioNode;
      }
      
      interface AudioParam {
          defaultValue: number;
          value: number;
          cancelScheduledValues(startTime: number): void;
          exponentialRampToValueAtTime(value: number, endTime: number): void;
          linearRampToValueAtTime(value: number, endTime: number): void;
          setTargetAtTime(target: number, startTime: number, timeConstant: number): void;
          setValueAtTime(value: number, startTime: number): void;
          setValueCurveAtTime(values: any, startTime: number, duration: number): void;
      }
      
      declare var AudioParam: {
          prototype: AudioParam;
          new(): AudioParam;
      }
      
      interface AudioProcessingEvent extends Event {
          inputBuffer: AudioBuffer;
          outputBuffer: AudioBuffer;
          playbackTime: number;
      }
      
      declare var AudioProcessingEvent: {
          prototype: AudioProcessingEvent;
          new(): AudioProcessingEvent;
      }
      
      interface AudioTrack {
          enabled: boolean;
          id: string;
          kind: string;
          label: string;
          language: string;
          sourceBuffer: SourceBuffer;
      }
      
      declare var AudioTrack: {
          prototype: AudioTrack;
          new(): AudioTrack;
      }
      
      interface AudioTrackList extends EventTarget {
          length: number;
          onaddtrack: (ev: TrackEvent) => any;
          onchange: (ev: Event) => any;
          onremovetrack: (ev: TrackEvent) => any;
          getTrackById(id: string): AudioTrack;
          item(index: number): AudioTrack;
          addEventListener(type: "addtrack", listener: (ev: TrackEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "change", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "removetrack", listener: (ev: TrackEvent) => any, useCapture?: boolean): void;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
          [index: number]: AudioTrack;
      }
      
      declare var AudioTrackList: {
          prototype: AudioTrackList;
          new(): AudioTrackList;
      }
      
      interface BarProp {
          visible: boolean;
      }
      
      declare var BarProp: {
          prototype: BarProp;
          new(): BarProp;
      }
      
      interface BeforeUnloadEvent extends Event {
          returnValue: any;
      }
      
      declare var BeforeUnloadEvent: {
          prototype: BeforeUnloadEvent;
          new(): BeforeUnloadEvent;
      }
      
      interface BiquadFilterNode extends AudioNode {
          Q: AudioParam;
          detune: AudioParam;
          frequency: AudioParam;
          gain: AudioParam;
          type: string;
          getFrequencyResponse(frequencyHz: any, magResponse: any, phaseResponse: any): void;
      }
      
      declare var BiquadFilterNode: {
          prototype: BiquadFilterNode;
          new(): BiquadFilterNode;
      }
      
      interface Blob {
          size: number;
          type: string;
          msClose(): void;
          msDetachStream(): any;
          slice(start?: number, end?: number, contentType?: string): Blob;
      }
      
      declare var Blob: {
          prototype: Blob;
          new (blobParts?: any[], options?: BlobPropertyBag): Blob;
      }
      
      interface CDATASection extends Text {
      }
      
      declare var CDATASection: {
          prototype: CDATASection;
          new(): CDATASection;
      }
      
      interface CSS {
          supports(property: string, value?: string): boolean;
      }
      declare var CSS: CSS;
      
      interface CSSConditionRule extends CSSGroupingRule {
          conditionText: string;
      }
      
      declare var CSSConditionRule: {
          prototype: CSSConditionRule;
          new(): CSSConditionRule;
      }
      
      interface CSSFontFaceRule extends CSSRule {
          style: CSSStyleDeclaration;
      }
      
      declare var CSSFontFaceRule: {
          prototype: CSSFontFaceRule;
          new(): CSSFontFaceRule;
      }
      
      interface CSSGroupingRule extends CSSRule {
          cssRules: CSSRuleList;
          deleteRule(index?: number): void;
          insertRule(rule: string, index?: number): number;
      }
      
      declare var CSSGroupingRule: {
          prototype: CSSGroupingRule;
          new(): CSSGroupingRule;
      }
      
      interface CSSImportRule extends CSSRule {
          href: string;
          media: MediaList;
          styleSheet: CSSStyleSheet;
      }
      
      declare var CSSImportRule: {
          prototype: CSSImportRule;
          new(): CSSImportRule;
      }
      
      interface CSSKeyframeRule extends CSSRule {
          keyText: string;
          style: CSSStyleDeclaration;
      }
      
      declare var CSSKeyframeRule: {
          prototype: CSSKeyframeRule;
          new(): CSSKeyframeRule;
      }
      
      interface CSSKeyframesRule extends CSSRule {
          cssRules: CSSRuleList;
          name: string;
          appendRule(rule: string): void;
          deleteRule(rule: string): void;
          findRule(rule: string): CSSKeyframeRule;
      }
      
      declare var CSSKeyframesRule: {
          prototype: CSSKeyframesRule;
          new(): CSSKeyframesRule;
      }
      
      interface CSSMediaRule extends CSSConditionRule {
          media: MediaList;
      }
      
      declare var CSSMediaRule: {
          prototype: CSSMediaRule;
          new(): CSSMediaRule;
      }
      
      interface CSSNamespaceRule extends CSSRule {
          namespaceURI: string;
          prefix: string;
      }
      
      declare var CSSNamespaceRule: {
          prototype: CSSNamespaceRule;
          new(): CSSNamespaceRule;
      }
      
      interface CSSPageRule extends CSSRule {
          pseudoClass: string;
          selector: string;
          selectorText: string;
          style: CSSStyleDeclaration;
      }
      
      declare var CSSPageRule: {
          prototype: CSSPageRule;
          new(): CSSPageRule;
      }
      
      interface CSSRule {
          cssText: string;
          parentRule: CSSRule;
          parentStyleSheet: CSSStyleSheet;
          type: number;
          CHARSET_RULE: number;
          FONT_FACE_RULE: number;
          IMPORT_RULE: number;
          KEYFRAMES_RULE: number;
          KEYFRAME_RULE: number;
          MEDIA_RULE: number;
          NAMESPACE_RULE: number;
          PAGE_RULE: number;
          STYLE_RULE: number;
          SUPPORTS_RULE: number;
          UNKNOWN_RULE: number;
          VIEWPORT_RULE: number;
      }
      
      declare var CSSRule: {
          prototype: CSSRule;
          new(): CSSRule;
          CHARSET_RULE: number;
          FONT_FACE_RULE: number;
          IMPORT_RULE: number;
          KEYFRAMES_RULE: number;
          KEYFRAME_RULE: number;
          MEDIA_RULE: number;
          NAMESPACE_RULE: number;
          PAGE_RULE: number;
          STYLE_RULE: number;
          SUPPORTS_RULE: number;
          UNKNOWN_RULE: number;
          VIEWPORT_RULE: number;
      }
      
      interface CSSRuleList {
          length: number;
          item(index: number): CSSRule;
          [index: number]: CSSRule;
      }
      
      declare var CSSRuleList: {
          prototype: CSSRuleList;
          new(): CSSRuleList;
      }
      
      interface CSSStyleDeclaration {
          alignContent: string;
          alignItems: string;
          alignSelf: string;
          alignmentBaseline: string;
          animation: string;
          animationDelay: string;
          animationDirection: string;
          animationDuration: string;
          animationFillMode: string;
          animationIterationCount: string;
          animationName: string;
          animationPlayState: string;
          animationTimingFunction: string;
          backfaceVisibility: string;
          background: string;
          backgroundAttachment: string;
          backgroundClip: string;
          backgroundColor: string;
          backgroundImage: string;
          backgroundOrigin: string;
          backgroundPosition: string;
          backgroundPositionX: string;
          backgroundPositionY: string;
          backgroundRepeat: string;
          backgroundSize: string;
          baselineShift: string;
          border: string;
          borderBottom: string;
          borderBottomColor: string;
          borderBottomLeftRadius: string;
          borderBottomRightRadius: string;
          borderBottomStyle: string;
          borderBottomWidth: string;
          borderCollapse: string;
          borderColor: string;
          borderImage: string;
          borderImageOutset: string;
          borderImageRepeat: string;
          borderImageSlice: string;
          borderImageSource: string;
          borderImageWidth: string;
          borderLeft: string;
          borderLeftColor: string;
          borderLeftStyle: string;
          borderLeftWidth: string;
          borderRadius: string;
          borderRight: string;
          borderRightColor: string;
          borderRightStyle: string;
          borderRightWidth: string;
          borderSpacing: string;
          borderStyle: string;
          borderTop: string;
          borderTopColor: string;
          borderTopLeftRadius: string;
          borderTopRightRadius: string;
          borderTopStyle: string;
          borderTopWidth: string;
          borderWidth: string;
          bottom: string;
          boxShadow: string;
          boxSizing: string;
          breakAfter: string;
          breakBefore: string;
          breakInside: string;
          captionSide: string;
          clear: string;
          clip: string;
          clipPath: string;
          clipRule: string;
          color: string;
          colorInterpolationFilters: string;
          columnCount: any;
          columnFill: string;
          columnGap: any;
          columnRule: string;
          columnRuleColor: any;
          columnRuleStyle: string;
          columnRuleWidth: any;
          columnSpan: string;
          columnWidth: any;
          columns: string;
          content: string;
          counterIncrement: string;
          counterReset: string;
          cssFloat: string;
          cssText: string;
          cursor: string;
          direction: string;
          display: string;
          dominantBaseline: string;
          emptyCells: string;
          enableBackground: string;
          fill: string;
          fillOpacity: string;
          fillRule: string;
          filter: string;
          flex: string;
          flexBasis: string;
          flexDirection: string;
          flexFlow: string;
          flexGrow: string;
          flexShrink: string;
          flexWrap: string;
          floodColor: string;
          floodOpacity: string;
          font: string;
          fontFamily: string;
          fontFeatureSettings: string;
          fontSize: string;
          fontSizeAdjust: string;
          fontStretch: string;
          fontStyle: string;
          fontVariant: string;
          fontWeight: string;
          glyphOrientationHorizontal: string;
          glyphOrientationVertical: string;
          height: string;
          imeMode: string;
          justifyContent: string;
          kerning: string;
          left: string;
          length: number;
          letterSpacing: string;
          lightingColor: string;
          lineHeight: string;
          listStyle: string;
          listStyleImage: string;
          listStylePosition: string;
          listStyleType: string;
          margin: string;
          marginBottom: string;
          marginLeft: string;
          marginRight: string;
          marginTop: string;
          marker: string;
          markerEnd: string;
          markerMid: string;
          markerStart: string;
          mask: string;
          maxHeight: string;
          maxWidth: string;
          minHeight: string;
          minWidth: string;
          msContentZoomChaining: string;
          msContentZoomLimit: string;
          msContentZoomLimitMax: any;
          msContentZoomLimitMin: any;
          msContentZoomSnap: string;
          msContentZoomSnapPoints: string;
          msContentZoomSnapType: string;
          msContentZooming: string;
          msFlowFrom: string;
          msFlowInto: string;
          msFontFeatureSettings: string;
          msGridColumn: any;
          msGridColumnAlign: string;
          msGridColumnSpan: any;
          msGridColumns: string;
          msGridRow: any;
          msGridRowAlign: string;
          msGridRowSpan: any;
          msGridRows: string;
          msHighContrastAdjust: string;
          msHyphenateLimitChars: string;
          msHyphenateLimitLines: any;
          msHyphenateLimitZone: any;
          msHyphens: string;
          msImeAlign: string;
          msOverflowStyle: string;
          msScrollChaining: string;
          msScrollLimit: string;
          msScrollLimitXMax: any;
          msScrollLimitXMin: any;
          msScrollLimitYMax: any;
          msScrollLimitYMin: any;
          msScrollRails: string;
          msScrollSnapPointsX: string;
          msScrollSnapPointsY: string;
          msScrollSnapType: string;
          msScrollSnapX: string;
          msScrollSnapY: string;
          msScrollTranslation: string;
          msTextCombineHorizontal: string;
          msTextSizeAdjust: any;
          msTouchAction: string;
          msTouchSelect: string;
          msUserSelect: string;
          msWrapFlow: string;
          msWrapMargin: any;
          msWrapThrough: string;
          opacity: string;
          order: string;
          orphans: string;
          outline: string;
          outlineColor: string;
          outlineStyle: string;
          outlineWidth: string;
          overflow: string;
          overflowX: string;
          overflowY: string;
          padding: string;
          paddingBottom: string;
          paddingLeft: string;
          paddingRight: string;
          paddingTop: string;
          pageBreakAfter: string;
          pageBreakBefore: string;
          pageBreakInside: string;
          parentRule: CSSRule;
          perspective: string;
          perspectiveOrigin: string;
          pointerEvents: string;
          position: string;
          quotes: string;
          right: string;
          rubyAlign: string;
          rubyOverhang: string;
          rubyPosition: string;
          stopColor: string;
          stopOpacity: string;
          stroke: string;
          strokeDasharray: string;
          strokeDashoffset: string;
          strokeLinecap: string;
          strokeLinejoin: string;
          strokeMiterlimit: string;
          strokeOpacity: string;
          strokeWidth: string;
          tableLayout: string;
          textAlign: string;
          textAlignLast: string;
          textAnchor: string;
          textDecoration: string;
          textFillColor: string;
          textIndent: string;
          textJustify: string;
          textKashida: string;
          textKashidaSpace: string;
          textOverflow: string;
          textShadow: string;
          textTransform: string;
          textUnderlinePosition: string;
          top: string;
          touchAction: string;
          transform: string;
          transformOrigin: string;
          transformStyle: string;
          transition: string;
          transitionDelay: string;
          transitionDuration: string;
          transitionProperty: string;
          transitionTimingFunction: string;
          unicodeBidi: string;
          verticalAlign: string;
          visibility: string;
          webkitAlignContent: string;
          webkitAlignItems: string;
          webkitAlignSelf: string;
          webkitAnimation: string;
          webkitAnimationDelay: string;
          webkitAnimationDirection: string;
          webkitAnimationDuration: string;
          webkitAnimationFillMode: string;
          webkitAnimationIterationCount: string;
          webkitAnimationName: string;
          webkitAnimationPlayState: string;
          webkitAnimationTimingFunction: string;
          webkitAppearance: string;
          webkitBackfaceVisibility: string;
          webkitBackground: string;
          webkitBackgroundAttachment: string;
          webkitBackgroundClip: string;
          webkitBackgroundColor: string;
          webkitBackgroundImage: string;
          webkitBackgroundOrigin: string;
          webkitBackgroundPosition: string;
          webkitBackgroundPositionX: string;
          webkitBackgroundPositionY: string;
          webkitBackgroundRepeat: string;
          webkitBackgroundSize: string;
          webkitBorderBottomLeftRadius: string;
          webkitBorderBottomRightRadius: string;
          webkitBorderImage: string;
          webkitBorderImageOutset: string;
          webkitBorderImageRepeat: string;
          webkitBorderImageSlice: string;
          webkitBorderImageSource: string;
          webkitBorderImageWidth: string;
          webkitBorderRadius: string;
          webkitBorderTopLeftRadius: string;
          webkitBorderTopRightRadius: string;
          webkitBoxAlign: string;
          webkitBoxDirection: string;
          webkitBoxFlex: string;
          webkitBoxOrdinalGroup: string;
          webkitBoxOrient: string;
          webkitBoxPack: string;
          webkitBoxSizing: string;
          webkitColumnBreakAfter: string;
          webkitColumnBreakBefore: string;
          webkitColumnBreakInside: string;
          webkitColumnCount: any;
          webkitColumnGap: any;
          webkitColumnRule: string;
          webkitColumnRuleColor: any;
          webkitColumnRuleStyle: string;
          webkitColumnRuleWidth: any;
          webkitColumnSpan: string;
          webkitColumnWidth: any;
          webkitColumns: string;
          webkitFilter: string;
          webkitFlex: string;
          webkitFlexBasis: string;
          webkitFlexDirection: string;
          webkitFlexFlow: string;
          webkitFlexGrow: string;
          webkitFlexShrink: string;
          webkitFlexWrap: string;
          webkitJustifyContent: string;
          webkitOrder: string;
          webkitPerspective: string;
          webkitPerspectiveOrigin: string;
          webkitTapHighlightColor: string;
          webkitTextFillColor: string;
          webkitTextSizeAdjust: any;
          webkitTransform: string;
          webkitTransformOrigin: string;
          webkitTransformStyle: string;
          webkitTransition: string;
          webkitTransitionDelay: string;
          webkitTransitionDuration: string;
          webkitTransitionProperty: string;
          webkitTransitionTimingFunction: string;
          webkitUserSelect: string;
          webkitWritingMode: string;
          whiteSpace: string;
          widows: string;
          width: string;
          wordBreak: string;
          wordSpacing: string;
          wordWrap: string;
          writingMode: string;
          zIndex: string;
          zoom: string;
          getPropertyPriority(propertyName: string): string;
          getPropertyValue(propertyName: string): string;
          item(index: number): string;
          removeProperty(propertyName: string): string;
          setProperty(propertyName: string, value: string, priority?: string): void;
          [index: number]: string;
      }
      
      declare var CSSStyleDeclaration: {
          prototype: CSSStyleDeclaration;
          new(): CSSStyleDeclaration;
      }
      
      interface CSSStyleRule extends CSSRule {
          readOnly: boolean;
          selectorText: string;
          style: CSSStyleDeclaration;
      }
      
      declare var CSSStyleRule: {
          prototype: CSSStyleRule;
          new(): CSSStyleRule;
      }
      
      interface CSSStyleSheet extends StyleSheet {
          cssRules: CSSRuleList;
          cssText: string;
          href: string;
          id: string;
          imports: StyleSheetList;
          isAlternate: boolean;
          isPrefAlternate: boolean;
          ownerRule: CSSRule;
          owningElement: Element;
          pages: StyleSheetPageList;
          readOnly: boolean;
          rules: CSSRuleList;
          addImport(bstrURL: string, lIndex?: number): number;
          addPageRule(bstrSelector: string, bstrStyle: string, lIndex?: number): number;
          addRule(bstrSelector: string, bstrStyle?: string, lIndex?: number): number;
          deleteRule(index?: number): void;
          insertRule(rule: string, index?: number): number;
          removeImport(lIndex: number): void;
          removeRule(lIndex: number): void;
      }
      
      declare var CSSStyleSheet: {
          prototype: CSSStyleSheet;
          new(): CSSStyleSheet;
      }
      
      interface CSSSupportsRule extends CSSConditionRule {
      }
      
      declare var CSSSupportsRule: {
          prototype: CSSSupportsRule;
          new(): CSSSupportsRule;
      }
      
      interface CanvasGradient {
          addColorStop(offset: number, color: string): void;
      }
      
      declare var CanvasGradient: {
          prototype: CanvasGradient;
          new(): CanvasGradient;
      }
      
      interface CanvasPattern {
      }
      
      declare var CanvasPattern: {
          prototype: CanvasPattern;
          new(): CanvasPattern;
      }
      
      interface CanvasRenderingContext2D {
          canvas: HTMLCanvasElement;
          fillStyle: any;
          font: string;
          globalAlpha: number;
          globalCompositeOperation: string;
          lineCap: string;
          lineDashOffset: number;
          lineJoin: string;
          lineWidth: number;
          miterLimit: number;
          msFillRule: string;
          msImageSmoothingEnabled: boolean;
          shadowBlur: number;
          shadowColor: string;
          shadowOffsetX: number;
          shadowOffsetY: number;
          strokeStyle: any;
          textAlign: string;
          textBaseline: string;
          arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void;
          arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void;
          beginPath(): void;
          bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void;
          clearRect(x: number, y: number, w: number, h: number): void;
          clip(fillRule?: string): void;
          closePath(): void;
          createImageData(imageDataOrSw: number, sh?: number): ImageData;
          createImageData(imageDataOrSw: ImageData, sh?: number): ImageData;
          createLinearGradient(x0: number, y0: number, x1: number, y1: number): CanvasGradient;
          createPattern(image: HTMLImageElement, repetition: string): CanvasPattern;
          createPattern(image: HTMLCanvasElement, repetition: string): CanvasPattern;
          createPattern(image: HTMLVideoElement, repetition: string): CanvasPattern;
          createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, r1: number): CanvasGradient;
          drawImage(image: HTMLImageElement, offsetX: number, offsetY: number, width?: number, height?: number, canvasOffsetX?: number, canvasOffsetY?: number, canvasImageWidth?: number, canvasImageHeight?: number): void;
          drawImage(image: HTMLCanvasElement, offsetX: number, offsetY: number, width?: number, height?: number, canvasOffsetX?: number, canvasOffsetY?: number, canvasImageWidth?: number, canvasImageHeight?: number): void;
          drawImage(image: HTMLVideoElement, offsetX: number, offsetY: number, width?: number, height?: number, canvasOffsetX?: number, canvasOffsetY?: number, canvasImageWidth?: number, canvasImageHeight?: number): void;
          fill(fillRule?: string): void;
          fillRect(x: number, y: number, w: number, h: number): void;
          fillText(text: string, x: number, y: number, maxWidth?: number): void;
          getImageData(sx: number, sy: number, sw: number, sh: number): ImageData;
          getLineDash(): number[];
          isPointInPath(x: number, y: number, fillRule?: string): boolean;
          lineTo(x: number, y: number): void;
          measureText(text: string): TextMetrics;
          moveTo(x: number, y: number): void;
          putImageData(imagedata: ImageData, dx: number, dy: number, dirtyX?: number, dirtyY?: number, dirtyWidth?: number, dirtyHeight?: number): void;
          quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void;
          rect(x: number, y: number, w: number, h: number): void;
          restore(): void;
          rotate(angle: number): void;
          save(): void;
          scale(x: number, y: number): void;
          setLineDash(segments: number[]): void;
          setTransform(m11: number, m12: number, m21: number, m22: number, dx: number, dy: number): void;
          stroke(): void;
          strokeRect(x: number, y: number, w: number, h: number): void;
          strokeText(text: string, x: number, y: number, maxWidth?: number): void;
          transform(m11: number, m12: number, m21: number, m22: number, dx: number, dy: number): void;
          translate(x: number, y: number): void;
      }
      
      declare var CanvasRenderingContext2D: {
          prototype: CanvasRenderingContext2D;
          new(): CanvasRenderingContext2D;
      }
      
      interface ChannelMergerNode extends AudioNode {
      }
      
      declare var ChannelMergerNode: {
          prototype: ChannelMergerNode;
          new(): ChannelMergerNode;
      }
      
      interface ChannelSplitterNode extends AudioNode {
      }
      
      declare var ChannelSplitterNode: {
          prototype: ChannelSplitterNode;
          new(): ChannelSplitterNode;
      }
      
      interface CharacterData extends Node, ChildNode {
          data: string;
          length: number;
          appendData(arg: string): void;
          deleteData(offset: number, count: number): void;
          insertData(offset: number, arg: string): void;
          replaceData(offset: number, count: number, arg: string): void;
          substringData(offset: number, count: number): string;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var CharacterData: {
          prototype: CharacterData;
          new(): CharacterData;
      }
      
      interface ClientRect {
          bottom: number;
          height: number;
          left: number;
          right: number;
          top: number;
          width: number;
      }
      
      declare var ClientRect: {
          prototype: ClientRect;
          new(): ClientRect;
      }
      
      interface ClientRectList {
          length: number;
          item(index: number): ClientRect;
          [index: number]: ClientRect;
      }
      
      declare var ClientRectList: {
          prototype: ClientRectList;
          new(): ClientRectList;
      }
      
      interface ClipboardEvent extends Event {
          clipboardData: DataTransfer;
      }
      
      declare var ClipboardEvent: {
          prototype: ClipboardEvent;
          new(type: string, eventInitDict?: ClipboardEventInit): ClipboardEvent;
      }
      
      interface CloseEvent extends Event {
          code: number;
          reason: string;
          wasClean: boolean;
          initCloseEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, wasCleanArg: boolean, codeArg: number, reasonArg: string): void;
      }
      
      declare var CloseEvent: {
          prototype: CloseEvent;
          new(): CloseEvent;
      }
      
      interface CommandEvent extends Event {
          commandName: string;
          detail: string;
      }
      
      declare var CommandEvent: {
          prototype: CommandEvent;
          new(type: string, eventInitDict?: CommandEventInit): CommandEvent;
      }
      
      interface Comment extends CharacterData {
          text: string;
      }
      
      declare var Comment: {
          prototype: Comment;
          new(): Comment;
      }
      
      interface CompositionEvent extends UIEvent {
          data: string;
          locale: string;
          initCompositionEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, dataArg: string, locale: string): void;
      }
      
      declare var CompositionEvent: {
          prototype: CompositionEvent;
          new(typeArg: string, eventInitDict?: CompositionEventInit): CompositionEvent;
      }
      
      interface Console {
          assert(test?: boolean, message?: string, ...optionalParams: any[]): void;
          clear(): void;
          count(countTitle?: string): void;
          debug(message?: string, ...optionalParams: any[]): void;
          dir(value?: any, ...optionalParams: any[]): void;
          dirxml(value: any): void;
          error(message?: any, ...optionalParams: any[]): void;
          group(groupTitle?: string): void;
          groupCollapsed(groupTitle?: string): void;
          groupEnd(): void;
          info(message?: any, ...optionalParams: any[]): void;
          log(message?: any, ...optionalParams: any[]): void;
          msIsIndependentlyComposed(element: Element): boolean;
          profile(reportName?: string): void;
          profileEnd(): void;
          select(element: Element): void;
          time(timerName?: string): void;
          timeEnd(timerName?: string): void;
          trace(): void;
          warn(message?: any, ...optionalParams: any[]): void;
      }
      
      declare var Console: {
          prototype: Console;
          new(): Console;
      }
      
      interface ConvolverNode extends AudioNode {
          buffer: AudioBuffer;
          normalize: boolean;
      }
      
      declare var ConvolverNode: {
          prototype: ConvolverNode;
          new(): ConvolverNode;
      }
      
      interface Coordinates {
          accuracy: number;
          altitude: number;
          altitudeAccuracy: number;
          heading: number;
          latitude: number;
          longitude: number;
          speed: number;
      }
      
      declare var Coordinates: {
          prototype: Coordinates;
          new(): Coordinates;
      }
      
      interface Crypto extends Object, RandomSource {
          subtle: SubtleCrypto;
      }
      
      declare var Crypto: {
          prototype: Crypto;
          new(): Crypto;
      }
      
      interface CryptoKey {
          algorithm: KeyAlgorithm;
          extractable: boolean;
          type: string;
          usages: string[];
      }
      
      declare var CryptoKey: {
          prototype: CryptoKey;
          new(): CryptoKey;
      }
      
      interface CryptoKeyPair {
          privateKey: CryptoKey;
          publicKey: CryptoKey;
      }
      
      declare var CryptoKeyPair: {
          prototype: CryptoKeyPair;
          new(): CryptoKeyPair;
      }
      
      interface CustomEvent extends Event {
          detail: any;
          initCustomEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, detailArg: any): void;
      }
      
      declare var CustomEvent: {
          prototype: CustomEvent;
          new(typeArg: string, eventInitDict?: CustomEventInit): CustomEvent;
      }
      
      interface DOMError {
          name: string;
          toString(): string;
      }
      
      declare var DOMError: {
          prototype: DOMError;
          new(): DOMError;
      }
      
      interface DOMException {
          code: number;
          message: string;
          name: string;
          toString(): string;
          ABORT_ERR: number;
          DATA_CLONE_ERR: number;
          DOMSTRING_SIZE_ERR: number;
          HIERARCHY_REQUEST_ERR: number;
          INDEX_SIZE_ERR: number;
          INUSE_ATTRIBUTE_ERR: number;
          INVALID_ACCESS_ERR: number;
          INVALID_CHARACTER_ERR: number;
          INVALID_MODIFICATION_ERR: number;
          INVALID_NODE_TYPE_ERR: number;
          INVALID_STATE_ERR: number;
          NAMESPACE_ERR: number;
          NETWORK_ERR: number;
          NOT_FOUND_ERR: number;
          NOT_SUPPORTED_ERR: number;
          NO_DATA_ALLOWED_ERR: number;
          NO_MODIFICATION_ALLOWED_ERR: number;
          PARSE_ERR: number;
          QUOTA_EXCEEDED_ERR: number;
          SECURITY_ERR: number;
          SERIALIZE_ERR: number;
          SYNTAX_ERR: number;
          TIMEOUT_ERR: number;
          TYPE_MISMATCH_ERR: number;
          URL_MISMATCH_ERR: number;
          VALIDATION_ERR: number;
          WRONG_DOCUMENT_ERR: number;
      }
      
      declare var DOMException: {
          prototype: DOMException;
          new(): DOMException;
          ABORT_ERR: number;
          DATA_CLONE_ERR: number;
          DOMSTRING_SIZE_ERR: number;
          HIERARCHY_REQUEST_ERR: number;
          INDEX_SIZE_ERR: number;
          INUSE_ATTRIBUTE_ERR: number;
          INVALID_ACCESS_ERR: number;
          INVALID_CHARACTER_ERR: number;
          INVALID_MODIFICATION_ERR: number;
          INVALID_NODE_TYPE_ERR: number;
          INVALID_STATE_ERR: number;
          NAMESPACE_ERR: number;
          NETWORK_ERR: number;
          NOT_FOUND_ERR: number;
          NOT_SUPPORTED_ERR: number;
          NO_DATA_ALLOWED_ERR: number;
          NO_MODIFICATION_ALLOWED_ERR: number;
          PARSE_ERR: number;
          QUOTA_EXCEEDED_ERR: number;
          SECURITY_ERR: number;
          SERIALIZE_ERR: number;
          SYNTAX_ERR: number;
          TIMEOUT_ERR: number;
          TYPE_MISMATCH_ERR: number;
          URL_MISMATCH_ERR: number;
          VALIDATION_ERR: number;
          WRONG_DOCUMENT_ERR: number;
      }
      
      interface DOMImplementation {
          createDocument(namespaceURI: string, qualifiedName: string, doctype: DocumentType): Document;
          createDocumentType(qualifiedName: string, publicId: string, systemId: string): DocumentType;
          createHTMLDocument(title: string): Document;
          hasFeature(feature: string, version: string): boolean;
      }
      
      declare var DOMImplementation: {
          prototype: DOMImplementation;
          new(): DOMImplementation;
      }
      
      interface DOMParser {
          parseFromString(source: string, mimeType: string): Document;
      }
      
      declare var DOMParser: {
          prototype: DOMParser;
          new(): DOMParser;
      }
      
      interface DOMSettableTokenList extends DOMTokenList {
          value: string;
      }
      
      declare var DOMSettableTokenList: {
          prototype: DOMSettableTokenList;
          new(): DOMSettableTokenList;
      }
      
      interface DOMStringList {
          length: number;
          contains(str: string): boolean;
          item(index: number): string;
          [index: number]: string;
      }
      
      declare var DOMStringList: {
          prototype: DOMStringList;
          new(): DOMStringList;
      }
      
      interface DOMStringMap {
          [name: string]: string;
      }
      
      declare var DOMStringMap: {
          prototype: DOMStringMap;
          new(): DOMStringMap;
      }
      
      interface DOMTokenList {
          length: number;
          add(...token: string[]): void;
          contains(token: string): boolean;
          item(index: number): string;
          remove(...token: string[]): void;
          toString(): string;
          toggle(token: string, force?: boolean): boolean;
          [index: number]: string;
      }
      
      declare var DOMTokenList: {
          prototype: DOMTokenList;
          new(): DOMTokenList;
      }
      
      interface DataCue extends TextTrackCue {
          data: ArrayBuffer;
      }
      
      declare var DataCue: {
          prototype: DataCue;
          new(): DataCue;
      }
      
      interface DataTransfer {
          dropEffect: string;
          effectAllowed: string;
          files: FileList;
          items: DataTransferItemList;
          types: DOMStringList;
          clearData(format?: string): boolean;
          getData(format: string): string;
          setData(format: string, data: string): boolean;
      }
      
      declare var DataTransfer: {
          prototype: DataTransfer;
          new(): DataTransfer;
      }
      
      interface DataTransferItem {
          kind: string;
          type: string;
          getAsFile(): File;
          getAsString(_callback: FunctionStringCallback): void;
      }
      
      declare var DataTransferItem: {
          prototype: DataTransferItem;
          new(): DataTransferItem;
      }
      
      interface DataTransferItemList {
          length: number;
          add(data: File): DataTransferItem;
          clear(): void;
          item(index: number): File;
          remove(index: number): void;
          [index: number]: File;
      }
      
      declare var DataTransferItemList: {
          prototype: DataTransferItemList;
          new(): DataTransferItemList;
      }
      
      interface DeferredPermissionRequest {
          id: number;
          type: string;
          uri: string;
          allow(): void;
          deny(): void;
      }
      
      declare var DeferredPermissionRequest: {
          prototype: DeferredPermissionRequest;
          new(): DeferredPermissionRequest;
      }
      
      interface DelayNode extends AudioNode {
          delayTime: AudioParam;
      }
      
      declare var DelayNode: {
          prototype: DelayNode;
          new(): DelayNode;
      }
      
      interface DeviceAcceleration {
          x: number;
          y: number;
          z: number;
      }
      
      declare var DeviceAcceleration: {
          prototype: DeviceAcceleration;
          new(): DeviceAcceleration;
      }
      
      interface DeviceMotionEvent extends Event {
          acceleration: DeviceAcceleration;
          accelerationIncludingGravity: DeviceAcceleration;
          interval: number;
          rotationRate: DeviceRotationRate;
          initDeviceMotionEvent(type: string, bubbles: boolean, cancelable: boolean, acceleration: DeviceAccelerationDict, accelerationIncludingGravity: DeviceAccelerationDict, rotationRate: DeviceRotationRateDict, interval: number): void;
      }
      
      declare var DeviceMotionEvent: {
          prototype: DeviceMotionEvent;
          new(): DeviceMotionEvent;
      }
      
      interface DeviceOrientationEvent extends Event {
          absolute: boolean;
          alpha: number;
          beta: number;
          gamma: number;
          initDeviceOrientationEvent(type: string, bubbles: boolean, cancelable: boolean, alpha: number, beta: number, gamma: number, absolute: boolean): void;
      }
      
      declare var DeviceOrientationEvent: {
          prototype: DeviceOrientationEvent;
          new(): DeviceOrientationEvent;
      }
      
      interface DeviceRotationRate {
          alpha: number;
          beta: number;
          gamma: number;
      }
      
      declare var DeviceRotationRate: {
          prototype: DeviceRotationRate;
          new(): DeviceRotationRate;
      }
      
      interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEvent {
          /**
            * Sets or gets the URL for the current document. 
            */
          URL: string;
          /**
            * Gets the URL for the document, stripped of any character encoding.
            */
          URLUnencoded: string;
          /**
            * Gets the object that has the focus when the parent document has focus.
            */
          activeElement: Element;
          /**
            * Sets or gets the color of all active links in the document.
            */
          alinkColor: string;
          /**
            * Returns a reference to the collection of elements contained by the object.
            */
          all: HTMLCollection;
          /**
            * Retrieves a collection of all a objects that have a name and/or id property. Objects in this collection are in HTML source order.
            */
          anchors: HTMLCollection;
          /**
            * Retrieves a collection of all applet objects in the document.
            */
          applets: HTMLCollection;
          /**
            * Deprecated. Sets or retrieves a value that indicates the background color behind the object. 
            */
          bgColor: string;
          /**
            * Specifies the beginning and end of the document body.
            */
          body: HTMLElement;
          characterSet: string;
          /**
            * Gets or sets the character set used to encode the object.
            */
          charset: string;
          /**
            * Gets a value that indicates whether standards-compliant mode is switched on for the object.
            */
          compatMode: string;
          cookie: string;
          /**
            * Gets the default character set from the current regional language settings.
            */
          defaultCharset: string;
          defaultView: Window;
          /**
            * Sets or gets a value that indicates whether the document can be edited.
            */
          designMode: string;
          /**
            * Sets or retrieves a value that indicates the reading order of the object. 
            */
          dir: string;
          /**
            * Gets an object representing the document type declaration associated with the current document. 
            */
          doctype: DocumentType;
          /**
            * Gets a reference to the root node of the document. 
            */
          documentElement: HTMLElement;
          /**
            * Sets or gets the security domain of the document. 
            */
          domain: string;
          /**
            * Retrieves a collection of all embed objects in the document.
            */
          embeds: HTMLCollection;
          /**
            * Sets or gets the foreground (text) color of the document.
            */
          fgColor: string;
          /**
            * Retrieves a collection, in source order, of all form objects in the document.
            */
          forms: HTMLCollection;
          fullscreenElement: Element;
          fullscreenEnabled: boolean;
          head: HTMLHeadElement;
          hidden: boolean;
          /**
            * Retrieves a collection, in source order, of img objects in the document.
            */
          images: HTMLCollection;
          /**
            * Gets the implementation object of the current document. 
            */
          implementation: DOMImplementation;
          /**
            * Returns the character encoding used to create the webpage that is loaded into the document object.
            */
          inputEncoding: string;
          /**
            * Gets the date that the page was last modified, if the page supplies one. 
            */
          lastModified: string;
          /**
            * Sets or gets the color of the document links. 
            */
          linkColor: string;
          /**
            * Retrieves a collection of all a objects that specify the href property and all area objects in the document.
            */
          links: HTMLCollection;
          /**
            * Contains information about the current URL. 
            */
          location: Location;
          media: string;
          msCSSOMElementFloatMetrics: boolean;
          msCapsLockWarningOff: boolean;
          msHidden: boolean;
          msVisibilityState: string;
          /**
            * Fires when the user aborts the download.
            * @param ev The event.
            */
          onabort: (ev: Event) => any;
          /**
            * Fires when the object is set as the active element.
            * @param ev The event.
            */
          onactivate: (ev: UIEvent) => any;
          /**
            * Fires immediately before the object is set as the active element.
            * @param ev The event.
            */
          onbeforeactivate: (ev: UIEvent) => any;
          /**
            * Fires immediately before the activeElement is changed from the current object to another object in the parent document.
            * @param ev The event.
            */
          onbeforedeactivate: (ev: UIEvent) => any;
          /** 
            * Fires when the object loses the input focus. 
            * @param ev The focus event.
            */
          onblur: (ev: FocusEvent) => any;
          /**
            * Occurs when playback is possible, but would require further buffering. 
            * @param ev The event.
            */
          oncanplay: (ev: Event) => any;
          oncanplaythrough: (ev: Event) => any;
          /**
            * Fires when the contents of the object or selection have changed. 
            * @param ev The event.
            */
          onchange: (ev: Event) => any;
          /**
            * Fires when the user clicks the left mouse button on the object
            * @param ev The mouse event.
            */
          onclick: (ev: MouseEvent) => any;
          /**
            * Fires when the user clicks the right mouse button in the client area, opening the context menu. 
            * @param ev The mouse event.
            */
          oncontextmenu: (ev: PointerEvent) => any;
          /**
            * Fires when the user double-clicks the object.
            * @param ev The mouse event.
            */
          ondblclick: (ev: MouseEvent) => any;
          /**
            * Fires when the activeElement is changed from the current object to another object in the parent document.
            * @param ev The UI Event
            */
          ondeactivate: (ev: UIEvent) => any;
          /**
            * Fires on the source object continuously during a drag operation.
            * @param ev The event.
            */
          ondrag: (ev: DragEvent) => any;
          /**
            * Fires on the source object when the user releases the mouse at the close of a drag operation.
            * @param ev The event.
            */
          ondragend: (ev: DragEvent) => any;
          /** 
            * Fires on the target element when the user drags the object to a valid drop target.
            * @param ev The drag event.
            */
          ondragenter: (ev: DragEvent) => any;
          /** 
            * Fires on the target object when the user moves the mouse out of a valid drop target during a drag operation.
            * @param ev The drag event.
            */
          ondragleave: (ev: DragEvent) => any;
          /**
            * Fires on the target element continuously while the user drags the object over a valid drop target.
            * @param ev The event.
            */
          ondragover: (ev: DragEvent) => any;
          /**
            * Fires on the source object when the user starts to drag a text selection or selected object. 
            * @param ev The event.
            */
          ondragstart: (ev: DragEvent) => any;
          ondrop: (ev: DragEvent) => any;
          /**
            * Occurs when the duration attribute is updated. 
            * @param ev The event.
            */
          ondurationchange: (ev: Event) => any;
          /**
            * Occurs when the media element is reset to its initial state. 
            * @param ev The event.
            */
          onemptied: (ev: Event) => any;
          /**
            * Occurs when the end of playback is reached. 
            * @param ev The event
            */
          onended: (ev: Event) => any;
          /**
            * Fires when an error occurs during object loading.
            * @param ev The event.
            */
          onerror: (ev: Event) => any;
          /**
            * Fires when the object receives focus. 
            * @param ev The event.
            */
          onfocus: (ev: FocusEvent) => any;
          onfullscreenchange: (ev: Event) => any;
          onfullscreenerror: (ev: Event) => any;
          oninput: (ev: Event) => any;
          /**
            * Fires when the user presses a key.
            * @param ev The keyboard event
            */
          onkeydown: (ev: KeyboardEvent) => any;
          /**
            * Fires when the user presses an alphanumeric key.
            * @param ev The event.
            */
          onkeypress: (ev: KeyboardEvent) => any;
          /**
            * Fires when the user releases a key.
            * @param ev The keyboard event
            */
          onkeyup: (ev: KeyboardEvent) => any;
          /**
            * Fires immediately after the browser loads the object. 
            * @param ev The event.
            */
          onload: (ev: Event) => any;
          /**
            * Occurs when media data is loaded at the current playback position. 
            * @param ev The event.
            */
          onloadeddata: (ev: Event) => any;
          /**
            * Occurs when the duration and dimensions of the media have been determined.
            * @param ev The event.
            */
          onloadedmetadata: (ev: Event) => any;
          /**
            * Occurs when Internet Explorer begins looking for media data. 
            * @param ev The event.
            */
          onloadstart: (ev: Event) => any;
          /**
            * Fires when the user clicks the object with either mouse button. 
            * @param ev The mouse event.
            */
          onmousedown: (ev: MouseEvent) => any;
          /**
            * Fires when the user moves the mouse over the object. 
            * @param ev The mouse event.
            */
          onmousemove: (ev: MouseEvent) => any;
          /**
            * Fires when the user moves the mouse pointer outside the boundaries of the object. 
            * @param ev The mouse event.
            */
          onmouseout: (ev: MouseEvent) => any;
          /**
            * Fires when the user moves the mouse pointer into the object.
            * @param ev The mouse event.
            */
          onmouseover: (ev: MouseEvent) => any;
          /**
            * Fires when the user releases a mouse button while the mouse is over the object. 
            * @param ev The mouse event.
            */
          onmouseup: (ev: MouseEvent) => any;
          /**
            * Fires when the wheel button is rotated. 
            * @param ev The mouse event
            */
          onmousewheel: (ev: MouseWheelEvent) => any;
          onmscontentzoom: (ev: UIEvent) => any;
          onmsgesturechange: (ev: MSGestureEvent) => any;
          onmsgesturedoubletap: (ev: MSGestureEvent) => any;
          onmsgestureend: (ev: MSGestureEvent) => any;
          onmsgesturehold: (ev: MSGestureEvent) => any;
          onmsgesturestart: (ev: MSGestureEvent) => any;
          onmsgesturetap: (ev: MSGestureEvent) => any;
          onmsinertiastart: (ev: MSGestureEvent) => any;
          onmsmanipulationstatechanged: (ev: MSManipulationEvent) => any;
          onmspointercancel: (ev: MSPointerEvent) => any;
          onmspointerdown: (ev: MSPointerEvent) => any;
          onmspointerenter: (ev: MSPointerEvent) => any;
          onmspointerleave: (ev: MSPointerEvent) => any;
          onmspointermove: (ev: MSPointerEvent) => any;
          onmspointerout: (ev: MSPointerEvent) => any;
          onmspointerover: (ev: MSPointerEvent) => any;
          onmspointerup: (ev: MSPointerEvent) => any;
          /**
            * Occurs when an item is removed from a Jump List of a webpage running in Site Mode. 
            * @param ev The event.
            */
          onmssitemodejumplistitemremoved: (ev: MSSiteModeEvent) => any;
          /**
            * Occurs when a user clicks a button in a Thumbnail Toolbar of a webpage running in Site Mode.
            * @param ev The event.
            */
          onmsthumbnailclick: (ev: MSSiteModeEvent) => any;
          /**
            * Occurs when playback is paused.
            * @param ev The event.
            */
          onpause: (ev: Event) => any;
          /**
            * Occurs when the play method is requested. 
            * @param ev The event.
            */
          onplay: (ev: Event) => any;
          /**
            * Occurs when the audio or video has started playing. 
            * @param ev The event.
            */
          onplaying: (ev: Event) => any;
          onpointerlockchange: (ev: Event) => any;
          onpointerlockerror: (ev: Event) => any;
          /**
            * Occurs to indicate progress while downloading media data. 
            * @param ev The event.
            */
          onprogress: (ev: ProgressEvent) => any;
          /**
            * Occurs when the playback rate is increased or decreased. 
            * @param ev The event.
            */
          onratechange: (ev: Event) => any;
          /**
            * Fires when the state of the object has changed.
            * @param ev The event
            */
          onreadystatechange: (ev: ProgressEvent) => any;
          /**
            * Fires when the user resets a form. 
            * @param ev The event.
            */
          onreset: (ev: Event) => any;
          /**
            * Fires when the user repositions the scroll box in the scroll bar on the object. 
            * @param ev The event.
            */
          onscroll: (ev: UIEvent) => any;
          /**
            * Occurs when the seek operation ends. 
            * @param ev The event.
            */
          onseeked: (ev: Event) => any;
          /**
            * Occurs when the current playback position is moved. 
            * @param ev The event.
            */
          onseeking: (ev: Event) => any;
          /**
            * Fires when the current selection changes.
            * @param ev The event.
            */
          onselect: (ev: UIEvent) => any;
          onselectstart: (ev: Event) => any;
          /**
            * Occurs when the download has stopped. 
            * @param ev The event.
            */
          onstalled: (ev: Event) => any;
          /**
            * Fires when the user clicks the Stop button or leaves the Web page.
            * @param ev The event.
            */
          onstop: (ev: Event) => any;
          onsubmit: (ev: Event) => any;
          /**
            * Occurs if the load operation has been intentionally halted. 
            * @param ev The event.
            */
          onsuspend: (ev: Event) => any;
          /**
            * Occurs to indicate the current playback position.
            * @param ev The event.
            */
          ontimeupdate: (ev: Event) => any;
          ontouchcancel: (ev: TouchEvent) => any;
          ontouchend: (ev: TouchEvent) => any;
          ontouchmove: (ev: TouchEvent) => any;
          ontouchstart: (ev: TouchEvent) => any;
          /**
            * Occurs when the volume is changed, or playback is muted or unmuted.
            * @param ev The event.
            */
          onvolumechange: (ev: Event) => any;
          /**
            * Occurs when playback stops because the next frame of a video resource is not available. 
            * @param ev The event.
            */
          onwaiting: (ev: Event) => any;
          onwebkitfullscreenchange: (ev: Event) => any;
          onwebkitfullscreenerror: (ev: Event) => any;
          plugins: HTMLCollection;
          pointerLockElement: Element;
          /**
            * Retrieves a value that indicates the current state of the object.
            */
          readyState: string;
          /**
            * Gets the URL of the location that referred the user to the current page.
            */
          referrer: string;
          /**
            * Gets the root svg element in the document hierarchy.
            */
          rootElement: SVGSVGElement;
          /**
            * Retrieves a collection of all script objects in the document.
            */
          scripts: HTMLCollection;
          security: string;
          /**
            * Retrieves a collection of styleSheet objects representing the style sheets that correspond to each instance of a link or style object in the document.
            */
          styleSheets: StyleSheetList;
          /**
            * Contains the title of the document.
            */
          title: string;
          visibilityState: string;
          /** 
            * Sets or gets the color of the links that the user has visited.
            */
          vlinkColor: string;
          webkitCurrentFullScreenElement: Element;
          webkitFullscreenElement: Element;
          webkitFullscreenEnabled: boolean;
          webkitIsFullScreen: boolean;
          xmlEncoding: string;
          xmlStandalone: boolean;
          /**
            * Gets or sets the version attribute specified in the declaration of an XML document.
            */
          xmlVersion: string;
          adoptNode(source: Node): Node;
          captureEvents(): void;
          clear(): void;
          /**
            * Closes an output stream and forces the sent data to display.
            */
          close(): void;
          /**
            * Creates an attribute object with a specified name.
            * @param name String that sets the attribute object's name.
            */
          createAttribute(name: string): Attr;
          createAttributeNS(namespaceURI: string, qualifiedName: string): Attr;
          createCDATASection(data: string): CDATASection;
          /**
            * Creates a comment object with the specified data.
            * @param data Sets the comment object's data.
            */
          createComment(data: string): Comment;
          /**
            * Creates a new document.
            */
          createDocumentFragment(): DocumentFragment;
          /**
            * Creates an instance of the element for the specified tag.
            * @param tagName The name of an element.
            */
          createElement(tagName: "a"): HTMLAnchorElement;
          createElement(tagName: "abbr"): HTMLPhraseElement;
          createElement(tagName: "acronym"): HTMLPhraseElement;
          createElement(tagName: "address"): HTMLBlockElement;
          createElement(tagName: "applet"): HTMLAppletElement;
          createElement(tagName: "area"): HTMLAreaElement;
          createElement(tagName: "audio"): HTMLAudioElement;
          createElement(tagName: "b"): HTMLPhraseElement;
          createElement(tagName: "base"): HTMLBaseElement;
          createElement(tagName: "basefont"): HTMLBaseFontElement;
          createElement(tagName: "bdo"): HTMLPhraseElement;
          createElement(tagName: "big"): HTMLPhraseElement;
          createElement(tagName: "blockquote"): HTMLBlockElement;
          createElement(tagName: "body"): HTMLBodyElement;
          createElement(tagName: "br"): HTMLBRElement;
          createElement(tagName: "button"): HTMLButtonElement;
          createElement(tagName: "canvas"): HTMLCanvasElement;
          createElement(tagName: "caption"): HTMLTableCaptionElement;
          createElement(tagName: "center"): HTMLBlockElement;
          createElement(tagName: "cite"): HTMLPhraseElement;
          createElement(tagName: "code"): HTMLPhraseElement;
          createElement(tagName: "col"): HTMLTableColElement;
          createElement(tagName: "colgroup"): HTMLTableColElement;
          createElement(tagName: "datalist"): HTMLDataListElement;
          createElement(tagName: "dd"): HTMLDDElement;
          createElement(tagName: "del"): HTMLModElement;
          createElement(tagName: "dfn"): HTMLPhraseElement;
          createElement(tagName: "dir"): HTMLDirectoryElement;
          createElement(tagName: "div"): HTMLDivElement;
          createElement(tagName: "dl"): HTMLDListElement;
          createElement(tagName: "dt"): HTMLDTElement;
          createElement(tagName: "em"): HTMLPhraseElement;
          createElement(tagName: "embed"): HTMLEmbedElement;
          createElement(tagName: "fieldset"): HTMLFieldSetElement;
          createElement(tagName: "font"): HTMLFontElement;
          createElement(tagName: "form"): HTMLFormElement;
          createElement(tagName: "frame"): HTMLFrameElement;
          createElement(tagName: "frameset"): HTMLFrameSetElement;
          createElement(tagName: "h1"): HTMLHeadingElement;
          createElement(tagName: "h2"): HTMLHeadingElement;
          createElement(tagName: "h3"): HTMLHeadingElement;
          createElement(tagName: "h4"): HTMLHeadingElement;
          createElement(tagName: "h5"): HTMLHeadingElement;
          createElement(tagName: "h6"): HTMLHeadingElement;
          createElement(tagName: "head"): HTMLHeadElement;
          createElement(tagName: "hr"): HTMLHRElement;
          createElement(tagName: "html"): HTMLHtmlElement;
          createElement(tagName: "i"): HTMLPhraseElement;
          createElement(tagName: "iframe"): HTMLIFrameElement;
          createElement(tagName: "img"): HTMLImageElement;
          createElement(tagName: "input"): HTMLInputElement;
          createElement(tagName: "ins"): HTMLModElement;
          createElement(tagName: "isindex"): HTMLIsIndexElement;
          createElement(tagName: "kbd"): HTMLPhraseElement;
          createElement(tagName: "keygen"): HTMLBlockElement;
          createElement(tagName: "label"): HTMLLabelElement;
          createElement(tagName: "legend"): HTMLLegendElement;
          createElement(tagName: "li"): HTMLLIElement;
          createElement(tagName: "link"): HTMLLinkElement;
          createElement(tagName: "listing"): HTMLBlockElement;
          createElement(tagName: "map"): HTMLMapElement;
          createElement(tagName: "marquee"): HTMLMarqueeElement;
          createElement(tagName: "menu"): HTMLMenuElement;
          createElement(tagName: "meta"): HTMLMetaElement;
          createElement(tagName: "nextid"): HTMLNextIdElement;
          createElement(tagName: "nobr"): HTMLPhraseElement;
          createElement(tagName: "object"): HTMLObjectElement;
          createElement(tagName: "ol"): HTMLOListElement;
          createElement(tagName: "optgroup"): HTMLOptGroupElement;
          createElement(tagName: "option"): HTMLOptionElement;
          createElement(tagName: "p"): HTMLParagraphElement;
          createElement(tagName: "param"): HTMLParamElement;
          createElement(tagName: "plaintext"): HTMLBlockElement;
          createElement(tagName: "pre"): HTMLPreElement;
          createElement(tagName: "progress"): HTMLProgressElement;
          createElement(tagName: "q"): HTMLQuoteElement;
          createElement(tagName: "rt"): HTMLPhraseElement;
          createElement(tagName: "ruby"): HTMLPhraseElement;
          createElement(tagName: "s"): HTMLPhraseElement;
          createElement(tagName: "samp"): HTMLPhraseElement;
          createElement(tagName: "script"): HTMLScriptElement;
          createElement(tagName: "select"): HTMLSelectElement;
          createElement(tagName: "small"): HTMLPhraseElement;
          createElement(tagName: "source"): HTMLSourceElement;
          createElement(tagName: "span"): HTMLSpanElement;
          createElement(tagName: "strike"): HTMLPhraseElement;
          createElement(tagName: "strong"): HTMLPhraseElement;
          createElement(tagName: "style"): HTMLStyleElement;
          createElement(tagName: "sub"): HTMLPhraseElement;
          createElement(tagName: "sup"): HTMLPhraseElement;
          createElement(tagName: "table"): HTMLTableElement;
          createElement(tagName: "tbody"): HTMLTableSectionElement;
          createElement(tagName: "td"): HTMLTableDataCellElement;
          createElement(tagName: "textarea"): HTMLTextAreaElement;
          createElement(tagName: "tfoot"): HTMLTableSectionElement;
          createElement(tagName: "th"): HTMLTableHeaderCellElement;
          createElement(tagName: "thead"): HTMLTableSectionElement;
          createElement(tagName: "title"): HTMLTitleElement;
          createElement(tagName: "tr"): HTMLTableRowElement;
          createElement(tagName: "track"): HTMLTrackElement;
          createElement(tagName: "tt"): HTMLPhraseElement;
          createElement(tagName: "u"): HTMLPhraseElement;
          createElement(tagName: "ul"): HTMLUListElement;
          createElement(tagName: "var"): HTMLPhraseElement;
          createElement(tagName: "video"): HTMLVideoElement;
          createElement(tagName: "x-ms-webview"): MSHTMLWebViewElement;
          createElement(tagName: "xmp"): HTMLBlockElement;
          createElement(tagName: string): HTMLElement;
          createElementNS(namespaceURI: string, qualifiedName: string): Element;
          createExpression(expression: string, resolver: XPathNSResolver): XPathExpression;
          createNSResolver(nodeResolver: Node): XPathNSResolver;
          /**
            * Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document. 
            * @param root The root element or node to start traversing on.
            * @param whatToShow The type of nodes or elements to appear in the node list
            * @param filter A custom NodeFilter function to use. For more information, see filter. Use null for no filter.
            * @param entityReferenceExpansion A flag that specifies whether entity reference nodes are expanded.
            */
          createNodeIterator(root: Node, whatToShow?: number, filter?: NodeFilter, entityReferenceExpansion?: boolean): NodeIterator;
          createProcessingInstruction(target: string, data: string): ProcessingInstruction;
          /**
            *  Returns an empty range object that has both of its boundary points positioned at the beginning of the document. 
            */
          createRange(): Range;
          /**
            * Creates a text string from the specified value. 
            * @param data String that specifies the nodeValue property of the text node.
            */
          createTextNode(data: string): Text;
          createTouch(view: any, target: EventTarget, identifier: number, pageX: number, pageY: number, screenX: number, screenY: number): Touch;
          createTouchList(...touches: Touch[]): TouchList;
          /**
            * Creates a TreeWalker object that you can use to traverse filtered lists of nodes or elements in a document.
            * @param root The root element or node to start traversing on.
            * @param whatToShow The type of nodes or elements to appear in the node list. For more information, see whatToShow.
            * @param filter A custom NodeFilter function to use.
            * @param entityReferenceExpansion A flag that specifies whether entity reference nodes are expanded.
            */
          createTreeWalker(root: Node, whatToShow?: number, filter?: NodeFilter, entityReferenceExpansion?: boolean): TreeWalker;
          /**
            * Returns the element for the specified x coordinate and the specified y coordinate. 
            * @param x The x-offset
            * @param y The y-offset
            */
          elementFromPoint(x: number, y: number): Element;
          evaluate(expression: string, contextNode: Node, resolver: XPathNSResolver, type: number, result: XPathResult): XPathResult;
          /**
            * Executes a command on the current document, current selection, or the given range.
            * @param commandId String that specifies the command to execute. This command can be any of the command identifiers that can be executed in script.
            * @param showUI Display the user interface, defaults to false.
            * @param value Value to assign.
            */
          execCommand(commandId: string, showUI?: boolean, value?: any): boolean;
          /**
            * Displays help information for the given command identifier.
            * @param commandId Displays help information for the given command identifier.
            */
          execCommandShowHelp(commandId: string): boolean;
          exitFullscreen(): void;
          exitPointerLock(): void;
          /**
            * Causes the element to receive the focus and executes the code specified by the onfocus event.
            */
          focus(): void;
          /**
            * Returns a reference to the first object with the specified value of the ID or NAME attribute.
            * @param elementId String that specifies the ID value. Case-insensitive.
            */
          getElementById(elementId: string): HTMLElement;
          getElementsByClassName(classNames: string): NodeList;
          /**
            * Gets a collection of objects based on the value of the NAME or ID attribute.
            * @param elementName Gets a collection of objects based on the value of the NAME or ID attribute.
            */
          getElementsByName(elementName: string): NodeList;
          /**
            * Retrieves a collection of objects based on the specified element name.
            * @param name Specifies the name of an element.
            */
          getElementsByTagName(tagname: "a"): NodeListOf<HTMLAnchorElement>;
          getElementsByTagName(tagname: "abbr"): NodeListOf<HTMLPhraseElement>;
          getElementsByTagName(tagname: "acronym"): NodeListOf<HTMLPhraseElement>;
          getElementsByTagName(tagname: "address"): NodeListOf<HTMLBlockElement>;
          getElementsByTagName(tagname: "applet"): NodeListOf<HTMLAppletElement>;
          getElementsByTagName(tagname: "area"): NodeListOf<HTMLAreaElement>;
          getElementsByTagName(tagname: "article"): NodeListOf<HTMLElement>;
          getElementsByTagName(tagname: "aside"): NodeListOf<HTMLElement>;
          getElementsByTagName(tagname: "audio"): NodeListOf<HTMLAudioElement>;
          getElementsByTagName(tagname: "b"): NodeListOf<HTMLPhraseElement>;
          getElementsByTagName(tagname: "base"): NodeListOf<HTMLBaseElement>;
          getElementsByTagName(tagname: "basefont"): NodeListOf<HTMLBaseFontElement>;
          getElementsByTagName(tagname: "bdo"): NodeListOf<HTMLPhraseElement>;
          getElementsByTagName(tagname: "big"): NodeListOf<HTMLPhraseElement>;
          getElementsByTagName(tagname: "blockquote"): NodeListOf<HTMLBlockElement>;
          getElementsByTagName(tagname: "body"): NodeListOf<HTMLBodyElement>;
          getElementsByTagName(tagname: "br"): NodeListOf<HTMLBRElement>;
          getElementsByTagName(tagname: "button"): NodeListOf<HTMLButtonElement>;
          getElementsByTagName(tagname: "canvas"): NodeListOf<HTMLCanvasElement>;
          getElementsByTagName(tagname: "caption"): NodeListOf<HTMLTableCaptionElement>;
          getElementsByTagName(tagname: "center"): NodeListOf<HTMLBlockElement>;
          getElementsByTagName(tagname: "circle"): NodeListOf<SVGCircleElement>;
          getElementsByTagName(tagname: "cite"): NodeListOf<HTMLPhraseElement>;
          getElementsByTagName(tagname: "clippath"): NodeListOf<SVGClipPathElement>;
          getElementsByTagName(tagname: "code"): NodeListOf<HTMLPhraseElement>;
          getElementsByTagName(tagname: "col"): NodeListOf<HTMLTableColElement>;
          getElementsByTagName(tagname: "colgroup"): NodeListOf<HTMLTableColElement>;
          getElementsByTagName(tagname: "datalist"): NodeListOf<HTMLDataListElement>;
          getElementsByTagName(tagname: "dd"): NodeListOf<HTMLDDElement>;
          getElementsByTagName(tagname: "defs"): NodeListOf<SVGDefsElement>;
          getElementsByTagName(tagname: "del"): NodeListOf<HTMLModElement>;
          getElementsByTagName(tagname: "desc"): NodeListOf<SVGDescElement>;
          getElementsByTagName(tagname: "dfn"): NodeListOf<HTMLPhraseElement>;
          getElementsByTagName(tagname: "dir"): NodeListOf<HTMLDirectoryElement>;
          getElementsByTagName(tagname: "div"): NodeListOf<HTMLDivElement>;
          getElementsByTagName(tagname: "dl"): NodeListOf<HTMLDListElement>;
          getElementsByTagName(tagname: "dt"): NodeListOf<HTMLDTElement>;
          getElementsByTagName(tagname: "ellipse"): NodeListOf<SVGEllipseElement>;
          getElementsByTagName(tagname: "em"): NodeListOf<HTMLPhraseElement>;
          getElementsByTagName(tagname: "embed"): NodeListOf<HTMLEmbedElement>;
          getElementsByTagName(tagname: "feblend"): NodeListOf<SVGFEBlendElement>;
          getElementsByTagName(tagname: "fecolormatrix"): NodeListOf<SVGFEColorMatrixElement>;
          getElementsByTagName(tagname: "fecomponenttransfer"): NodeListOf<SVGFEComponentTransferElement>;
          getElementsByTagName(tagname: "fecomposite"): NodeListOf<SVGFECompositeElement>;
          getElementsByTagName(tagname: "feconvolvematrix"): NodeListOf<SVGFEConvolveMatrixElement>;
          getElementsByTagName(tagname: "fediffuselighting"): NodeListOf<SVGFEDiffuseLightingElement>;
          getElementsByTagName(tagname: "fedisplacementmap"): NodeListOf<SVGFEDisplacementMapElement>;
          getElementsByTagName(tagname: "fedistantlight"): NodeListOf<SVGFEDistantLightElement>;
          getElementsByTagName(tagname: "feflood"): NodeListOf<SVGFEFloodElement>;
          getElementsByTagName(tagname: "fefunca"): NodeListOf<SVGFEFuncAElement>;
          getElementsByTagName(tagname: "fefuncb"): NodeListOf<SVGFEFuncBElement>;
          getElementsByTagName(tagname: "fefuncg"): NodeListOf<SVGFEFuncGElement>;
          getElementsByTagName(tagname: "fefuncr"): NodeListOf<SVGFEFuncRElement>;
          getElementsByTagName(tagname: "fegaussianblur"): NodeListOf<SVGFEGaussianBlurElement>;
          getElementsByTagName(tagname: "feimage"): NodeListOf<SVGFEImageElement>;
          getElementsByTagName(tagname: "femerge"): NodeListOf<SVGFEMergeElement>;
          getElementsByTagName(tagname: "femergenode"): NodeListOf<SVGFEMergeNodeElement>;
          getElementsByTagName(tagname: "femorphology"): NodeListOf<SVGFEMorphologyElement>;
          getElementsByTagName(tagname: "feoffset"): NodeListOf<SVGFEOffsetElement>;
          getElementsByTagName(tagname: "fepointlight"): NodeListOf<SVGFEPointLightElement>;
          getElementsByTagName(tagname: "fespecularlighting"): NodeListOf<SVGFESpecularLightingElement>;
          getElementsByTagName(tagname: "fespotlight"): NodeListOf<SVGFESpotLightElement>;
          getElementsByTagName(tagname: "fetile"): NodeListOf<SVGFETileElement>;
          getElementsByTagName(tagname: "feturbulence"): NodeListOf<SVGFETurbulenceElement>;
          getElementsByTagName(tagname: "fieldset"): NodeListOf<HTMLFieldSetElement>;
          getElementsByTagName(tagname: "figcaption"): NodeListOf<HTMLElement>;
          getElementsByTagName(tagname: "figure"): NodeListOf<HTMLElement>;
          getElementsByTagName(tagname: "filter"): NodeListOf<SVGFilterElement>;
          getElementsByTagName(tagname: "font"): NodeListOf<HTMLFontElement>;
          getElementsByTagName(tagname: "footer"): NodeListOf<HTMLElement>;
          getElementsByTagName(tagname: "foreignobject"): NodeListOf<SVGForeignObjectElement>;
          getElementsByTagName(tagname: "form"): NodeListOf<HTMLFormElement>;
          getElementsByTagName(tagname: "frame"): NodeListOf<HTMLFrameElement>;
          getElementsByTagName(tagname: "frameset"): NodeListOf<HTMLFrameSetElement>;
          getElementsByTagName(tagname: "g"): NodeListOf<SVGGElement>;
          getElementsByTagName(tagname: "h1"): NodeListOf<HTMLHeadingElement>;
          getElementsByTagName(tagname: "h2"): NodeListOf<HTMLHeadingElement>;
          getElementsByTagName(tagname: "h3"): NodeListOf<HTMLHeadingElement>;
          getElementsByTagName(tagname: "h4"): NodeListOf<HTMLHeadingElement>;
          getElementsByTagName(tagname: "h5"): NodeListOf<HTMLHeadingElement>;
          getElementsByTagName(tagname: "h6"): NodeListOf<HTMLHeadingElement>;
          getElementsByTagName(tagname: "head"): NodeListOf<HTMLHeadElement>;
          getElementsByTagName(tagname: "header"): NodeListOf<HTMLElement>;
          getElementsByTagName(tagname: "hgroup"): NodeListOf<HTMLElement>;
          getElementsByTagName(tagname: "hr"): NodeListOf<HTMLHRElement>;
          getElementsByTagName(tagname: "html"): NodeListOf<HTMLHtmlElement>;
          getElementsByTagName(tagname: "i"): NodeListOf<HTMLPhraseElement>;
          getElementsByTagName(tagname: "iframe"): NodeListOf<HTMLIFrameElement>;
          getElementsByTagName(tagname: "image"): NodeListOf<SVGImageElement>;
          getElementsByTagName(tagname: "img"): NodeListOf<HTMLImageElement>;
          getElementsByTagName(tagname: "input"): NodeListOf<HTMLInputElement>;
          getElementsByTagName(tagname: "ins"): NodeListOf<HTMLModElement>;
          getElementsByTagName(tagname: "isindex"): NodeListOf<HTMLIsIndexElement>;
          getElementsByTagName(tagname: "kbd"): NodeListOf<HTMLPhraseElement>;
          getElementsByTagName(tagname: "keygen"): NodeListOf<HTMLBlockElement>;
          getElementsByTagName(tagname: "label"): NodeListOf<HTMLLabelElement>;
          getElementsByTagName(tagname: "legend"): NodeListOf<HTMLLegendElement>;
          getElementsByTagName(tagname: "li"): NodeListOf<HTMLLIElement>;
          getElementsByTagName(tagname: "line"): NodeListOf<SVGLineElement>;
          getElementsByTagName(tagname: "lineargradient"): NodeListOf<SVGLinearGradientElement>;
          getElementsByTagName(tagname: "link"): NodeListOf<HTMLLinkElement>;
          getElementsByTagName(tagname: "listing"): NodeListOf<HTMLBlockElement>;
          getElementsByTagName(tagname: "map"): NodeListOf<HTMLMapElement>;
          getElementsByTagName(tagname: "mark"): NodeListOf<HTMLElement>;
          getElementsByTagName(tagname: "marker"): NodeListOf<SVGMarkerElement>;
          getElementsByTagName(tagname: "marquee"): NodeListOf<HTMLMarqueeElement>;
          getElementsByTagName(tagname: "mask"): NodeListOf<SVGMaskElement>;
          getElementsByTagName(tagname: "menu"): NodeListOf<HTMLMenuElement>;
          getElementsByTagName(tagname: "meta"): NodeListOf<HTMLMetaElement>;
          getElementsByTagName(tagname: "metadata"): NodeListOf<SVGMetadataElement>;
          getElementsByTagName(tagname: "nav"): NodeListOf<HTMLElement>;
          getElementsByTagName(tagname: "nextid"): NodeListOf<HTMLNextIdElement>;
          getElementsByTagName(tagname: "nobr"): NodeListOf<HTMLPhraseElement>;
          getElementsByTagName(tagname: "noframes"): NodeListOf<HTMLElement>;
          getElementsByTagName(tagname: "noscript"): NodeListOf<HTMLElement>;
          getElementsByTagName(tagname: "object"): NodeListOf<HTMLObjectElement>;
          getElementsByTagName(tagname: "ol"): NodeListOf<HTMLOListElement>;
          getElementsByTagName(tagname: "optgroup"): NodeListOf<HTMLOptGroupElement>;
          getElementsByTagName(tagname: "option"): NodeListOf<HTMLOptionElement>;
          getElementsByTagName(tagname: "p"): NodeListOf<HTMLParagraphElement>;
          getElementsByTagName(tagname: "param"): NodeListOf<HTMLParamElement>;
          getElementsByTagName(tagname: "path"): NodeListOf<SVGPathElement>;
          getElementsByTagName(tagname: "pattern"): NodeListOf<SVGPatternElement>;
          getElementsByTagName(tagname: "plaintext"): NodeListOf<HTMLBlockElement>;
          getElementsByTagName(tagname: "polygon"): NodeListOf<SVGPolygonElement>;
          getElementsByTagName(tagname: "polyline"): NodeListOf<SVGPolylineElement>;
          getElementsByTagName(tagname: "pre"): NodeListOf<HTMLPreElement>;
          getElementsByTagName(tagname: "progress"): NodeListOf<HTMLProgressElement>;
          getElementsByTagName(tagname: "q"): NodeListOf<HTMLQuoteElement>;
          getElementsByTagName(tagname: "radialgradient"): NodeListOf<SVGRadialGradientElement>;
          getElementsByTagName(tagname: "rect"): NodeListOf<SVGRectElement>;
          getElementsByTagName(tagname: "rt"): NodeListOf<HTMLPhraseElement>;
          getElementsByTagName(tagname: "ruby"): NodeListOf<HTMLPhraseElement>;
          getElementsByTagName(tagname: "s"): NodeListOf<HTMLPhraseElement>;
          getElementsByTagName(tagname: "samp"): NodeListOf<HTMLPhraseElement>;
          getElementsByTagName(tagname: "script"): NodeListOf<HTMLScriptElement>;
          getElementsByTagName(tagname: "section"): NodeListOf<HTMLElement>;
          getElementsByTagName(tagname: "select"): NodeListOf<HTMLSelectElement>;
          getElementsByTagName(tagname: "small"): NodeListOf<HTMLPhraseElement>;
          getElementsByTagName(tagname: "source"): NodeListOf<HTMLSourceElement>;
          getElementsByTagName(tagname: "span"): NodeListOf<HTMLSpanElement>;
          getElementsByTagName(tagname: "stop"): NodeListOf<SVGStopElement>;
          getElementsByTagName(tagname: "strike"): NodeListOf<HTMLPhraseElement>;
          getElementsByTagName(tagname: "strong"): NodeListOf<HTMLPhraseElement>;
          getElementsByTagName(tagname: "style"): NodeListOf<HTMLStyleElement>;
          getElementsByTagName(tagname: "sub"): NodeListOf<HTMLPhraseElement>;
          getElementsByTagName(tagname: "sup"): NodeListOf<HTMLPhraseElement>;
          getElementsByTagName(tagname: "svg"): NodeListOf<SVGSVGElement>;
          getElementsByTagName(tagname: "switch"): NodeListOf<SVGSwitchElement>;
          getElementsByTagName(tagname: "symbol"): NodeListOf<SVGSymbolElement>;
          getElementsByTagName(tagname: "table"): NodeListOf<HTMLTableElement>;
          getElementsByTagName(tagname: "tbody"): NodeListOf<HTMLTableSectionElement>;
          getElementsByTagName(tagname: "td"): NodeListOf<HTMLTableDataCellElement>;
          getElementsByTagName(tagname: "text"): NodeListOf<SVGTextElement>;
          getElementsByTagName(tagname: "textpath"): NodeListOf<SVGTextPathElement>;
          getElementsByTagName(tagname: "textarea"): NodeListOf<HTMLTextAreaElement>;
          getElementsByTagName(tagname: "tfoot"): NodeListOf<HTMLTableSectionElement>;
          getElementsByTagName(tagname: "th"): NodeListOf<HTMLTableHeaderCellElement>;
          getElementsByTagName(tagname: "thead"): NodeListOf<HTMLTableSectionElement>;
          getElementsByTagName(tagname: "title"): NodeListOf<HTMLTitleElement>;
          getElementsByTagName(tagname: "tr"): NodeListOf<HTMLTableRowElement>;
          getElementsByTagName(tagname: "track"): NodeListOf<HTMLTrackElement>;
          getElementsByTagName(tagname: "tspan"): NodeListOf<SVGTSpanElement>;
          getElementsByTagName(tagname: "tt"): NodeListOf<HTMLPhraseElement>;
          getElementsByTagName(tagname: "u"): NodeListOf<HTMLPhraseElement>;
          getElementsByTagName(tagname: "ul"): NodeListOf<HTMLUListElement>;
          getElementsByTagName(tagname: "use"): NodeListOf<SVGUseElement>;
          getElementsByTagName(tagname: "var"): NodeListOf<HTMLPhraseElement>;
          getElementsByTagName(tagname: "video"): NodeListOf<HTMLVideoElement>;
          getElementsByTagName(tagname: "view"): NodeListOf<SVGViewElement>;
          getElementsByTagName(tagname: "wbr"): NodeListOf<HTMLElement>;
          getElementsByTagName(tagname: "x-ms-webview"): NodeListOf<MSHTMLWebViewElement>;
          getElementsByTagName(tagname: "xmp"): NodeListOf<HTMLBlockElement>;
          getElementsByTagName(tagname: string): NodeList;
          getElementsByTagNameNS(namespaceURI: string, localName: string): NodeList;
          /**
            * Returns an object representing the current selection of the document that is loaded into the object displaying a webpage.
            */
          getSelection(): Selection;
          /**
            * Gets a value indicating whether the object currently has focus.
            */
          hasFocus(): boolean;
          importNode(importedNode: Node, deep: boolean): Node;
          msElementsFromPoint(x: number, y: number): NodeList;
          msElementsFromRect(left: number, top: number, width: number, height: number): NodeList;
          msGetPrintDocumentForNamedFlow(flowName: string): Document;
          msSetPrintDocumentUriForNamedFlow(flowName: string, uri: string): void;
          /**
            * Opens a new window and loads a document specified by a given URL. Also, opens a new window that uses the url parameter and the name parameter to collect the output of the write method and the writeln method.
            * @param url Specifies a MIME type for the document.
            * @param name Specifies the name of the window. This name is used as the value for the TARGET attribute on a form or an anchor element.
            * @param features Contains a list of items separated by commas. Each item consists of an option and a value, separated by an equals sign (for example, "fullscreen=yes, toolbar=yes"). The following values are supported.
            * @param replace Specifies whether the existing entry for the document is replaced in the history list.
            */
          open(url?: string, name?: string, features?: string, replace?: boolean): Document | Window;
          /** 
            * Returns a Boolean value that indicates whether a specified command can be successfully executed using execCommand, given the current state of the document.
            * @param commandId Specifies a command identifier.
            */
          queryCommandEnabled(commandId: string): boolean;
          /**
            * Returns a Boolean value that indicates whether the specified command is in the indeterminate state.
            * @param commandId String that specifies a command identifier.
            */
          queryCommandIndeterm(commandId: string): boolean;
          /**
            * Returns a Boolean value that indicates the current state of the command.
            * @param commandId String that specifies a command identifier.
            */
          queryCommandState(commandId: string): boolean;
          /**
            * Returns a Boolean value that indicates whether the current command is supported on the current range.
            * @param commandId Specifies a command identifier.
            */
          queryCommandSupported(commandId: string): boolean;
          /**
            * Retrieves the string associated with a command.
            * @param commandId String that contains the identifier of a command. This can be any command identifier given in the list of Command Identifiers. 
            */
          queryCommandText(commandId: string): string;
          /**
            * Returns the current value of the document, range, or current selection for the given command.
            * @param commandId String that specifies a command identifier.
            */
          queryCommandValue(commandId: string): string;
          releaseEvents(): void;
          /**
            * Allows updating the print settings for the page.
            */
          updateSettings(): void;
          webkitCancelFullScreen(): void;
          webkitExitFullscreen(): void;
          /**
            * Writes one or more HTML expressions to a document in the specified window. 
            * @param content Specifies the text and HTML tags to write.
            */
          write(...content: string[]): void;
          /**
            * Writes one or more HTML expressions, followed by a carriage return, to a document in the specified window. 
            * @param content The text and HTML tags to write.
            */
          writeln(...content: string[]): void;
          addEventListener(type: "MSContentZoom", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureHold", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSInertiaStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSManipulationStateChanged", listener: (ev: MSManipulationEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerCancel", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerDown", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerEnter", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerLeave", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerMove", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerOut", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerOver", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerUp", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "activate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "beforeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "beforedeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "blur", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "canplay", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "canplaythrough", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "change", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "click", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "contextmenu", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "dblclick", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "deactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "drag", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "dragend", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "dragenter", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "dragleave", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "dragover", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "dragstart", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "drop", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "durationchange", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "emptied", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "ended", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "focus", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "fullscreenchange", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "fullscreenerror", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "input", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "keydown", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "keypress", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "keyup", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "loadeddata", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "loadedmetadata", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "mousedown", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mousemove", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mouseout", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mouseover", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mouseup", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mousewheel", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mssitemodejumplistitemremoved", listener: (ev: MSSiteModeEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "msthumbnailclick", listener: (ev: MSSiteModeEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "play", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "playing", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "pointercancel", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerdown", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerenter", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerleave", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerlockchange", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerlockerror", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "pointermove", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerout", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerover", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerup", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "ratechange", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "readystatechange", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "reset", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "scroll", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "seeked", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "seeking", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "select", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "selectstart", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "stalled", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "stop", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "submit", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "suspend", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "timeupdate", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "touchcancel", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "touchend", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "touchmove", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "touchstart", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "volumechange", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "waiting", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "webkitfullscreenchange", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "webkitfullscreenerror", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var Document: {
          prototype: Document;
          new(): Document;
      }
      
      interface DocumentFragment extends Node, NodeSelector {
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var DocumentFragment: {
          prototype: DocumentFragment;
          new(): DocumentFragment;
      }
      
      interface DocumentType extends Node, ChildNode {
          entities: NamedNodeMap;
          internalSubset: string;
          name: string;
          notations: NamedNodeMap;
          publicId: string;
          systemId: string;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var DocumentType: {
          prototype: DocumentType;
          new(): DocumentType;
      }
      
      interface DragEvent extends MouseEvent {
          dataTransfer: DataTransfer;
          initDragEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget, dataTransferArg: DataTransfer): void;
          msConvertURL(file: File, targetType: string, targetURL?: string): void;
      }
      
      declare var DragEvent: {
          prototype: DragEvent;
          new(): DragEvent;
      }
      
      interface DynamicsCompressorNode extends AudioNode {
          attack: AudioParam;
          knee: AudioParam;
          ratio: AudioParam;
          reduction: AudioParam;
          release: AudioParam;
          threshold: AudioParam;
      }
      
      declare var DynamicsCompressorNode: {
          prototype: DynamicsCompressorNode;
          new(): DynamicsCompressorNode;
      }
      
      interface EXT_texture_filter_anisotropic {
          MAX_TEXTURE_MAX_ANISOTROPY_EXT: number;
          TEXTURE_MAX_ANISOTROPY_EXT: number;
      }
      
      declare var EXT_texture_filter_anisotropic: {
          prototype: EXT_texture_filter_anisotropic;
          new(): EXT_texture_filter_anisotropic;
          MAX_TEXTURE_MAX_ANISOTROPY_EXT: number;
          TEXTURE_MAX_ANISOTROPY_EXT: number;
      }
      
      interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelector, ChildNode {
          classList: DOMTokenList;
          clientHeight: number;
          clientLeft: number;
          clientTop: number;
          clientWidth: number;
          msContentZoomFactor: number;
          msRegionOverflow: string;
          onariarequest: (ev: AriaRequestEvent) => any;
          oncommand: (ev: CommandEvent) => any;
          ongotpointercapture: (ev: PointerEvent) => any;
          onlostpointercapture: (ev: PointerEvent) => any;
          onmsgesturechange: (ev: MSGestureEvent) => any;
          onmsgesturedoubletap: (ev: MSGestureEvent) => any;
          onmsgestureend: (ev: MSGestureEvent) => any;
          onmsgesturehold: (ev: MSGestureEvent) => any;
          onmsgesturestart: (ev: MSGestureEvent) => any;
          onmsgesturetap: (ev: MSGestureEvent) => any;
          onmsgotpointercapture: (ev: MSPointerEvent) => any;
          onmsinertiastart: (ev: MSGestureEvent) => any;
          onmslostpointercapture: (ev: MSPointerEvent) => any;
          onmspointercancel: (ev: MSPointerEvent) => any;
          onmspointerdown: (ev: MSPointerEvent) => any;
          onmspointerenter: (ev: MSPointerEvent) => any;
          onmspointerleave: (ev: MSPointerEvent) => any;
          onmspointermove: (ev: MSPointerEvent) => any;
          onmspointerout: (ev: MSPointerEvent) => any;
          onmspointerover: (ev: MSPointerEvent) => any;
          onmspointerup: (ev: MSPointerEvent) => any;
          ontouchcancel: (ev: TouchEvent) => any;
          ontouchend: (ev: TouchEvent) => any;
          ontouchmove: (ev: TouchEvent) => any;
          ontouchstart: (ev: TouchEvent) => any;
          onwebkitfullscreenchange: (ev: Event) => any;
          onwebkitfullscreenerror: (ev: Event) => any;
          scrollHeight: number;
          scrollLeft: number;
          scrollTop: number;
          scrollWidth: number;
          tagName: string;
          getAttribute(name?: string): string;
          getAttributeNS(namespaceURI: string, localName: string): string;
          getAttributeNode(name: string): Attr;
          getAttributeNodeNS(namespaceURI: string, localName: string): Attr;
          getBoundingClientRect(): ClientRect;
          getClientRects(): ClientRectList;
          getElementsByTagName(name: "a"): NodeListOf<HTMLAnchorElement>;
          getElementsByTagName(name: "abbr"): NodeListOf<HTMLPhraseElement>;
          getElementsByTagName(name: "acronym"): NodeListOf<HTMLPhraseElement>;
          getElementsByTagName(name: "address"): NodeListOf<HTMLBlockElement>;
          getElementsByTagName(name: "applet"): NodeListOf<HTMLAppletElement>;
          getElementsByTagName(name: "area"): NodeListOf<HTMLAreaElement>;
          getElementsByTagName(name: "article"): NodeListOf<HTMLElement>;
          getElementsByTagName(name: "aside"): NodeListOf<HTMLElement>;
          getElementsByTagName(name: "audio"): NodeListOf<HTMLAudioElement>;
          getElementsByTagName(name: "b"): NodeListOf<HTMLPhraseElement>;
          getElementsByTagName(name: "base"): NodeListOf<HTMLBaseElement>;
          getElementsByTagName(name: "basefont"): NodeListOf<HTMLBaseFontElement>;
          getElementsByTagName(name: "bdo"): NodeListOf<HTMLPhraseElement>;
          getElementsByTagName(name: "big"): NodeListOf<HTMLPhraseElement>;
          getElementsByTagName(name: "blockquote"): NodeListOf<HTMLBlockElement>;
          getElementsByTagName(name: "body"): NodeListOf<HTMLBodyElement>;
          getElementsByTagName(name: "br"): NodeListOf<HTMLBRElement>;
          getElementsByTagName(name: "button"): NodeListOf<HTMLButtonElement>;
          getElementsByTagName(name: "canvas"): NodeListOf<HTMLCanvasElement>;
          getElementsByTagName(name: "caption"): NodeListOf<HTMLTableCaptionElement>;
          getElementsByTagName(name: "center"): NodeListOf<HTMLBlockElement>;
          getElementsByTagName(name: "circle"): NodeListOf<SVGCircleElement>;
          getElementsByTagName(name: "cite"): NodeListOf<HTMLPhraseElement>;
          getElementsByTagName(name: "clippath"): NodeListOf<SVGClipPathElement>;
          getElementsByTagName(name: "code"): NodeListOf<HTMLPhraseElement>;
          getElementsByTagName(name: "col"): NodeListOf<HTMLTableColElement>;
          getElementsByTagName(name: "colgroup"): NodeListOf<HTMLTableColElement>;
          getElementsByTagName(name: "datalist"): NodeListOf<HTMLDataListElement>;
          getElementsByTagName(name: "dd"): NodeListOf<HTMLDDElement>;
          getElementsByTagName(name: "defs"): NodeListOf<SVGDefsElement>;
          getElementsByTagName(name: "del"): NodeListOf<HTMLModElement>;
          getElementsByTagName(name: "desc"): NodeListOf<SVGDescElement>;
          getElementsByTagName(name: "dfn"): NodeListOf<HTMLPhraseElement>;
          getElementsByTagName(name: "dir"): NodeListOf<HTMLDirectoryElement>;
          getElementsByTagName(name: "div"): NodeListOf<HTMLDivElement>;
          getElementsByTagName(name: "dl"): NodeListOf<HTMLDListElement>;
          getElementsByTagName(name: "dt"): NodeListOf<HTMLDTElement>;
          getElementsByTagName(name: "ellipse"): NodeListOf<SVGEllipseElement>;
          getElementsByTagName(name: "em"): NodeListOf<HTMLPhraseElement>;
          getElementsByTagName(name: "embed"): NodeListOf<HTMLEmbedElement>;
          getElementsByTagName(name: "feblend"): NodeListOf<SVGFEBlendElement>;
          getElementsByTagName(name: "fecolormatrix"): NodeListOf<SVGFEColorMatrixElement>;
          getElementsByTagName(name: "fecomponenttransfer"): NodeListOf<SVGFEComponentTransferElement>;
          getElementsByTagName(name: "fecomposite"): NodeListOf<SVGFECompositeElement>;
          getElementsByTagName(name: "feconvolvematrix"): NodeListOf<SVGFEConvolveMatrixElement>;
          getElementsByTagName(name: "fediffuselighting"): NodeListOf<SVGFEDiffuseLightingElement>;
          getElementsByTagName(name: "fedisplacementmap"): NodeListOf<SVGFEDisplacementMapElement>;
          getElementsByTagName(name: "fedistantlight"): NodeListOf<SVGFEDistantLightElement>;
          getElementsByTagName(name: "feflood"): NodeListOf<SVGFEFloodElement>;
          getElementsByTagName(name: "fefunca"): NodeListOf<SVGFEFuncAElement>;
          getElementsByTagName(name: "fefuncb"): NodeListOf<SVGFEFuncBElement>;
          getElementsByTagName(name: "fefuncg"): NodeListOf<SVGFEFuncGElement>;
          getElementsByTagName(name: "fefuncr"): NodeListOf<SVGFEFuncRElement>;
          getElementsByTagName(name: "fegaussianblur"): NodeListOf<SVGFEGaussianBlurElement>;
          getElementsByTagName(name: "feimage"): NodeListOf<SVGFEImageElement>;
          getElementsByTagName(name: "femerge"): NodeListOf<SVGFEMergeElement>;
          getElementsByTagName(name: "femergenode"): NodeListOf<SVGFEMergeNodeElement>;
          getElementsByTagName(name: "femorphology"): NodeListOf<SVGFEMorphologyElement>;
          getElementsByTagName(name: "feoffset"): NodeListOf<SVGFEOffsetElement>;
          getElementsByTagName(name: "fepointlight"): NodeListOf<SVGFEPointLightElement>;
          getElementsByTagName(name: "fespecularlighting"): NodeListOf<SVGFESpecularLightingElement>;
          getElementsByTagName(name: "fespotlight"): NodeListOf<SVGFESpotLightElement>;
          getElementsByTagName(name: "fetile"): NodeListOf<SVGFETileElement>;
          getElementsByTagName(name: "feturbulence"): NodeListOf<SVGFETurbulenceElement>;
          getElementsByTagName(name: "fieldset"): NodeListOf<HTMLFieldSetElement>;
          getElementsByTagName(name: "figcaption"): NodeListOf<HTMLElement>;
          getElementsByTagName(name: "figure"): NodeListOf<HTMLElement>;
          getElementsByTagName(name: "filter"): NodeListOf<SVGFilterElement>;
          getElementsByTagName(name: "font"): NodeListOf<HTMLFontElement>;
          getElementsByTagName(name: "footer"): NodeListOf<HTMLElement>;
          getElementsByTagName(name: "foreignobject"): NodeListOf<SVGForeignObjectElement>;
          getElementsByTagName(name: "form"): NodeListOf<HTMLFormElement>;
          getElementsByTagName(name: "frame"): NodeListOf<HTMLFrameElement>;
          getElementsByTagName(name: "frameset"): NodeListOf<HTMLFrameSetElement>;
          getElementsByTagName(name: "g"): NodeListOf<SVGGElement>;
          getElementsByTagName(name: "h1"): NodeListOf<HTMLHeadingElement>;
          getElementsByTagName(name: "h2"): NodeListOf<HTMLHeadingElement>;
          getElementsByTagName(name: "h3"): NodeListOf<HTMLHeadingElement>;
          getElementsByTagName(name: "h4"): NodeListOf<HTMLHeadingElement>;
          getElementsByTagName(name: "h5"): NodeListOf<HTMLHeadingElement>;
          getElementsByTagName(name: "h6"): NodeListOf<HTMLHeadingElement>;
          getElementsByTagName(name: "head"): NodeListOf<HTMLHeadElement>;
          getElementsByTagName(name: "header"): NodeListOf<HTMLElement>;
          getElementsByTagName(name: "hgroup"): NodeListOf<HTMLElement>;
          getElementsByTagName(name: "hr"): NodeListOf<HTMLHRElement>;
          getElementsByTagName(name: "html"): NodeListOf<HTMLHtmlElement>;
          getElementsByTagName(name: "i"): NodeListOf<HTMLPhraseElement>;
          getElementsByTagName(name: "iframe"): NodeListOf<HTMLIFrameElement>;
          getElementsByTagName(name: "image"): NodeListOf<SVGImageElement>;
          getElementsByTagName(name: "img"): NodeListOf<HTMLImageElement>;
          getElementsByTagName(name: "input"): NodeListOf<HTMLInputElement>;
          getElementsByTagName(name: "ins"): NodeListOf<HTMLModElement>;
          getElementsByTagName(name: "isindex"): NodeListOf<HTMLIsIndexElement>;
          getElementsByTagName(name: "kbd"): NodeListOf<HTMLPhraseElement>;
          getElementsByTagName(name: "keygen"): NodeListOf<HTMLBlockElement>;
          getElementsByTagName(name: "label"): NodeListOf<HTMLLabelElement>;
          getElementsByTagName(name: "legend"): NodeListOf<HTMLLegendElement>;
          getElementsByTagName(name: "li"): NodeListOf<HTMLLIElement>;
          getElementsByTagName(name: "line"): NodeListOf<SVGLineElement>;
          getElementsByTagName(name: "lineargradient"): NodeListOf<SVGLinearGradientElement>;
          getElementsByTagName(name: "link"): NodeListOf<HTMLLinkElement>;
          getElementsByTagName(name: "listing"): NodeListOf<HTMLBlockElement>;
          getElementsByTagName(name: "map"): NodeListOf<HTMLMapElement>;
          getElementsByTagName(name: "mark"): NodeListOf<HTMLElement>;
          getElementsByTagName(name: "marker"): NodeListOf<SVGMarkerElement>;
          getElementsByTagName(name: "marquee"): NodeListOf<HTMLMarqueeElement>;
          getElementsByTagName(name: "mask"): NodeListOf<SVGMaskElement>;
          getElementsByTagName(name: "menu"): NodeListOf<HTMLMenuElement>;
          getElementsByTagName(name: "meta"): NodeListOf<HTMLMetaElement>;
          getElementsByTagName(name: "metadata"): NodeListOf<SVGMetadataElement>;
          getElementsByTagName(name: "nav"): NodeListOf<HTMLElement>;
          getElementsByTagName(name: "nextid"): NodeListOf<HTMLNextIdElement>;
          getElementsByTagName(name: "nobr"): NodeListOf<HTMLPhraseElement>;
          getElementsByTagName(name: "noframes"): NodeListOf<HTMLElement>;
          getElementsByTagName(name: "noscript"): NodeListOf<HTMLElement>;
          getElementsByTagName(name: "object"): NodeListOf<HTMLObjectElement>;
          getElementsByTagName(name: "ol"): NodeListOf<HTMLOListElement>;
          getElementsByTagName(name: "optgroup"): NodeListOf<HTMLOptGroupElement>;
          getElementsByTagName(name: "option"): NodeListOf<HTMLOptionElement>;
          getElementsByTagName(name: "p"): NodeListOf<HTMLParagraphElement>;
          getElementsByTagName(name: "param"): NodeListOf<HTMLParamElement>;
          getElementsByTagName(name: "path"): NodeListOf<SVGPathElement>;
          getElementsByTagName(name: "pattern"): NodeListOf<SVGPatternElement>;
          getElementsByTagName(name: "plaintext"): NodeListOf<HTMLBlockElement>;
          getElementsByTagName(name: "polygon"): NodeListOf<SVGPolygonElement>;
          getElementsByTagName(name: "polyline"): NodeListOf<SVGPolylineElement>;
          getElementsByTagName(name: "pre"): NodeListOf<HTMLPreElement>;
          getElementsByTagName(name: "progress"): NodeListOf<HTMLProgressElement>;
          getElementsByTagName(name: "q"): NodeListOf<HTMLQuoteElement>;
          getElementsByTagName(name: "radialgradient"): NodeListOf<SVGRadialGradientElement>;
          getElementsByTagName(name: "rect"): NodeListOf<SVGRectElement>;
          getElementsByTagName(name: "rt"): NodeListOf<HTMLPhraseElement>;
          getElementsByTagName(name: "ruby"): NodeListOf<HTMLPhraseElement>;
          getElementsByTagName(name: "s"): NodeListOf<HTMLPhraseElement>;
          getElementsByTagName(name: "samp"): NodeListOf<HTMLPhraseElement>;
          getElementsByTagName(name: "script"): NodeListOf<HTMLScriptElement>;
          getElementsByTagName(name: "section"): NodeListOf<HTMLElement>;
          getElementsByTagName(name: "select"): NodeListOf<HTMLSelectElement>;
          getElementsByTagName(name: "small"): NodeListOf<HTMLPhraseElement>;
          getElementsByTagName(name: "source"): NodeListOf<HTMLSourceElement>;
          getElementsByTagName(name: "span"): NodeListOf<HTMLSpanElement>;
          getElementsByTagName(name: "stop"): NodeListOf<SVGStopElement>;
          getElementsByTagName(name: "strike"): NodeListOf<HTMLPhraseElement>;
          getElementsByTagName(name: "strong"): NodeListOf<HTMLPhraseElement>;
          getElementsByTagName(name: "style"): NodeListOf<HTMLStyleElement>;
          getElementsByTagName(name: "sub"): NodeListOf<HTMLPhraseElement>;
          getElementsByTagName(name: "sup"): NodeListOf<HTMLPhraseElement>;
          getElementsByTagName(name: "svg"): NodeListOf<SVGSVGElement>;
          getElementsByTagName(name: "switch"): NodeListOf<SVGSwitchElement>;
          getElementsByTagName(name: "symbol"): NodeListOf<SVGSymbolElement>;
          getElementsByTagName(name: "table"): NodeListOf<HTMLTableElement>;
          getElementsByTagName(name: "tbody"): NodeListOf<HTMLTableSectionElement>;
          getElementsByTagName(name: "td"): NodeListOf<HTMLTableDataCellElement>;
          getElementsByTagName(name: "text"): NodeListOf<SVGTextElement>;
          getElementsByTagName(name: "textpath"): NodeListOf<SVGTextPathElement>;
          getElementsByTagName(name: "textarea"): NodeListOf<HTMLTextAreaElement>;
          getElementsByTagName(name: "tfoot"): NodeListOf<HTMLTableSectionElement>;
          getElementsByTagName(name: "th"): NodeListOf<HTMLTableHeaderCellElement>;
          getElementsByTagName(name: "thead"): NodeListOf<HTMLTableSectionElement>;
          getElementsByTagName(name: "title"): NodeListOf<HTMLTitleElement>;
          getElementsByTagName(name: "tr"): NodeListOf<HTMLTableRowElement>;
          getElementsByTagName(name: "track"): NodeListOf<HTMLTrackElement>;
          getElementsByTagName(name: "tspan"): NodeListOf<SVGTSpanElement>;
          getElementsByTagName(name: "tt"): NodeListOf<HTMLPhraseElement>;
          getElementsByTagName(name: "u"): NodeListOf<HTMLPhraseElement>;
          getElementsByTagName(name: "ul"): NodeListOf<HTMLUListElement>;
          getElementsByTagName(name: "use"): NodeListOf<SVGUseElement>;
          getElementsByTagName(name: "var"): NodeListOf<HTMLPhraseElement>;
          getElementsByTagName(name: "video"): NodeListOf<HTMLVideoElement>;
          getElementsByTagName(name: "view"): NodeListOf<SVGViewElement>;
          getElementsByTagName(name: "wbr"): NodeListOf<HTMLElement>;
          getElementsByTagName(name: "x-ms-webview"): NodeListOf<MSHTMLWebViewElement>;
          getElementsByTagName(name: "xmp"): NodeListOf<HTMLBlockElement>;
          getElementsByTagName(name: string): NodeList;
          getElementsByTagNameNS(namespaceURI: string, localName: string): NodeList;
          hasAttribute(name: string): boolean;
          hasAttributeNS(namespaceURI: string, localName: string): boolean;
          msGetRegionContent(): MSRangeCollection;
          msGetUntransformedBounds(): ClientRect;
          msMatchesSelector(selectors: string): boolean;
          msReleasePointerCapture(pointerId: number): void;
          msSetPointerCapture(pointerId: number): void;
          msZoomTo(args: MsZoomToOptions): void;
          releasePointerCapture(pointerId: number): void;
          removeAttribute(name?: string): void;
          removeAttributeNS(namespaceURI: string, localName: string): void;
          removeAttributeNode(oldAttr: Attr): Attr;
          requestFullscreen(): void;
          requestPointerLock(): void;
          setAttribute(name?: string, value?: string): void;
          setAttributeNS(namespaceURI: string, qualifiedName: string, value: string): void;
          setAttributeNode(newAttr: Attr): Attr;
          setAttributeNodeNS(newAttr: Attr): Attr;
          setPointerCapture(pointerId: number): void;
          webkitMatchesSelector(selectors: string): boolean;
          webkitRequestFullScreen(): void;
          webkitRequestFullscreen(): void;
          addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureHold", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGotPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSInertiaStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSLostPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerCancel", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerDown", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerEnter", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerLeave", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerMove", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerOut", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerOver", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerUp", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "ariarequest", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "command", listener: (ev: CommandEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "gotpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "lostpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointercancel", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerdown", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerenter", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerleave", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointermove", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerout", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerover", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerup", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "touchcancel", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "touchend", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "touchmove", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "touchstart", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "webkitfullscreenchange", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "webkitfullscreenerror", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var Element: {
          prototype: Element;
          new(): Element;
      }
      
      interface ErrorEvent extends Event {
          colno: number;
          error: any;
          filename: string;
          lineno: number;
          message: string;
          initErrorEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, messageArg: string, filenameArg: string, linenoArg: number): void;
      }
      
      declare var ErrorEvent: {
          prototype: ErrorEvent;
          new(): ErrorEvent;
      }
      
      interface Event {
          bubbles: boolean;
          cancelBubble: boolean;
          cancelable: boolean;
          currentTarget: EventTarget;
          defaultPrevented: boolean;
          eventPhase: number;
          isTrusted: boolean;
          returnValue: boolean;
          srcElement: Element;
          target: EventTarget;
          timeStamp: number;
          type: string;
          initEvent(eventTypeArg: string, canBubbleArg: boolean, cancelableArg: boolean): void;
          preventDefault(): void;
          stopImmediatePropagation(): void;
          stopPropagation(): void;
          AT_TARGET: number;
          BUBBLING_PHASE: number;
          CAPTURING_PHASE: number;
      }
      
      declare var Event: {
          prototype: Event;
          new(type: string, eventInitDict?: EventInit): Event;
          AT_TARGET: number;
          BUBBLING_PHASE: number;
          CAPTURING_PHASE: number;
      }
      
      interface EventTarget {
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
          dispatchEvent(evt: Event): boolean;
          removeEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var EventTarget: {
          prototype: EventTarget;
          new(): EventTarget;
      }
      
      interface External {
      }
      
      declare var External: {
          prototype: External;
          new(): External;
      }
      
      interface File extends Blob {
          lastModifiedDate: any;
          name: string;
      }
      
      declare var File: {
          prototype: File;
          new(): File;
      }
      
      interface FileList {
          length: number;
          item(index: number): File;
          [index: number]: File;
      }
      
      declare var FileList: {
          prototype: FileList;
          new(): FileList;
      }
      
      interface FileReader extends EventTarget, MSBaseReader {
          error: DOMError;
          readAsArrayBuffer(blob: Blob): void;
          readAsBinaryString(blob: Blob): void;
          readAsDataURL(blob: Blob): void;
          readAsText(blob: Blob, encoding?: string): void;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var FileReader: {
          prototype: FileReader;
          new(): FileReader;
      }
      
      interface FocusEvent extends UIEvent {
          relatedTarget: EventTarget;
          initFocusEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, relatedTargetArg: EventTarget): void;
      }
      
      declare var FocusEvent: {
          prototype: FocusEvent;
          new(typeArg: string, eventInitDict?: FocusEventInit): FocusEvent;
      }
      
      interface FormData {
          append(name: any, value: any, blobName?: string): void;
      }
      
      declare var FormData: {
          prototype: FormData;
          new(): FormData;
      }
      
      interface GainNode extends AudioNode {
          gain: AudioParam;
      }
      
      declare var GainNode: {
          prototype: GainNode;
          new(): GainNode;
      }
      
      interface Gamepad {
          axes: number[];
          buttons: GamepadButton[];
          connected: boolean;
          id: string;
          index: number;
          mapping: string;
          timestamp: number;
      }
      
      declare var Gamepad: {
          prototype: Gamepad;
          new(): Gamepad;
      }
      
      interface GamepadButton {
          pressed: boolean;
          value: number;
      }
      
      declare var GamepadButton: {
          prototype: GamepadButton;
          new(): GamepadButton;
      }
      
      interface GamepadEvent extends Event {
          gamepad: Gamepad;
      }
      
      declare var GamepadEvent: {
          prototype: GamepadEvent;
          new(): GamepadEvent;
      }
      
      interface Geolocation {
          clearWatch(watchId: number): void;
          getCurrentPosition(successCallback: PositionCallback, errorCallback?: PositionErrorCallback, options?: PositionOptions): void;
          watchPosition(successCallback: PositionCallback, errorCallback?: PositionErrorCallback, options?: PositionOptions): number;
      }
      
      declare var Geolocation: {
          prototype: Geolocation;
          new(): Geolocation;
      }
      
      interface HTMLAllCollection extends HTMLCollection {
          namedItem(name: string): Element;
      }
      
      declare var HTMLAllCollection: {
          prototype: HTMLAllCollection;
          new(): HTMLAllCollection;
      }
      
      interface HTMLAnchorElement extends HTMLElement {
          Methods: string;
          /**
            * Sets or retrieves the character set used to encode the object.
            */
          charset: string;
          /**
            * Sets or retrieves the coordinates of the object.
            */
          coords: string;
          /**
            * Contains the anchor portion of the URL including the hash sign (#).
            */
          hash: string;
          /**
            * Contains the hostname and port values of the URL.
            */
          host: string;
          /**
            * Contains the hostname of a URL.
            */
          hostname: string;
          /**
            * Sets or retrieves a destination URL or an anchor point.
            */
          href: string;
          /**
            * Sets or retrieves the language code of the object.
            */
          hreflang: string;
          mimeType: string;
          /**
            * Sets or retrieves the shape of the object.
            */
          name: string;
          nameProp: string;
          /**
            * Contains the pathname of the URL.
            */
          pathname: string;
          /**
            * Sets or retrieves the port number associated with a URL.
            */
          port: string;
          /**
            * Contains the protocol of the URL.
            */
          protocol: string;
          protocolLong: string;
          /**
            * Sets or retrieves the relationship between the object and the destination of the link.
            */
          rel: string;
          /**
            * Sets or retrieves the relationship between the object and the destination of the link.
            */
          rev: string;
          /**
            * Sets or retrieves the substring of the href property that follows the question mark.
            */
          search: string;
          /**
            * Sets or retrieves the shape of the object.
            */
          shape: string;
          /**
            * Sets or retrieves the window or frame at which to target content.
            */
          target: string;
          /**
            * Retrieves or sets the text of the object as a string. 
            */
          text: string;
          type: string;
          urn: string;
          /** 
            * Returns a string representation of an object.
            */
          toString(): string;
      }
      
      declare var HTMLAnchorElement: {
          prototype: HTMLAnchorElement;
          new(): HTMLAnchorElement;
      }
      
      interface HTMLAppletElement extends HTMLElement {
          /**
            * Retrieves a string of the URL where the object tag can be found. This is often the href of the document that the object is in, or the value set by a base element.
            */
          BaseHref: string;
          align: string;
          /**
            * Sets or retrieves a text alternative to the graphic.
            */
          alt: string;
          /**
            * Gets or sets the optional alternative HTML script to execute if the object fails to load.
            */
          altHtml: string;
          /**
            * Sets or retrieves a character string that can be used to implement your own archive functionality for the object.
            */
          archive: string;
          border: string;
          code: string;
          /**
            * Sets or retrieves the URL of the component.
            */
          codeBase: string;
          /**
            * Sets or retrieves the Internet media type for the code associated with the object.
            */
          codeType: string;
          /**
            * Address of a pointer to the document this page or frame contains. If there is no document, then null will be returned.
            */
          contentDocument: Document;
          /**
            * Sets or retrieves the URL that references the data of the object.
            */
          data: string;
          /**
            * Sets or retrieves a character string that can be used to implement your own declare functionality for the object.
            */
          declare: boolean;
          form: HTMLFormElement;
          /**
            * Sets or retrieves the height of the object.
            */
          height: string;
          hspace: number;
          /**
            * Sets or retrieves the shape of the object.
            */
          name: string;
          object: string;
          /**
            * Sets or retrieves a message to be displayed while an object is loading.
            */
          standby: string;
          /**
            * Returns the content type of the object.
            */
          type: string;
          /**
            * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.
            */
          useMap: string;
          vspace: number;
          width: number;
      }
      
      declare var HTMLAppletElement: {
          prototype: HTMLAppletElement;
          new(): HTMLAppletElement;
      }
      
      interface HTMLAreaElement extends HTMLElement {
          /**
            * Sets or retrieves a text alternative to the graphic.
            */
          alt: string;
          /**
            * Sets or retrieves the coordinates of the object.
            */
          coords: string;
          /**
            * Sets or retrieves the subsection of the href property that follows the number sign (#).
            */
          hash: string;
          /**
            * Sets or retrieves the hostname and port number of the location or URL.
            */
          host: string;
          /**
            * Sets or retrieves the host name part of the location or URL. 
            */
          hostname: string;
          /**
            * Sets or retrieves a destination URL or an anchor point.
            */
          href: string;
          /**
            * Sets or gets whether clicks in this region cause action.
            */
          noHref: boolean;
          /**
            * Sets or retrieves the file name or path specified by the object.
            */
          pathname: string;
          /**
            * Sets or retrieves the port number associated with a URL.
            */
          port: string;
          /**
            * Sets or retrieves the protocol portion of a URL.
            */
          protocol: string;
          rel: string;
          /**
            * Sets or retrieves the substring of the href property that follows the question mark.
            */
          search: string;
          /**
            * Sets or retrieves the shape of the object.
            */
          shape: string;
          /**
            * Sets or retrieves the window or frame at which to target content.
            */
          target: string;
          /** 
            * Returns a string representation of an object.
            */
          toString(): string;
      }
      
      declare var HTMLAreaElement: {
          prototype: HTMLAreaElement;
          new(): HTMLAreaElement;
      }
      
      interface HTMLAreasCollection extends HTMLCollection {
          /**
            * Adds an element to the areas, controlRange, or options collection.
            */
          add(element: HTMLElement, before?: HTMLElement): void;
          add(element: HTMLElement, before?: number): void;
          /**
            * Removes an element from the collection.
            */
          remove(index?: number): void;
      }
      
      declare var HTMLAreasCollection: {
          prototype: HTMLAreasCollection;
          new(): HTMLAreasCollection;
      }
      
      interface HTMLAudioElement extends HTMLMediaElement {
      }
      
      declare var HTMLAudioElement: {
          prototype: HTMLAudioElement;
          new(): HTMLAudioElement;
      }
      
      interface HTMLBRElement extends HTMLElement {
          /**
            * Sets or retrieves the side on which floating objects are not to be positioned when any IHTMLBlockElement is inserted into the document.
            */
          clear: string;
      }
      
      declare var HTMLBRElement: {
          prototype: HTMLBRElement;
          new(): HTMLBRElement;
      }
      
      interface HTMLBaseElement extends HTMLElement {
          /**
            * Gets or sets the baseline URL on which relative links are based.
            */
          href: string;
          /**
            * Sets or retrieves the window or frame at which to target content.
            */
          target: string;
      }
      
      declare var HTMLBaseElement: {
          prototype: HTMLBaseElement;
          new(): HTMLBaseElement;
      }
      
      interface HTMLBaseFontElement extends HTMLElement, DOML2DeprecatedColorProperty {
          /**
            * Sets or retrieves the current typeface family.
            */
          face: string;
          /**
            * Sets or retrieves the font size of the object.
            */
          size: number;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var HTMLBaseFontElement: {
          prototype: HTMLBaseFontElement;
          new(): HTMLBaseFontElement;
      }
      
      interface HTMLBlockElement extends HTMLElement {
          /**
            * Sets or retrieves reference information about the object.
            */
          cite: string;
          clear: string;
          /**
            * Sets or retrieves the width of the object.
            */
          width: number;
      }
      
      declare var HTMLBlockElement: {
          prototype: HTMLBlockElement;
          new(): HTMLBlockElement;
      }
      
      interface HTMLBodyElement extends HTMLElement {
          aLink: any;
          background: string;
          bgColor: any;
          bgProperties: string;
          link: any;
          noWrap: boolean;
          onafterprint: (ev: Event) => any;
          onbeforeprint: (ev: Event) => any;
          onbeforeunload: (ev: BeforeUnloadEvent) => any;
          onblur: (ev: FocusEvent) => any;
          onerror: (ev: Event) => any;
          onfocus: (ev: FocusEvent) => any;
          onhashchange: (ev: HashChangeEvent) => any;
          onload: (ev: Event) => any;
          onmessage: (ev: MessageEvent) => any;
          onoffline: (ev: Event) => any;
          ononline: (ev: Event) => any;
          onorientationchange: (ev: Event) => any;
          onpagehide: (ev: PageTransitionEvent) => any;
          onpageshow: (ev: PageTransitionEvent) => any;
          onpopstate: (ev: PopStateEvent) => any;
          onresize: (ev: UIEvent) => any;
          onstorage: (ev: StorageEvent) => any;
          onunload: (ev: Event) => any;
          text: any;
          vLink: any;
          createTextRange(): TextRange;
          addEventListener(type: "MSContentZoom", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureHold", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGotPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSInertiaStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSLostPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSManipulationStateChanged", listener: (ev: MSManipulationEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerCancel", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerDown", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerEnter", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerLeave", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerMove", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerOut", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerOver", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerUp", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "activate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "afterprint", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "ariarequest", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "beforeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "beforecopy", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "beforecut", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "beforedeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "beforepaste", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "beforeprint", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "beforeunload", listener: (ev: BeforeUnloadEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "blur", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "blur", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "canplay", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "canplaythrough", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "change", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "click", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "command", listener: (ev: CommandEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "contextmenu", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "copy", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "cuechange", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "cut", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "dblclick", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "deactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "drag", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "dragend", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "dragenter", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "dragleave", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "dragover", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "dragstart", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "drop", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "durationchange", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "emptied", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "ended", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "focus", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "focus", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "gotpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "hashchange", listener: (ev: HashChangeEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "input", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "keydown", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "keypress", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "keyup", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "loadeddata", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "loadedmetadata", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "lostpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "message", listener: (ev: MessageEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mousedown", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mouseenter", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mouseleave", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mousemove", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mouseout", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mouseover", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mouseup", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mousewheel", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "offline", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "online", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "orientationchange", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "pagehide", listener: (ev: PageTransitionEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pageshow", listener: (ev: PageTransitionEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "paste", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "play", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "playing", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "pointercancel", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerdown", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerenter", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerleave", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointermove", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerout", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerover", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerup", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "popstate", listener: (ev: PopStateEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "ratechange", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "reset", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "resize", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "scroll", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "seeked", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "seeking", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "select", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "selectstart", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "stalled", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "storage", listener: (ev: StorageEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "submit", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "suspend", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "timeupdate", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "touchcancel", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "touchend", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "touchmove", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "touchstart", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "unload", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "volumechange", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "waiting", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "webkitfullscreenchange", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "webkitfullscreenerror", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var HTMLBodyElement: {
          prototype: HTMLBodyElement;
          new(): HTMLBodyElement;
      }
      
      interface HTMLButtonElement extends HTMLElement {
          /**
            * Provides a way to direct a user to a specific field when a document loads. This can provide both direction and convenience for a user, reducing the need to click or tab to a field when a page opens. This attribute is true when present on an element, and false when missing.
            */
          autofocus: boolean;
          disabled: boolean;
          /**
            * Retrieves a reference to the form that the object is embedded in.
            */
          form: HTMLFormElement;
          /**
            * Overrides the action attribute (where the data on a form is sent) on the parent form element.
            */
          formAction: string;
          /**
            * Used to override the encoding (formEnctype attribute) specified on the form element.
            */
          formEnctype: string;
          /**
            * Overrides the submit method attribute previously specified on a form element.
            */
          formMethod: string;
          /**
            * Overrides any validation or required attributes on a form or form elements to allow it to be submitted without validation. This can be used to create a "save draft"-type submit option.
            */
          formNoValidate: string;
          /**
            * Overrides the target attribute on a form element.
            */
          formTarget: string;
          /** 
            * Sets or retrieves the name of the object.
            */
          name: string;
          status: any;
          /**
            * Gets the classification and default behavior of the button.
            */
          type: string;
          /**
            * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
            */
          validationMessage: string;
          /**
            * Returns a  ValidityState object that represents the validity states of an element.
            */
          validity: ValidityState;
          /** 
            * Sets or retrieves the default or selected value of the control.
            */
          value: string;
          /**
            * Returns whether an element will successfully validate based on forms validation rules and constraints.
            */
          willValidate: boolean;
          /**
            * Returns whether a form will validate when it is submitted, without having to submit it.
            */
          checkValidity(): boolean;
          /**
            * Creates a TextRange object for the element.
            */
          createTextRange(): TextRange;
          /**
            * Sets a custom error message that is displayed when a form is submitted.
            * @param error Sets a custom error message that is displayed when a form is submitted.
            */
          setCustomValidity(error: string): void;
      }
      
      declare var HTMLButtonElement: {
          prototype: HTMLButtonElement;
          new(): HTMLButtonElement;
      }
      
      interface HTMLCanvasElement extends HTMLElement {
          /**
            * Gets or sets the height of a canvas element on a document.
            */
          height: number;
          /**
            * Gets or sets the width of a canvas element on a document.
            */
          width: number;
          /**
            * Returns an object that provides methods and properties for drawing and manipulating images and graphics on a canvas element in a document. A context object includes information about colors, line widths, fonts, and other graphic parameters that can be drawn on a canvas.
            * @param contextId The identifier (ID) of the type of canvas to create. Internet Explorer 9 and Internet Explorer 10 support only a 2-D context using canvas.getContext("2d"); IE11 Preview also supports 3-D or WebGL context using canvas.getContext("experimental-webgl");
            */
          getContext(contextId: "2d"): CanvasRenderingContext2D;
          getContext(contextId: "experimental-webgl"): WebGLRenderingContext;
          getContext(contextId: string, ...args: any[]): CanvasRenderingContext2D | WebGLRenderingContext;
          /**
            * Returns a blob object encoded as a Portable Network Graphics (PNG) format from a canvas image or drawing.
            */
          msToBlob(): Blob;
          /**
            * Returns the content of the current canvas as an image that you can use as a source for another canvas or an HTML element.
            * @param type The standard MIME type for the image format to return. If you do not specify this parameter, the default value is a PNG format image.
            */
          toDataURL(type?: string, ...args: any[]): string;
      }
      
      declare var HTMLCanvasElement: {
          prototype: HTMLCanvasElement;
          new(): HTMLCanvasElement;
      }
      
      interface HTMLCollection {
          /**
            * Sets or retrieves the number of objects in a collection.
            */
          length: number;
          /**
            * Retrieves an object from various collections.
            */
          item(nameOrIndex?: any, optionalIndex?: any): Element;
          /**
            * Retrieves a select object or an object from an options collection.
            */
          namedItem(name: string): Element;
          [index: number]: Element;
      }
      
      declare var HTMLCollection: {
          prototype: HTMLCollection;
          new(): HTMLCollection;
      }
      
      interface HTMLDDElement extends HTMLElement {
          /**
            * Sets or retrieves whether the browser automatically performs wordwrap.
            */
          noWrap: boolean;
      }
      
      declare var HTMLDDElement: {
          prototype: HTMLDDElement;
          new(): HTMLDDElement;
      }
      
      interface HTMLDListElement extends HTMLElement {
          compact: boolean;
      }
      
      declare var HTMLDListElement: {
          prototype: HTMLDListElement;
          new(): HTMLDListElement;
      }
      
      interface HTMLDTElement extends HTMLElement {
          /**
            * Sets or retrieves whether the browser automatically performs wordwrap.
            */
          noWrap: boolean;
      }
      
      declare var HTMLDTElement: {
          prototype: HTMLDTElement;
          new(): HTMLDTElement;
      }
      
      interface HTMLDataListElement extends HTMLElement {
          options: HTMLCollection;
      }
      
      declare var HTMLDataListElement: {
          prototype: HTMLDataListElement;
          new(): HTMLDataListElement;
      }
      
      interface HTMLDirectoryElement extends HTMLElement {
          compact: boolean;
      }
      
      declare var HTMLDirectoryElement: {
          prototype: HTMLDirectoryElement;
          new(): HTMLDirectoryElement;
      }
      
      interface HTMLDivElement extends HTMLElement {
          /**
            * Sets or retrieves how the object is aligned with adjacent text. 
            */
          align: string;
          /**
            * Sets or retrieves whether the browser automatically performs wordwrap.
            */
          noWrap: boolean;
      }
      
      declare var HTMLDivElement: {
          prototype: HTMLDivElement;
          new(): HTMLDivElement;
      }
      
      interface HTMLDocument extends Document {
      }
      
      declare var HTMLDocument: {
          prototype: HTMLDocument;
          new(): HTMLDocument;
      }
      
      interface HTMLElement extends Element {
          accessKey: string;
          children: HTMLCollection;
          className: string;
          contentEditable: string;
          dataset: DOMStringMap;
          dir: string;
          draggable: boolean;
          hidden: boolean;
          hideFocus: boolean;
          id: string;
          innerHTML: string;
          innerText: string;
          isContentEditable: boolean;
          lang: string;
          offsetHeight: number;
          offsetLeft: number;
          offsetParent: Element;
          offsetTop: number;
          offsetWidth: number;
          onabort: (ev: Event) => any;
          onactivate: (ev: UIEvent) => any;
          onbeforeactivate: (ev: UIEvent) => any;
          onbeforecopy: (ev: DragEvent) => any;
          onbeforecut: (ev: DragEvent) => any;
          onbeforedeactivate: (ev: UIEvent) => any;
          onbeforepaste: (ev: DragEvent) => any;
          onblur: (ev: FocusEvent) => any;
          oncanplay: (ev: Event) => any;
          oncanplaythrough: (ev: Event) => any;
          onchange: (ev: Event) => any;
          onclick: (ev: MouseEvent) => any;
          oncontextmenu: (ev: PointerEvent) => any;
          oncopy: (ev: DragEvent) => any;
          oncuechange: (ev: Event) => any;
          oncut: (ev: DragEvent) => any;
          ondblclick: (ev: MouseEvent) => any;
          ondeactivate: (ev: UIEvent) => any;
          ondrag: (ev: DragEvent) => any;
          ondragend: (ev: DragEvent) => any;
          ondragenter: (ev: DragEvent) => any;
          ondragleave: (ev: DragEvent) => any;
          ondragover: (ev: DragEvent) => any;
          ondragstart: (ev: DragEvent) => any;
          ondrop: (ev: DragEvent) => any;
          ondurationchange: (ev: Event) => any;
          onemptied: (ev: Event) => any;
          onended: (ev: Event) => any;
          onerror: (ev: Event) => any;
          onfocus: (ev: FocusEvent) => any;
          oninput: (ev: Event) => any;
          onkeydown: (ev: KeyboardEvent) => any;
          onkeypress: (ev: KeyboardEvent) => any;
          onkeyup: (ev: KeyboardEvent) => any;
          onload: (ev: Event) => any;
          onloadeddata: (ev: Event) => any;
          onloadedmetadata: (ev: Event) => any;
          onloadstart: (ev: Event) => any;
          onmousedown: (ev: MouseEvent) => any;
          onmouseenter: (ev: MouseEvent) => any;
          onmouseleave: (ev: MouseEvent) => any;
          onmousemove: (ev: MouseEvent) => any;
          onmouseout: (ev: MouseEvent) => any;
          onmouseover: (ev: MouseEvent) => any;
          onmouseup: (ev: MouseEvent) => any;
          onmousewheel: (ev: MouseWheelEvent) => any;
          onmscontentzoom: (ev: UIEvent) => any;
          onmsmanipulationstatechanged: (ev: MSManipulationEvent) => any;
          onpaste: (ev: DragEvent) => any;
          onpause: (ev: Event) => any;
          onplay: (ev: Event) => any;
          onplaying: (ev: Event) => any;
          onprogress: (ev: ProgressEvent) => any;
          onratechange: (ev: Event) => any;
          onreset: (ev: Event) => any;
          onscroll: (ev: UIEvent) => any;
          onseeked: (ev: Event) => any;
          onseeking: (ev: Event) => any;
          onselect: (ev: UIEvent) => any;
          onselectstart: (ev: Event) => any;
          onstalled: (ev: Event) => any;
          onsubmit: (ev: Event) => any;
          onsuspend: (ev: Event) => any;
          ontimeupdate: (ev: Event) => any;
          onvolumechange: (ev: Event) => any;
          onwaiting: (ev: Event) => any;
          outerHTML: string;
          outerText: string;
          spellcheck: boolean;
          style: CSSStyleDeclaration;
          tabIndex: number;
          title: string;
          blur(): void;
          click(): void;
          contains(child: HTMLElement): boolean;
          dragDrop(): boolean;
          focus(): void;
          getElementsByClassName(classNames: string): NodeList;
          insertAdjacentElement(position: string, insertedElement: Element): Element;
          insertAdjacentHTML(where: string, html: string): void;
          insertAdjacentText(where: string, text: string): void;
          msGetInputContext(): MSInputMethodContext;
          scrollIntoView(top?: boolean): void;
          setActive(): void;
          addEventListener(type: "MSContentZoom", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureHold", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGotPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSInertiaStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSLostPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSManipulationStateChanged", listener: (ev: MSManipulationEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerCancel", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerDown", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerEnter", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerLeave", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerMove", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerOut", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerOver", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerUp", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "activate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "ariarequest", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "beforeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "beforecopy", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "beforecut", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "beforedeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "beforepaste", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "blur", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "canplay", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "canplaythrough", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "change", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "click", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "command", listener: (ev: CommandEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "contextmenu", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "copy", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "cuechange", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "cut", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "dblclick", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "deactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "drag", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "dragend", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "dragenter", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "dragleave", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "dragover", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "dragstart", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "drop", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "durationchange", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "emptied", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "ended", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "focus", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "gotpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "input", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "keydown", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "keypress", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "keyup", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "loadeddata", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "loadedmetadata", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "lostpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mousedown", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mouseenter", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mouseleave", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mousemove", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mouseout", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mouseover", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mouseup", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mousewheel", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "paste", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "play", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "playing", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "pointercancel", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerdown", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerenter", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerleave", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointermove", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerout", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerover", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerup", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "ratechange", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "reset", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "scroll", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "seeked", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "seeking", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "select", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "selectstart", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "stalled", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "submit", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "suspend", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "timeupdate", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "touchcancel", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "touchend", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "touchmove", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "touchstart", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "volumechange", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "waiting", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "webkitfullscreenchange", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "webkitfullscreenerror", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var HTMLElement: {
          prototype: HTMLElement;
          new(): HTMLElement;
      }
      
      interface HTMLEmbedElement extends HTMLElement, GetSVGDocument {
          /**
            * Sets or retrieves the height of the object.
            */
          height: string;
          hidden: any;
          /**
            * Gets or sets whether the DLNA PlayTo device is available.
            */
          msPlayToDisabled: boolean;
          /**
            * Gets or sets the path to the preferred media source. This enables the Play To target device to stream the media content, which can be DRM protected, from a different location, such as a cloud media server.
            */
          msPlayToPreferredSourceUri: string;
          /**
            * Gets or sets the primary DLNA PlayTo device.
            */
          msPlayToPrimary: boolean;
          /**
            * Gets the source associated with the media element for use by the PlayToManager.
            */
          msPlayToSource: any;
          /**
            * Sets or retrieves the name of the object.
            */
          name: string;
          /**
            * Retrieves the palette used for the embedded document.
            */
          palette: string;
          /**
            * Retrieves the URL of the plug-in used to view an embedded document.
            */
          pluginspage: string;
          readyState: string;
          /**
            * Sets or retrieves a URL to be loaded by the object.
            */
          src: string;
          /**
            * Sets or retrieves the height and width units of the embed object.
            */
          units: string;
          /**
            * Sets or retrieves the width of the object.
            */
          width: string;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var HTMLEmbedElement: {
          prototype: HTMLEmbedElement;
          new(): HTMLEmbedElement;
      }
      
      interface HTMLFieldSetElement extends HTMLElement {
          /**
            * Sets or retrieves how the object is aligned with adjacent text.
            */
          align: string;
          disabled: boolean;
          /**
            * Retrieves a reference to the form that the object is embedded in.
            */
          form: HTMLFormElement;
          /**
            * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
            */
          validationMessage: string;
          /**
            * Returns a  ValidityState object that represents the validity states of an element.
            */
          validity: ValidityState;
          /**
            * Returns whether an element will successfully validate based on forms validation rules and constraints.
            */
          willValidate: boolean;
          /**
            * Returns whether a form will validate when it is submitted, without having to submit it.
            */
          checkValidity(): boolean;
          /**
            * Sets a custom error message that is displayed when a form is submitted.
            * @param error Sets a custom error message that is displayed when a form is submitted.
            */
          setCustomValidity(error: string): void;
      }
      
      declare var HTMLFieldSetElement: {
          prototype: HTMLFieldSetElement;
          new(): HTMLFieldSetElement;
      }
      
      interface HTMLFontElement extends HTMLElement, DOML2DeprecatedColorProperty, DOML2DeprecatedSizeProperty {
          /**
            * Sets or retrieves the current typeface family.
            */
          face: string;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var HTMLFontElement: {
          prototype: HTMLFontElement;
          new(): HTMLFontElement;
      }
      
      interface HTMLFormElement extends HTMLElement {
          /**
            * Sets or retrieves a list of character encodings for input data that must be accepted by the server processing the form.
            */
          acceptCharset: string;
          /**
            * Sets or retrieves the URL to which the form content is sent for processing.
            */
          action: string;
          /**
            * Specifies whether autocomplete is applied to an editable text field.
            */
          autocomplete: string;
          /**
            * Retrieves a collection, in source order, of all controls in a given form.
            */
          elements: HTMLCollection;
          /**
            * Sets or retrieves the MIME encoding for the form.
            */
          encoding: string;
          /**
            * Sets or retrieves the encoding type for the form.
            */
          enctype: string;
          /**
            * Sets or retrieves the number of objects in a collection.
            */
          length: number;
          /**
            * Sets or retrieves how to send the form data to the server.
            */
          method: string;
          /**
            * Sets or retrieves the name of the object.
            */
          name: string;
          /**
            * Designates a form that is not validated when submitted.
            */
          noValidate: boolean;
          /**
            * Sets or retrieves the window or frame at which to target content.
            */
          target: string;
          /**
            * Returns whether a form will validate when it is submitted, without having to submit it.
            */
          checkValidity(): boolean;
          /**
            * Retrieves a form object or an object from an elements collection.
            * @param name Variant of type Number or String that specifies the object or collection to retrieve. If this parameter is a Number, it is the zero-based index of the object. If this parameter is a string, all objects with matching name or id properties are retrieved, and a collection is returned if more than one match is made.
            * @param index Variant of type Number that specifies the zero-based index of the object to retrieve when a collection is returned.
            */
          item(name?: any, index?: any): any;
          /**
            * Retrieves a form object or an object from an elements collection.
            */
          namedItem(name: string): any;
          /**
            * Fires when the user resets a form.
            */
          reset(): void;
          /**
            * Fires when a FORM is about to be submitted.
            */
          submit(): void;
          [name: string]: any;
      }
      
      declare var HTMLFormElement: {
          prototype: HTMLFormElement;
          new(): HTMLFormElement;
      }
      
      interface HTMLFrameElement extends HTMLElement, GetSVGDocument {
          /**
            * Specifies the properties of a border drawn around an object.
            */
          border: string;
          /**
            * Sets or retrieves the border color of the object.
            */
          borderColor: any;
          /**
            * Retrieves the document object of the page or frame.
            */
          contentDocument: Document;
          /**
            * Retrieves the object of the specified.
            */
          contentWindow: Window;
          /**
            * Sets or retrieves whether to display a border for the frame.
            */
          frameBorder: string;
          /**
            * Sets or retrieves the amount of additional space between the frames.
            */
          frameSpacing: any;
          /**
            * Sets or retrieves the height of the object.
            */
          height: string | number;
          /**
            * Sets or retrieves a URI to a long description of the object.
            */
          longDesc: string;
          /**
            * Sets or retrieves the top and bottom margin heights before displaying the text in a frame.
            */
          marginHeight: string;
          /**
            * Sets or retrieves the left and right margin widths before displaying the text in a frame.
            */
          marginWidth: string;
          /**
            * Sets or retrieves the frame name.
            */
          name: string;
          /**
            * Sets or retrieves whether the user can resize the frame.
            */
          noResize: boolean;
          /**
            * Raised when the object has been completely received from the server.
            */
          onload: (ev: Event) => any;
          /**
            * Sets or retrieves whether the frame can be scrolled.
            */
          scrolling: string;
          /**
            * Sets the value indicating whether the source file of a frame or iframe has specific security restrictions applied.
            */
          security: any;
          /**
            * Sets or retrieves a URL to be loaded by the object.
            */
          src: string;
          /**
            * Sets or retrieves the width of the object.
            */
          width: string | number;
          addEventListener(type: "MSContentZoom", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureHold", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGotPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSInertiaStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSLostPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSManipulationStateChanged", listener: (ev: MSManipulationEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerCancel", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerDown", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerEnter", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerLeave", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerMove", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerOut", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerOver", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerUp", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "activate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "ariarequest", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "beforeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "beforecopy", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "beforecut", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "beforedeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "beforepaste", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "blur", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "canplay", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "canplaythrough", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "change", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "click", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "command", listener: (ev: CommandEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "contextmenu", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "copy", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "cuechange", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "cut", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "dblclick", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "deactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "drag", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "dragend", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "dragenter", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "dragleave", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "dragover", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "dragstart", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "drop", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "durationchange", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "emptied", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "ended", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "focus", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "gotpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "input", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "keydown", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "keypress", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "keyup", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "loadeddata", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "loadedmetadata", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "lostpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mousedown", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mouseenter", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mouseleave", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mousemove", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mouseout", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mouseover", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mouseup", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mousewheel", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "paste", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "play", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "playing", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "pointercancel", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerdown", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerenter", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerleave", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointermove", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerout", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerover", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerup", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "ratechange", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "reset", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "scroll", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "seeked", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "seeking", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "select", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "selectstart", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "stalled", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "submit", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "suspend", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "timeupdate", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "touchcancel", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "touchend", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "touchmove", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "touchstart", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "volumechange", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "waiting", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "webkitfullscreenchange", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "webkitfullscreenerror", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var HTMLFrameElement: {
          prototype: HTMLFrameElement;
          new(): HTMLFrameElement;
      }
      
      interface HTMLFrameSetElement extends HTMLElement {
          border: string;
          /**
            * Sets or retrieves the border color of the object.
            */
          borderColor: any;
          /**
            * Sets or retrieves the frame widths of the object.
            */
          cols: string;
          /**
            * Sets or retrieves whether to display a border for the frame.
            */
          frameBorder: string;
          /**
            * Sets or retrieves the amount of additional space between the frames.
            */
          frameSpacing: any;
          name: string;
          onafterprint: (ev: Event) => any;
          onbeforeprint: (ev: Event) => any;
          onbeforeunload: (ev: BeforeUnloadEvent) => any;
          /**
            * Fires when the object loses the input focus.
            */
          onblur: (ev: FocusEvent) => any;
          onerror: (ev: Event) => any;
          /**
            * Fires when the object receives focus.
            */
          onfocus: (ev: FocusEvent) => any;
          onhashchange: (ev: HashChangeEvent) => any;
          onload: (ev: Event) => any;
          onmessage: (ev: MessageEvent) => any;
          onoffline: (ev: Event) => any;
          ononline: (ev: Event) => any;
          onorientationchange: (ev: Event) => any;
          onpagehide: (ev: PageTransitionEvent) => any;
          onpageshow: (ev: PageTransitionEvent) => any;
          onresize: (ev: UIEvent) => any;
          onstorage: (ev: StorageEvent) => any;
          onunload: (ev: Event) => any;
          /**
            * Sets or retrieves the frame heights of the object.
            */
          rows: string;
          addEventListener(type: "MSContentZoom", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureHold", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGotPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSInertiaStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSLostPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSManipulationStateChanged", listener: (ev: MSManipulationEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerCancel", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerDown", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerEnter", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerLeave", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerMove", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerOut", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerOver", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerUp", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "activate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "ariarequest", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "beforeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "beforecopy", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "beforecut", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "beforedeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "beforepaste", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "beforeprint", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "beforeunload", listener: (ev: BeforeUnloadEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "blur", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "blur", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "canplay", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "canplaythrough", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "change", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "click", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "command", listener: (ev: CommandEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "contextmenu", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "copy", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "cuechange", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "cut", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "dblclick", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "deactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "drag", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "dragend", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "dragenter", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "dragleave", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "dragover", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "dragstart", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "drop", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "durationchange", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "emptied", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "ended", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "focus", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "focus", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "gotpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "hashchange", listener: (ev: HashChangeEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "input", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "keydown", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "keypress", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "keyup", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "loadeddata", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "loadedmetadata", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "lostpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "message", listener: (ev: MessageEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mousedown", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mouseenter", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mouseleave", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mousemove", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mouseout", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mouseover", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mouseup", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mousewheel", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "offline", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "online", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "orientationchange", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "pagehide", listener: (ev: PageTransitionEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pageshow", listener: (ev: PageTransitionEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "paste", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "play", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "playing", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "pointercancel", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerdown", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerenter", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerleave", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointermove", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerout", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerover", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerup", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "ratechange", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "reset", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "resize", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "scroll", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "seeked", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "seeking", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "select", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "selectstart", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "stalled", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "storage", listener: (ev: StorageEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "submit", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "suspend", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "timeupdate", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "touchcancel", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "touchend", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "touchmove", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "touchstart", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "unload", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "volumechange", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "waiting", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "webkitfullscreenchange", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "webkitfullscreenerror", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var HTMLFrameSetElement: {
          prototype: HTMLFrameSetElement;
          new(): HTMLFrameSetElement;
      }
      
      interface HTMLHRElement extends HTMLElement, DOML2DeprecatedColorProperty, DOML2DeprecatedSizeProperty {
          /**
            * Sets or retrieves how the object is aligned with adjacent text.
            */
          align: string;
          /**
            * Sets or retrieves whether the horizontal rule is drawn with 3-D shading.
            */
          noShade: boolean;
          /**
            * Sets or retrieves the width of the object.
            */
          width: number;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var HTMLHRElement: {
          prototype: HTMLHRElement;
          new(): HTMLHRElement;
      }
      
      interface HTMLHeadElement extends HTMLElement {
          profile: string;
      }
      
      declare var HTMLHeadElement: {
          prototype: HTMLHeadElement;
          new(): HTMLHeadElement;
      }
      
      interface HTMLHeadingElement extends HTMLElement {
          /**
            * Sets or retrieves a value that indicates the table alignment.
            */
          align: string;
          clear: string;
      }
      
      declare var HTMLHeadingElement: {
          prototype: HTMLHeadingElement;
          new(): HTMLHeadingElement;
      }
      
      interface HTMLHtmlElement extends HTMLElement {
          /**
            * Sets or retrieves the DTD version that governs the current document.
            */
          version: string;
      }
      
      declare var HTMLHtmlElement: {
          prototype: HTMLHtmlElement;
          new(): HTMLHtmlElement;
      }
      
      interface HTMLIFrameElement extends HTMLElement, GetSVGDocument {
          /**
            * Sets or retrieves how the object is aligned with adjacent text.
            */
          align: string;
          allowFullscreen: boolean;
          /**
            * Specifies the properties of a border drawn around an object.
            */
          border: string;
          /**
            * Retrieves the document object of the page or frame.
            */
          contentDocument: Document;
          /**
            * Retrieves the object of the specified.
            */
          contentWindow: Window;
          /**
            * Sets or retrieves whether to display a border for the frame.
            */
          frameBorder: string;
          /**
            * Sets or retrieves the amount of additional space between the frames.
            */
          frameSpacing: any;
          /**
            * Sets or retrieves the height of the object.
            */
          height: string;
          /**
            * Sets or retrieves the horizontal margin for the object.
            */
          hspace: number;
          /**
            * Sets or retrieves a URI to a long description of the object.
            */
          longDesc: string;
          /**
            * Sets or retrieves the top and bottom margin heights before displaying the text in a frame.
            */
          marginHeight: string;
          /**
            * Sets or retrieves the left and right margin widths before displaying the text in a frame.
            */
          marginWidth: string;
          /**
            * Sets or retrieves the frame name.
            */
          name: string;
          /**
            * Sets or retrieves whether the user can resize the frame.
            */
          noResize: boolean;
          /**
            * Raised when the object has been completely received from the server.
            */
          onload: (ev: Event) => any;
          sandbox: DOMSettableTokenList;
          /**
            * Sets or retrieves whether the frame can be scrolled.
            */
          scrolling: string;
          /**
            * Sets the value indicating whether the source file of a frame or iframe has specific security restrictions applied.
            */
          security: any;
          /**
            * Sets or retrieves a URL to be loaded by the object.
            */
          src: string;
          /**
            * Sets or retrieves the vertical margin for the object.
            */
          vspace: number;
          /**
            * Sets or retrieves the width of the object.
            */
          width: string;
          addEventListener(type: "MSContentZoom", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureHold", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGotPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSInertiaStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSLostPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSManipulationStateChanged", listener: (ev: MSManipulationEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerCancel", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerDown", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerEnter", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerLeave", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerMove", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerOut", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerOver", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerUp", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "activate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "ariarequest", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "beforeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "beforecopy", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "beforecut", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "beforedeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "beforepaste", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "blur", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "canplay", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "canplaythrough", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "change", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "click", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "command", listener: (ev: CommandEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "contextmenu", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "copy", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "cuechange", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "cut", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "dblclick", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "deactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "drag", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "dragend", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "dragenter", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "dragleave", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "dragover", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "dragstart", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "drop", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "durationchange", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "emptied", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "ended", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "focus", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "gotpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "input", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "keydown", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "keypress", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "keyup", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "loadeddata", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "loadedmetadata", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "lostpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mousedown", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mouseenter", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mouseleave", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mousemove", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mouseout", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mouseover", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mouseup", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mousewheel", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "paste", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "play", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "playing", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "pointercancel", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerdown", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerenter", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerleave", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointermove", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerout", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerover", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerup", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "ratechange", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "reset", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "scroll", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "seeked", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "seeking", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "select", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "selectstart", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "stalled", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "submit", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "suspend", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "timeupdate", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "touchcancel", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "touchend", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "touchmove", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "touchstart", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "volumechange", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "waiting", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "webkitfullscreenchange", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "webkitfullscreenerror", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var HTMLIFrameElement: {
          prototype: HTMLIFrameElement;
          new(): HTMLIFrameElement;
      }
      
      interface HTMLImageElement extends HTMLElement {
          /**
            * Sets or retrieves how the object is aligned with adjacent text.
            */
          align: string;
          /**
            * Sets or retrieves a text alternative to the graphic.
            */
          alt: string;
          /**
            * Specifies the properties of a border drawn around an object.
            */
          border: string;
          /**
            * Retrieves whether the object is fully loaded.
            */
          complete: boolean;
          crossOrigin: string;
          currentSrc: string;
          /**
            * Sets or retrieves the height of the object.
            */
          height: number;
          /**
            * Sets or retrieves the width of the border to draw around the object.
            */
          hspace: number;
          /**
            * Sets or retrieves whether the image is a server-side image map.
            */
          isMap: boolean;
          /**
            * Sets or retrieves a Uniform Resource Identifier (URI) to a long description of the object.
            */
          longDesc: string;
          /**
            * Gets or sets whether the DLNA PlayTo device is available.
            */
          msPlayToDisabled: boolean;
          msPlayToPreferredSourceUri: string;
          /**
            * Gets or sets the primary DLNA PlayTo device.
            */
          msPlayToPrimary: boolean;
          /**
            * Gets the source associated with the media element for use by the PlayToManager.
            */
          msPlayToSource: any;
          /**
            * Sets or retrieves the name of the object.
            */
          name: string;
          /**
            * The original height of the image resource before sizing.
            */
          naturalHeight: number;
          /**
            * The original width of the image resource before sizing.
            */
          naturalWidth: number;
          /**
            * The address or URL of the a media resource that is to be considered.
            */
          src: string;
          srcset: string;
          /**
            * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.
            */
          useMap: string;
          /**
            * Sets or retrieves the vertical margin for the object.
            */
          vspace: number;
          /**
            * Sets or retrieves the width of the object.
            */
          width: number;
          x: number;
          y: number;
          msGetAsCastingSource(): any;
      }
      
      declare var HTMLImageElement: {
          prototype: HTMLImageElement;
          new(): HTMLImageElement;
          create(): HTMLImageElement;
      }
      
      interface HTMLInputElement extends HTMLElement {
          /**
            * Sets or retrieves a comma-separated list of content types.
            */
          accept: string;
          /**
            * Sets or retrieves how the object is aligned with adjacent text.
            */
          align: string;
          /**
            * Sets or retrieves a text alternative to the graphic.
            */
          alt: string;
          /**
            * Specifies whether autocomplete is applied to an editable text field.
            */
          autocomplete: string;
          /**
            * Provides a way to direct a user to a specific field when a document loads. This can provide both direction and convenience for a user, reducing the need to click or tab to a field when a page opens. This attribute is true when present on an element, and false when missing.
            */
          autofocus: boolean;
          /**
            * Sets or retrieves the width of the border to draw around the object.
            */
          border: string;
          /**
            * Sets or retrieves the state of the check box or radio button.
            */
          checked: boolean;
          /**
            * Retrieves whether the object is fully loaded.
            */
          complete: boolean;
          /**
            * Sets or retrieves the state of the check box or radio button.
            */
          defaultChecked: boolean;
          /**
            * Sets or retrieves the initial contents of the object.
            */
          defaultValue: string;
          disabled: boolean;
          /**
            * Returns a FileList object on a file type input object.
            */
          files: FileList;
          /**
            * Retrieves a reference to the form that the object is embedded in. 
            */
          form: HTMLFormElement;
          /**
            * Overrides the action attribute (where the data on a form is sent) on the parent form element.
            */
          formAction: string;
          /**
            * Used to override the encoding (formEnctype attribute) specified on the form element.
            */
          formEnctype: string;
          /**
            * Overrides the submit method attribute previously specified on a form element.
            */
          formMethod: string;
          /**
            * Overrides any validation or required attributes on a form or form elements to allow it to be submitted without validation. This can be used to create a "save draft"-type submit option.
            */
          formNoValidate: string;
          /**
            * Overrides the target attribute on a form element.
            */
          formTarget: string;
          /**
            * Sets or retrieves the height of the object.
            */
          height: string;
          /**
            * Sets or retrieves the width of the border to draw around the object.
            */
          hspace: number;
          indeterminate: boolean;
          /**
            * Specifies the ID of a pre-defined datalist of options for an input element.
            */
          list: HTMLElement;
          /**
            * Defines the maximum acceptable value for an input element with type="number".When used with the min and step attributes, lets you control the range and increment (such as only even numbers) that the user can enter into an input field.
            */
          max: string;
          /**
            * Sets or retrieves the maximum number of characters that the user can enter in a text control.
            */
          maxLength: number;
          /**
            * Defines the minimum acceptable value for an input element with type="number". When used with the max and step attributes, lets you control the range and increment (such as even numbers only) that the user can enter into an input field.
            */
          min: string;
          /**
            * Sets or retrieves the Boolean value indicating whether multiple items can be selected from a list.
            */
          multiple: boolean;
          /**
            * Sets or retrieves the name of the object.
            */
          name: string;
          /**
            * Gets or sets a string containing a regular expression that the user's input must match.
            */
          pattern: string;
          /**
            * Gets or sets a text string that is displayed in an input field as a hint or prompt to users as the format or type of information they need to enter.The text appears in an input field until the user puts focus on the field.
            */
          placeholder: string;
          readOnly: boolean;
          /**
            * When present, marks an element that can't be submitted without a value.
            */
          required: boolean;
          /**
            * Gets or sets the end position or offset of a text selection.
            */
          selectionEnd: number;
          /**
            * Gets or sets the starting position or offset of a text selection.
            */
          selectionStart: number;
          size: number;
          /**
            * The address or URL of the a media resource that is to be considered.
            */
          src: string;
          status: boolean;
          /**
            * Defines an increment or jump between values that you want to allow the user to enter. When used with the max and min attributes, lets you control the range and increment (for example, allow only even numbers) that the user can enter into an input field.
            */
          step: string;
          /**
            * Returns the content type of the object.
            */
          type: string;
          /**
            * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.
            */
          useMap: string;
          /**
            * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
            */
          validationMessage: string;
          /**
            * Returns a  ValidityState object that represents the validity states of an element.
            */
          validity: ValidityState;
          /**
            * Returns the value of the data at the cursor's current position.
            */
          value: string;
          valueAsDate: Date;
          /**
            * Returns the input field value as a number.
            */
          valueAsNumber: number;
          /**
            * Sets or retrieves the vertical margin for the object.
            */
          vspace: number;
          /**
            * Sets or retrieves the width of the object.
            */
          width: string;
          /**
            * Returns whether an element will successfully validate based on forms validation rules and constraints.
            */
          willValidate: boolean;
          /**
            * Returns whether a form will validate when it is submitted, without having to submit it.
            */
          checkValidity(): boolean;
          /**
            * Creates a TextRange object for the element.
            */
          createTextRange(): TextRange;
          /**
            * Makes the selection equal to the current object.
            */
          select(): void;
          /**
            * Sets a custom error message that is displayed when a form is submitted.
            * @param error Sets a custom error message that is displayed when a form is submitted.
            */
          setCustomValidity(error: string): void;
          /**
            * Sets the start and end positions of a selection in a text field.
            * @param start The offset into the text field for the start of the selection.
            * @param end The offset into the text field for the end of the selection.
            */
          setSelectionRange(start: number, end: number): void;
          /**
            * Decrements a range input control's value by the value given by the Step attribute. If the optional parameter is used, it will decrement the input control's step value multiplied by the parameter's value.
            * @param n Value to decrement the value by.
            */
          stepDown(n?: number): void;
          /**
            * Increments a range input control's value by the value given by the Step attribute. If the optional parameter is used, will increment the input control's value by that value.
            * @param n Value to increment the value by.
            */
          stepUp(n?: number): void;
      }
      
      declare var HTMLInputElement: {
          prototype: HTMLInputElement;
          new(): HTMLInputElement;
      }
      
      interface HTMLIsIndexElement extends HTMLElement {
          /**
            * Sets or retrieves the URL to which the form content is sent for processing.
            */
          action: string;
          /**
            * Retrieves a reference to the form that the object is embedded in. 
            */
          form: HTMLFormElement;
          prompt: string;
      }
      
      declare var HTMLIsIndexElement: {
          prototype: HTMLIsIndexElement;
          new(): HTMLIsIndexElement;
      }
      
      interface HTMLLIElement extends HTMLElement {
          type: string;
          /**
            * Sets or retrieves the value of a list item.
            */
          value: number;
      }
      
      declare var HTMLLIElement: {
          prototype: HTMLLIElement;
          new(): HTMLLIElement;
      }
      
      interface HTMLLabelElement extends HTMLElement {
          /**
            * Retrieves a reference to the form that the object is embedded in.
            */
          form: HTMLFormElement;
          /**
            * Sets or retrieves the object to which the given label object is assigned.
            */
          htmlFor: string;
      }
      
      declare var HTMLLabelElement: {
          prototype: HTMLLabelElement;
          new(): HTMLLabelElement;
      }
      
      interface HTMLLegendElement extends HTMLElement {
          /**
            * Retrieves a reference to the form that the object is embedded in.
            */
          align: string;
          /**
            * Retrieves a reference to the form that the object is embedded in.
            */
          form: HTMLFormElement;
      }
      
      declare var HTMLLegendElement: {
          prototype: HTMLLegendElement;
          new(): HTMLLegendElement;
      }
      
      interface HTMLLinkElement extends HTMLElement, LinkStyle {
          /**
            * Sets or retrieves the character set used to encode the object.
            */
          charset: string;
          disabled: boolean;
          /**
            * Sets or retrieves a destination URL or an anchor point.
            */
          href: string;
          /**
            * Sets or retrieves the language code of the object.
            */
          hreflang: string;
          /**
            * Sets or retrieves the media type.
            */
          media: string;
          /**
            * Sets or retrieves the relationship between the object and the destination of the link.
            */
          rel: string;
          /**
            * Sets or retrieves the relationship between the object and the destination of the link.
            */
          rev: string;
          /**
            * Sets or retrieves the window or frame at which to target content.
            */
          target: string;
          /**
            * Sets or retrieves the MIME type of the object.
            */
          type: string;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var HTMLLinkElement: {
          prototype: HTMLLinkElement;
          new(): HTMLLinkElement;
      }
      
      interface HTMLMapElement extends HTMLElement {
          /**
            * Retrieves a collection of the area objects defined for the given map object.
            */
          areas: HTMLAreasCollection;
          /**
            * Sets or retrieves the name of the object.
            */
          name: string;
      }
      
      declare var HTMLMapElement: {
          prototype: HTMLMapElement;
          new(): HTMLMapElement;
      }
      
      interface HTMLMarqueeElement extends HTMLElement {
          behavior: string;
          bgColor: any;
          direction: string;
          height: string;
          hspace: number;
          loop: number;
          onbounce: (ev: Event) => any;
          onfinish: (ev: Event) => any;
          onstart: (ev: Event) => any;
          scrollAmount: number;
          scrollDelay: number;
          trueSpeed: boolean;
          vspace: number;
          width: string;
          start(): void;
          stop(): void;
          addEventListener(type: "MSContentZoom", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureHold", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGotPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSInertiaStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSLostPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSManipulationStateChanged", listener: (ev: MSManipulationEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerCancel", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerDown", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerEnter", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerLeave", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerMove", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerOut", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerOver", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerUp", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "activate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "ariarequest", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "beforeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "beforecopy", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "beforecut", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "beforedeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "beforepaste", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "blur", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "bounce", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "canplay", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "canplaythrough", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "change", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "click", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "command", listener: (ev: CommandEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "contextmenu", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "copy", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "cuechange", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "cut", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "dblclick", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "deactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "drag", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "dragend", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "dragenter", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "dragleave", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "dragover", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "dragstart", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "drop", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "durationchange", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "emptied", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "ended", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "finish", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "focus", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "gotpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "input", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "keydown", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "keypress", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "keyup", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "loadeddata", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "loadedmetadata", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "lostpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mousedown", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mouseenter", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mouseleave", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mousemove", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mouseout", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mouseover", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mouseup", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mousewheel", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "paste", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "play", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "playing", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "pointercancel", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerdown", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerenter", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerleave", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointermove", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerout", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerover", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerup", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "ratechange", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "reset", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "scroll", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "seeked", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "seeking", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "select", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "selectstart", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "stalled", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "start", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "submit", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "suspend", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "timeupdate", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "touchcancel", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "touchend", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "touchmove", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "touchstart", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "volumechange", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "waiting", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "webkitfullscreenchange", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "webkitfullscreenerror", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var HTMLMarqueeElement: {
          prototype: HTMLMarqueeElement;
          new(): HTMLMarqueeElement;
      }
      
      interface HTMLMediaElement extends HTMLElement {
          /**
            * Returns an AudioTrackList object with the audio tracks for a given video element.
            */
          audioTracks: AudioTrackList;
          /**
            * Gets or sets a value that indicates whether to start playing the media automatically.
            */
          autoplay: boolean;
          /**
            * Gets a collection of buffered time ranges.
            */
          buffered: TimeRanges;
          /**
            * Gets or sets a flag that indicates whether the client provides a set of controls for the media (in case the developer does not include controls for the player).
            */
          controls: boolean;
          /**
            * Gets the address or URL of the current media resource that is selected by IHTMLMediaElement.
            */
          currentSrc: string;
          /**
            * Gets or sets the current playback position, in seconds.
            */
          currentTime: number;
          defaultMuted: boolean;
          /**
            * Gets or sets the default playback rate when the user is not using fast forward or reverse for a video or audio resource.
            */
          defaultPlaybackRate: number;
          /**
            * Returns the duration in seconds of the current media resource. A NaN value is returned if duration is not available, or Infinity if the media resource is streaming.
            */
          duration: number;
          /**
            * Gets information about whether the playback has ended or not.
            */
          ended: boolean;
          /**
            * Returns an object representing the current error state of the audio or video element.
            */
          error: MediaError;
          /**
            * Gets or sets a flag to specify whether playback should restart after it completes.
            */
          loop: boolean;
          /**
            * Specifies the purpose of the audio or video media, such as background audio or alerts.
            */
          msAudioCategory: string;
          /**
            * Specifies the output device id that the audio will be sent to.
            */
          msAudioDeviceType: string;
          msGraphicsTrustStatus: MSGraphicsTrust;
          /**
            * Gets the MSMediaKeys object, which is used for decrypting media data, that is associated with this media element.
            */
          msKeys: MSMediaKeys;
          /**
            * Gets or sets whether the DLNA PlayTo device is available.
            */
          msPlayToDisabled: boolean;
          /**
            * Gets or sets the path to the preferred media source. This enables the Play To target device to stream the media content, which can be DRM protected, from a different location, such as a cloud media server.
            */
          msPlayToPreferredSourceUri: string;
          /**
            * Gets or sets the primary DLNA PlayTo device.
            */
          msPlayToPrimary: boolean;
          /**
            * Gets the source associated with the media element for use by the PlayToManager.
            */
          msPlayToSource: any;
          /**
            * Specifies whether or not to enable low-latency playback on the media element.
            */
          msRealTime: boolean;
          /**
            * Gets or sets a flag that indicates whether the audio (either audio or the audio track on video media) is muted.
            */
          muted: boolean;
          /**
            * Gets the current network activity for the element.
            */
          networkState: number;
          onmsneedkey: (ev: MSMediaKeyNeededEvent) => any;
          /**
            * Gets a flag that specifies whether playback is paused.
            */
          paused: boolean;
          /**
            * Gets or sets the current rate of speed for the media resource to play. This speed is expressed as a multiple of the normal speed of the media resource.
            */
          playbackRate: number;
          /**
            * Gets TimeRanges for the current media resource that has been played.
            */
          played: TimeRanges;
          /**
            * Gets or sets the current playback position, in seconds.
            */
          preload: string;
          readyState: any;
          /**
            * Returns a TimeRanges object that represents the ranges of the current media resource that can be seeked.
            */
          seekable: TimeRanges;
          /**
            * Gets a flag that indicates whether the the client is currently moving to a new playback position in the media resource.
            */
          seeking: boolean;
          /**
            * The address or URL of the a media resource that is to be considered.
            */
          src: string;
          textTracks: TextTrackList;
          videoTracks: VideoTrackList;
          /**
            * Gets or sets the volume level for audio portions of the media element.
            */
          volume: number;
          addTextTrack(kind: string, label?: string, language?: string): TextTrack;
          /**
            * Returns a string that specifies whether the client can play a given media resource type.
            */
          canPlayType(type: string): string;
          /**
            * Fires immediately after the client loads the object.
            */
          load(): void;
          /**
            * Clears all effects from the media pipeline.
            */
          msClearEffects(): void;
          msGetAsCastingSource(): any;
          /**
            * Inserts the specified audio effect into media pipeline.
            */
          msInsertAudioEffect(activatableClassId: string, effectRequired: boolean, config?: any): void;
          msSetMediaKeys(mediaKeys: MSMediaKeys): void;
          /**
            * Specifies the media protection manager for a given media pipeline.
            */
          msSetMediaProtectionManager(mediaProtectionManager?: any): void;
          /**
            * Pauses the current playback and sets paused to TRUE. This can be used to test whether the media is playing or paused. You can also use the pause or play events to tell whether the media is playing or not.
            */
          pause(): void;
          /**
            * Loads and starts playback of a media resource.
            */
          play(): void;
          HAVE_CURRENT_DATA: number;
          HAVE_ENOUGH_DATA: number;
          HAVE_FUTURE_DATA: number;
          HAVE_METADATA: number;
          HAVE_NOTHING: number;
          NETWORK_EMPTY: number;
          NETWORK_IDLE: number;
          NETWORK_LOADING: number;
          NETWORK_NO_SOURCE: number;
          addEventListener(type: "MSContentZoom", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureHold", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGotPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSInertiaStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSLostPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSManipulationStateChanged", listener: (ev: MSManipulationEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerCancel", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerDown", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerEnter", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerLeave", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerMove", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerOut", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerOver", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerUp", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "activate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "ariarequest", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "beforeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "beforecopy", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "beforecut", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "beforedeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "beforepaste", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "blur", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "canplay", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "canplaythrough", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "change", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "click", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "command", listener: (ev: CommandEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "contextmenu", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "copy", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "cuechange", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "cut", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "dblclick", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "deactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "drag", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "dragend", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "dragenter", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "dragleave", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "dragover", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "dragstart", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "drop", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "durationchange", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "emptied", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "ended", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "focus", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "gotpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "input", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "keydown", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "keypress", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "keyup", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "loadeddata", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "loadedmetadata", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "lostpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mousedown", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mouseenter", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mouseleave", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mousemove", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mouseout", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mouseover", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mouseup", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mousewheel", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "msneedkey", listener: (ev: MSMediaKeyNeededEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "paste", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "play", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "playing", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "pointercancel", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerdown", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerenter", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerleave", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointermove", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerout", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerover", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerup", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "ratechange", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "reset", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "scroll", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "seeked", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "seeking", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "select", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "selectstart", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "stalled", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "submit", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "suspend", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "timeupdate", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "touchcancel", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "touchend", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "touchmove", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "touchstart", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "volumechange", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "waiting", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "webkitfullscreenchange", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "webkitfullscreenerror", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var HTMLMediaElement: {
          prototype: HTMLMediaElement;
          new(): HTMLMediaElement;
          HAVE_CURRENT_DATA: number;
          HAVE_ENOUGH_DATA: number;
          HAVE_FUTURE_DATA: number;
          HAVE_METADATA: number;
          HAVE_NOTHING: number;
          NETWORK_EMPTY: number;
          NETWORK_IDLE: number;
          NETWORK_LOADING: number;
          NETWORK_NO_SOURCE: number;
      }
      
      interface HTMLMenuElement extends HTMLElement {
          compact: boolean;
          type: string;
      }
      
      declare var HTMLMenuElement: {
          prototype: HTMLMenuElement;
          new(): HTMLMenuElement;
      }
      
      interface HTMLMetaElement extends HTMLElement {
          /**
            * Sets or retrieves the character set used to encode the object.
            */
          charset: string;
          /**
            * Gets or sets meta-information to associate with httpEquiv or name.
            */
          content: string;
          /**
            * Gets or sets information used to bind the value of a content attribute of a meta element to an HTTP response header.
            */
          httpEquiv: string;
          /**
            * Sets or retrieves the value specified in the content attribute of the meta object.
            */
          name: string;
          /**
            * Sets or retrieves a scheme to be used in interpreting the value of a property specified for the object.
            */
          scheme: string;
          /**
            * Sets or retrieves the URL property that will be loaded after the specified time has elapsed. 
            */
          url: string;
      }
      
      declare var HTMLMetaElement: {
          prototype: HTMLMetaElement;
          new(): HTMLMetaElement;
      }
      
      interface HTMLModElement extends HTMLElement {
          /**
            * Sets or retrieves reference information about the object.
            */
          cite: string;
          /**
            * Sets or retrieves the date and time of a modification to the object.
            */
          dateTime: string;
      }
      
      declare var HTMLModElement: {
          prototype: HTMLModElement;
          new(): HTMLModElement;
      }
      
      interface HTMLNextIdElement extends HTMLElement {
          n: string;
      }
      
      declare var HTMLNextIdElement: {
          prototype: HTMLNextIdElement;
          new(): HTMLNextIdElement;
      }
      
      interface HTMLOListElement extends HTMLElement {
          compact: boolean;
          /**
            * The starting number.
            */
          start: number;
          type: string;
      }
      
      declare var HTMLOListElement: {
          prototype: HTMLOListElement;
          new(): HTMLOListElement;
      }
      
      interface HTMLObjectElement extends HTMLElement, GetSVGDocument {
          /**
            * Retrieves a string of the URL where the object tag can be found. This is often the href of the document that the object is in, or the value set by a base element.
            */
          BaseHref: string;
          align: string;
          /**
            * Sets or retrieves a text alternative to the graphic.
            */
          alt: string;
          /**
            * Gets or sets the optional alternative HTML script to execute if the object fails to load.
            */
          altHtml: string;
          /**
            * Sets or retrieves a character string that can be used to implement your own archive functionality for the object.
            */
          archive: string;
          border: string;
          /**
            * Sets or retrieves the URL of the file containing the compiled Java class.
            */
          code: string;
          /**
            * Sets or retrieves the URL of the component.
            */
          codeBase: string;
          /**
            * Sets or retrieves the Internet media type for the code associated with the object.
            */
          codeType: string;
          /**
            * Retrieves the document object of the page or frame.
            */
          contentDocument: Document;
          /**
            * Sets or retrieves the URL that references the data of the object.
            */
          data: string;
          declare: boolean;
          /**
            * Retrieves a reference to the form that the object is embedded in.
            */
          form: HTMLFormElement;
          /**
            * Sets or retrieves the height of the object.
            */
          height: string;
          hspace: number;
          /**
            * Gets or sets whether the DLNA PlayTo device is available.
            */
          msPlayToDisabled: boolean;
          /**
            * Gets or sets the path to the preferred media source. This enables the Play To target device to stream the media content, which can be DRM protected, from a different location, such as a cloud media server.
            */
          msPlayToPreferredSourceUri: string;
          /**
            * Gets or sets the primary DLNA PlayTo device.
            */
          msPlayToPrimary: boolean;
          /**
            * Gets the source associated with the media element for use by the PlayToManager.
            */
          msPlayToSource: any;
          /**
            * Sets or retrieves the name of the object.
            */
          name: string;
          /**
            * Retrieves the contained object.
            */
          object: any;
          readyState: number;
          /**
            * Sets or retrieves a message to be displayed while an object is loading.
            */
          standby: string;
          /**
            * Sets or retrieves the MIME type of the object.
            */
          type: string;
          /**
            * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.
            */
          useMap: string;
          /**
            * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
            */
          validationMessage: string;
          /**
            * Returns a  ValidityState object that represents the validity states of an element.
            */
          validity: ValidityState;
          vspace: number;
          /**
            * Sets or retrieves the width of the object.
            */
          width: string;
          /**
            * Returns whether an element will successfully validate based on forms validation rules and constraints.
            */
          willValidate: boolean;
          /**
            * Returns whether a form will validate when it is submitted, without having to submit it.
            */
          checkValidity(): boolean;
          /**
            * Sets a custom error message that is displayed when a form is submitted.
            * @param error Sets a custom error message that is displayed when a form is submitted.
            */
          setCustomValidity(error: string): void;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var HTMLObjectElement: {
          prototype: HTMLObjectElement;
          new(): HTMLObjectElement;
      }
      
      interface HTMLOptGroupElement extends HTMLElement {
          /**
            * Sets or retrieves the status of an option.
            */
          defaultSelected: boolean;
          disabled: boolean;
          /**
            * Retrieves a reference to the form that the object is embedded in.
            */
          form: HTMLFormElement;
          /**
            * Sets or retrieves the ordinal position of an option in a list box.
            */
          index: number;
          /**
            * Sets or retrieves a value that you can use to implement your own label functionality for the object.
            */
          label: string;
          /**
            * Sets or retrieves whether the option in the list box is the default item.
            */
          selected: boolean;
          /**
            * Sets or retrieves the text string specified by the option tag.
            */
          text: string;
          /**
            * Sets or retrieves the value which is returned to the server when the form control is submitted.
            */
          value: string;
      }
      
      declare var HTMLOptGroupElement: {
          prototype: HTMLOptGroupElement;
          new(): HTMLOptGroupElement;
      }
      
      interface HTMLOptionElement extends HTMLElement {
          /**
            * Sets or retrieves the status of an option.
            */
          defaultSelected: boolean;
          disabled: boolean;
          /**
            * Retrieves a reference to the form that the object is embedded in.
            */
          form: HTMLFormElement;
          /**
            * Sets or retrieves the ordinal position of an option in a list box.
            */
          index: number;
          /**
            * Sets or retrieves a value that you can use to implement your own label functionality for the object.
            */
          label: string;
          /**
            * Sets or retrieves whether the option in the list box is the default item.
            */
          selected: boolean;
          /**
            * Sets or retrieves the text string specified by the option tag.
            */
          text: string;
          /**
            * Sets or retrieves the value which is returned to the server when the form control is submitted.
            */
          value: string;
      }
      
      declare var HTMLOptionElement: {
          prototype: HTMLOptionElement;
          new(): HTMLOptionElement;
          create(): HTMLOptionElement;
      }
      
      interface HTMLParagraphElement extends HTMLElement {
          /**
            * Sets or retrieves how the object is aligned with adjacent text. 
            */
          align: string;
          clear: string;
      }
      
      declare var HTMLParagraphElement: {
          prototype: HTMLParagraphElement;
          new(): HTMLParagraphElement;
      }
      
      interface HTMLParamElement extends HTMLElement {
          /**
            * Sets or retrieves the name of an input parameter for an element.
            */
          name: string;
          /**
            * Sets or retrieves the content type of the resource designated by the value attribute.
            */
          type: string;
          /**
            * Sets or retrieves the value of an input parameter for an element.
            */
          value: string;
          /**
            * Sets or retrieves the data type of the value attribute.
            */
          valueType: string;
      }
      
      declare var HTMLParamElement: {
          prototype: HTMLParamElement;
          new(): HTMLParamElement;
      }
      
      interface HTMLPhraseElement extends HTMLElement {
          /**
            * Sets or retrieves reference information about the object.
            */
          cite: string;
          /**
            * Sets or retrieves the date and time of a modification to the object.
            */
          dateTime: string;
      }
      
      declare var HTMLPhraseElement: {
          prototype: HTMLPhraseElement;
          new(): HTMLPhraseElement;
      }
      
      interface HTMLPreElement extends HTMLElement {
          /**
            * Indicates a citation by rendering text in italic type.
            */
          cite: string;
          clear: string;
          /**
            * Sets or gets a value that you can use to implement your own width functionality for the object.
            */
          width: number;
      }
      
      declare var HTMLPreElement: {
          prototype: HTMLPreElement;
          new(): HTMLPreElement;
      }
      
      interface HTMLProgressElement extends HTMLElement {
          /**
            * Retrieves a reference to the form that the object is embedded in.
            */
          form: HTMLFormElement;
          /**
            * Defines the maximum, or "done" value for a progress element.
            */
          max: number;
          /**
            * Returns the quotient of value/max when the value attribute is set (determinate progress bar), or -1 when the value attribute is missing (indeterminate progress bar).
            */
          position: number;
          /**
            * Sets or gets the current value of a progress element. The value must be a non-negative number between 0 and the max value.
            */
          value: number;
      }
      
      declare var HTMLProgressElement: {
          prototype: HTMLProgressElement;
          new(): HTMLProgressElement;
      }
      
      interface HTMLQuoteElement extends HTMLElement {
          /**
            * Sets or retrieves reference information about the object.
            */
          cite: string;
          /**
            * Sets or retrieves the date and time of a modification to the object.
            */
          dateTime: string;
      }
      
      declare var HTMLQuoteElement: {
          prototype: HTMLQuoteElement;
          new(): HTMLQuoteElement;
      }
      
      interface HTMLScriptElement extends HTMLElement {
          async: boolean;
          /**
            * Sets or retrieves the character set used to encode the object.
            */
          charset: string;
          /**
            * Sets or retrieves the status of the script.
            */
          defer: boolean;
          /**
            * Sets or retrieves the event for which the script is written. 
            */
          event: string;
          /** 
            * Sets or retrieves the object that is bound to the event script.
            */
          htmlFor: string;
          /**
            * Retrieves the URL to an external file that contains the source code or data.
            */
          src: string;
          /**
            * Retrieves or sets the text of the object as a string. 
            */
          text: string;
          /**
            * Sets or retrieves the MIME type for the associated scripting engine.
            */
          type: string;
      }
      
      declare var HTMLScriptElement: {
          prototype: HTMLScriptElement;
          new(): HTMLScriptElement;
      }
      
      interface HTMLSelectElement extends HTMLElement {
          /**
            * Provides a way to direct a user to a specific field when a document loads. This can provide both direction and convenience for a user, reducing the need to click or tab to a field when a page opens. This attribute is true when present on an element, and false when missing.
            */
          autofocus: boolean;
          disabled: boolean;
          /**
            * Retrieves a reference to the form that the object is embedded in. 
            */
          form: HTMLFormElement;
          /**
            * Sets or retrieves the number of objects in a collection.
            */
          length: number;
          /**
            * Sets or retrieves the Boolean value indicating whether multiple items can be selected from a list.
            */
          multiple: boolean;
          /**
            * Sets or retrieves the name of the object.
            */
          name: string;
          options: HTMLSelectElement;
          /**
            * When present, marks an element that can't be submitted without a value.
            */
          required: boolean;
          /**
            * Sets or retrieves the index of the selected option in a select object.
            */
          selectedIndex: number;
          /**
            * Sets or retrieves the number of rows in the list box. 
            */
          size: number;
          /**
            * Retrieves the type of select control based on the value of the MULTIPLE attribute.
            */
          type: string;
          /**
            * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
            */
          validationMessage: string;
          /**
            * Returns a  ValidityState object that represents the validity states of an element.
            */
          validity: ValidityState;
          /**
            * Sets or retrieves the value which is returned to the server when the form control is submitted.
            */
          value: string;
          /**
            * Returns whether an element will successfully validate based on forms validation rules and constraints.
            */
          willValidate: boolean;
          /**
            * Adds an element to the areas, controlRange, or options collection.
            * @param element Variant of type Number that specifies the index position in the collection where the element is placed. If no value is given, the method places the element at the end of the collection.
            * @param before Variant of type Object that specifies an element to insert before, or null to append the object to the collection. 
            */
          add(element: HTMLElement, before?: HTMLElement): void;
          add(element: HTMLElement, before?: number): void;
          /**
            * Returns whether a form will validate when it is submitted, without having to submit it.
            */
          checkValidity(): boolean;
          /**
            * Retrieves a select object or an object from an options collection.
            * @param name Variant of type Number or String that specifies the object or collection to retrieve. If this parameter is an integer, it is the zero-based index of the object. If this parameter is a string, all objects with matching name or id properties are retrieved, and a collection is returned if more than one match is made.
            * @param index Variant of type Number that specifies the zero-based index of the object to retrieve when a collection is returned.
            */
          item(name?: any, index?: any): any;
          /**
            * Retrieves a select object or an object from an options collection.
            * @param namedItem A String that specifies the name or id property of the object to retrieve. A collection is returned if more than one match is made.
            */
          namedItem(name: string): any;
          /**
            * Removes an element from the collection.
            * @param index Number that specifies the zero-based index of the element to remove from the collection.
            */
          remove(index?: number): void;
          /**
            * Sets a custom error message that is displayed when a form is submitted.
            * @param error Sets a custom error message that is displayed when a form is submitted.
            */
          setCustomValidity(error: string): void;
          [name: string]: any;
      }
      
      declare var HTMLSelectElement: {
          prototype: HTMLSelectElement;
          new(): HTMLSelectElement;
      }
      
      interface HTMLSourceElement extends HTMLElement {
          /**
            * Gets or sets the intended media type of the media source.
           */
          media: string;
          msKeySystem: string;
          /**
            * The address or URL of the a media resource that is to be considered.
            */
          src: string;
          /**
           * Gets or sets the MIME type of a media resource.
           */
          type: string;
      }
      
      declare var HTMLSourceElement: {
          prototype: HTMLSourceElement;
          new(): HTMLSourceElement;
      }
      
      interface HTMLSpanElement extends HTMLElement {
      }
      
      declare var HTMLSpanElement: {
          prototype: HTMLSpanElement;
          new(): HTMLSpanElement;
      }
      
      interface HTMLStyleElement extends HTMLElement, LinkStyle {
          /**
            * Sets or retrieves the media type.
            */
          media: string;
          /**
            * Retrieves the CSS language in which the style sheet is written.
            */
          type: string;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var HTMLStyleElement: {
          prototype: HTMLStyleElement;
          new(): HTMLStyleElement;
      }
      
      interface HTMLTableCaptionElement extends HTMLElement {
          /**
            * Sets or retrieves the alignment of the caption or legend.
            */
          align: string;
          /**
            * Sets or retrieves whether the caption appears at the top or bottom of the table.
            */
          vAlign: string;
      }
      
      declare var HTMLTableCaptionElement: {
          prototype: HTMLTableCaptionElement;
          new(): HTMLTableCaptionElement;
      }
      
      interface HTMLTableCellElement extends HTMLElement, HTMLTableAlignment {
          /**
            * Sets or retrieves abbreviated text for the object.
            */
          abbr: string;
          /**
            * Sets or retrieves how the object is aligned with adjacent text.
            */
          align: string;
          /**
            * Sets or retrieves a comma-delimited list of conceptual categories associated with the object.
            */
          axis: string;
          bgColor: any;
          /**
            * Retrieves the position of the object in the cells collection of a row.
            */
          cellIndex: number;
          /**
            * Sets or retrieves the number columns in the table that the object should span.
            */
          colSpan: number;
          /**
            * Sets or retrieves a list of header cells that provide information for the object.
            */
          headers: string;
          /**
            * Sets or retrieves the height of the object.
            */
          height: any;
          /**
            * Sets or retrieves whether the browser automatically performs wordwrap.
            */
          noWrap: boolean;
          /**
            * Sets or retrieves how many rows in a table the cell should span.
            */
          rowSpan: number;
          /**
            * Sets or retrieves the group of cells in a table to which the object's information applies.
            */
          scope: string;
          /**
            * Sets or retrieves the width of the object.
            */
          width: string;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var HTMLTableCellElement: {
          prototype: HTMLTableCellElement;
          new(): HTMLTableCellElement;
      }
      
      interface HTMLTableColElement extends HTMLElement, HTMLTableAlignment {
          /**
            * Sets or retrieves the alignment of the object relative to the display or table.
            */
          align: string;
          /**
            * Sets or retrieves the number of columns in the group.
            */
          span: number;
          /**
            * Sets or retrieves the width of the object.
            */
          width: any;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var HTMLTableColElement: {
          prototype: HTMLTableColElement;
          new(): HTMLTableColElement;
      }
      
      interface HTMLTableDataCellElement extends HTMLTableCellElement {
      }
      
      declare var HTMLTableDataCellElement: {
          prototype: HTMLTableDataCellElement;
          new(): HTMLTableDataCellElement;
      }
      
      interface HTMLTableElement extends HTMLElement {
          /**
            * Sets or retrieves a value that indicates the table alignment.
            */
          align: string;
          bgColor: any;
          /**
            * Sets or retrieves the width of the border to draw around the object.
            */
          border: string;
          /**
            * Sets or retrieves the border color of the object. 
            */
          borderColor: any;
          /**
            * Retrieves the caption object of a table.
            */
          caption: HTMLTableCaptionElement;
          /**
            * Sets or retrieves the amount of space between the border of the cell and the content of the cell.
            */
          cellPadding: string;
          /**
            * Sets or retrieves the amount of space between cells in a table.
            */
          cellSpacing: string;
          /**
            * Sets or retrieves the number of columns in the table.
            */
          cols: number;
          /**
            * Sets or retrieves the way the border frame around the table is displayed.
            */
          frame: string;
          /**
            * Sets or retrieves the height of the object.
            */
          height: any;
          /**
            * Sets or retrieves the number of horizontal rows contained in the object.
            */
          rows: HTMLCollection;
          /**
            * Sets or retrieves which dividing lines (inner borders) are displayed.
            */
          rules: string;
          /**
            * Sets or retrieves a description and/or structure of the object.
            */
          summary: string;
          /**
            * Retrieves a collection of all tBody objects in the table. Objects in this collection are in source order.
            */
          tBodies: HTMLCollection;
          /**
            * Retrieves the tFoot object of the table.
            */
          tFoot: HTMLTableSectionElement;
          /**
            * Retrieves the tHead object of the table.
            */
          tHead: HTMLTableSectionElement;
          /**
            * Sets or retrieves the width of the object.
            */
          width: string;
          /**
            * Creates an empty caption element in the table.
            */
          createCaption(): HTMLElement;
          /**
            * Creates an empty tBody element in the table.
            */
          createTBody(): HTMLElement;
          /**
            * Creates an empty tFoot element in the table.
            */
          createTFoot(): HTMLElement;
          /**
            * Returns the tHead element object if successful, or null otherwise.
            */
          createTHead(): HTMLElement;
          /**
            * Deletes the caption element and its contents from the table.
            */
          deleteCaption(): void;
          /**
            * Removes the specified row (tr) from the element and from the rows collection.
            * @param index Number that specifies the zero-based position in the rows collection of the row to remove.
            */
          deleteRow(index?: number): void;
          /**
            * Deletes the tFoot element and its contents from the table.
            */
          deleteTFoot(): void;
          /**
            * Deletes the tHead element and its contents from the table.
            */
          deleteTHead(): void;
          /**
            * Creates a new row (tr) in the table, and adds the row to the rows collection.
            * @param index Number that specifies where to insert the row in the rows collection. The default value is -1, which appends the new row to the end of the rows collection.
            */
          insertRow(index?: number): HTMLElement;
      }
      
      declare var HTMLTableElement: {
          prototype: HTMLTableElement;
          new(): HTMLTableElement;
      }
      
      interface HTMLTableHeaderCellElement extends HTMLTableCellElement {
          /**
            * Sets or retrieves the group of cells in a table to which the object's information applies.
            */
          scope: string;
      }
      
      declare var HTMLTableHeaderCellElement: {
          prototype: HTMLTableHeaderCellElement;
          new(): HTMLTableHeaderCellElement;
      }
      
      interface HTMLTableRowElement extends HTMLElement, HTMLTableAlignment {
          /**
            * Sets or retrieves how the object is aligned with adjacent text.
            */
          align: string;
          bgColor: any;
          /**
            * Retrieves a collection of all cells in the table row.
            */
          cells: HTMLCollection;
          /**
            * Sets or retrieves the height of the object.
            */
          height: any;
          /**
            * Retrieves the position of the object in the rows collection for the table.
            */
          rowIndex: number;
          /**
            * Retrieves the position of the object in the collection.
            */
          sectionRowIndex: number;
          /**
            * Removes the specified cell from the table row, as well as from the cells collection.
            * @param index Number that specifies the zero-based position of the cell to remove from the table row. If no value is provided, the last cell in the cells collection is deleted.
            */
          deleteCell(index?: number): void;
          /**
            * Creates a new cell in the table row, and adds the cell to the cells collection.
            * @param index Number that specifies where to insert the cell in the tr. The default value is -1, which appends the new cell to the end of the cells collection.
            */
          insertCell(index?: number): HTMLElement;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var HTMLTableRowElement: {
          prototype: HTMLTableRowElement;
          new(): HTMLTableRowElement;
      }
      
      interface HTMLTableSectionElement extends HTMLElement, HTMLTableAlignment {
          /**
            * Sets or retrieves a value that indicates the table alignment.
            */
          align: string;
          /**
            * Sets or retrieves the number of horizontal rows contained in the object.
            */
          rows: HTMLCollection;
          /**
            * Removes the specified row (tr) from the element and from the rows collection.
            * @param index Number that specifies the zero-based position in the rows collection of the row to remove.
            */
          deleteRow(index?: number): void;
          /**
            * Creates a new row (tr) in the table, and adds the row to the rows collection.
            * @param index Number that specifies where to insert the row in the rows collection. The default value is -1, which appends the new row to the end of the rows collection.
            */
          insertRow(index?: number): HTMLElement;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var HTMLTableSectionElement: {
          prototype: HTMLTableSectionElement;
          new(): HTMLTableSectionElement;
      }
      
      interface HTMLTextAreaElement extends HTMLElement {
          /**
            * Provides a way to direct a user to a specific field when a document loads. This can provide both direction and convenience for a user, reducing the need to click or tab to a field when a page opens. This attribute is true when present on an element, and false when missing.
            */
          autofocus: boolean;
          /**
            * Sets or retrieves the width of the object.
            */
          cols: number;
          /**
            * Sets or retrieves the initial contents of the object.
            */
          defaultValue: string;
          disabled: boolean;
          /**
            * Retrieves a reference to the form that the object is embedded in.
            */
          form: HTMLFormElement;
          /**
            * Sets or retrieves the maximum number of characters that the user can enter in a text control.
            */
          maxLength: number;
          /**
            * Sets or retrieves the name of the object.
            */
          name: string;
          /**
            * Gets or sets a text string that is displayed in an input field as a hint or prompt to users as the format or type of information they need to enter.The text appears in an input field until the user puts focus on the field.
            */
          placeholder: string;
          /**
            * Sets or retrieves the value indicated whether the content of the object is read-only.
            */
          readOnly: boolean;
          /**
            * When present, marks an element that can't be submitted without a value.
            */
          required: boolean;
          /**
            * Sets or retrieves the number of horizontal rows contained in the object.
            */
          rows: number;
          /**
            * Gets or sets the end position or offset of a text selection.
            */
          selectionEnd: number;
          /**
            * Gets or sets the starting position or offset of a text selection.
            */
          selectionStart: number;
          /**
            * Sets or retrieves the value indicating whether the control is selected.
            */
          status: any;
          /**
            * Retrieves the type of control.
            */
          type: string;
          /**
            * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
            */
          validationMessage: string;
          /**
            * Returns a  ValidityState object that represents the validity states of an element.
            */
          validity: ValidityState;
          /**
            * Retrieves or sets the text in the entry field of the textArea element.
            */
          value: string;
          /**
            * Returns whether an element will successfully validate based on forms validation rules and constraints.
            */
          willValidate: boolean;
          /**
            * Sets or retrieves how to handle wordwrapping in the object.
            */
          wrap: string;
          /**
            * Returns whether a form will validate when it is submitted, without having to submit it.
            */
          checkValidity(): boolean;
          /**
            * Creates a TextRange object for the element.
            */
          createTextRange(): TextRange;
          /**
            * Highlights the input area of a form element.
            */
          select(): void;
          /**
            * Sets a custom error message that is displayed when a form is submitted.
            * @param error Sets a custom error message that is displayed when a form is submitted.
            */
          setCustomValidity(error: string): void;
          /**
            * Sets the start and end positions of a selection in a text field.
            * @param start The offset into the text field for the start of the selection.
            * @param end The offset into the text field for the end of the selection.
            */
          setSelectionRange(start: number, end: number): void;
      }
      
      declare var HTMLTextAreaElement: {
          prototype: HTMLTextAreaElement;
          new(): HTMLTextAreaElement;
      }
      
      interface HTMLTitleElement extends HTMLElement {
          /**
            * Retrieves or sets the text of the object as a string. 
            */
          text: string;
      }
      
      declare var HTMLTitleElement: {
          prototype: HTMLTitleElement;
          new(): HTMLTitleElement;
      }
      
      interface HTMLTrackElement extends HTMLElement {
          default: boolean;
          kind: string;
          label: string;
          readyState: number;
          src: string;
          srclang: string;
          track: TextTrack;
          ERROR: number;
          LOADED: number;
          LOADING: number;
          NONE: number;
      }
      
      declare var HTMLTrackElement: {
          prototype: HTMLTrackElement;
          new(): HTMLTrackElement;
          ERROR: number;
          LOADED: number;
          LOADING: number;
          NONE: number;
      }
      
      interface HTMLUListElement extends HTMLElement {
          compact: boolean;
          type: string;
      }
      
      declare var HTMLUListElement: {
          prototype: HTMLUListElement;
          new(): HTMLUListElement;
      }
      
      interface HTMLUnknownElement extends HTMLElement {
      }
      
      declare var HTMLUnknownElement: {
          prototype: HTMLUnknownElement;
          new(): HTMLUnknownElement;
      }
      
      interface HTMLVideoElement extends HTMLMediaElement {
          /**
            * Gets or sets the height of the video element.
            */
          height: number;
          msHorizontalMirror: boolean;
          msIsLayoutOptimalForPlayback: boolean;
          msIsStereo3D: boolean;
          msStereo3DPackingMode: string;
          msStereo3DRenderMode: string;
          msZoom: boolean;
          onMSVideoFormatChanged: (ev: Event) => any;
          onMSVideoFrameStepCompleted: (ev: Event) => any;
          onMSVideoOptimalLayoutChanged: (ev: Event) => any;
          /**
            * Gets or sets a URL of an image to display, for example, like a movie poster. This can be a still frame from the video, or another image if no video data is available.
            */
          poster: string;
          /**
            * Gets the intrinsic height of a video in CSS pixels, or zero if the dimensions are not known.
            */
          videoHeight: number;
          /**
            * Gets the intrinsic width of a video in CSS pixels, or zero if the dimensions are not known.
            */
          videoWidth: number;
          webkitDisplayingFullscreen: boolean;
          webkitSupportsFullscreen: boolean;
          /**
            * Gets or sets the width of the video element.
            */
          width: number;
          getVideoPlaybackQuality(): VideoPlaybackQuality;
          msFrameStep(forward: boolean): void;
          msInsertVideoEffect(activatableClassId: string, effectRequired: boolean, config?: any): void;
          msSetVideoRectangle(left: number, top: number, right: number, bottom: number): void;
          webkitEnterFullScreen(): void;
          webkitEnterFullscreen(): void;
          webkitExitFullScreen(): void;
          webkitExitFullscreen(): void;
          addEventListener(type: "MSContentZoom", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureHold", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGotPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSInertiaStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSLostPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSManipulationStateChanged", listener: (ev: MSManipulationEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerCancel", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerDown", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerEnter", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerLeave", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerMove", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerOut", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerOver", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerUp", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSVideoFormatChanged", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "MSVideoFrameStepCompleted", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "MSVideoOptimalLayoutChanged", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "activate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "ariarequest", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "beforeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "beforecopy", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "beforecut", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "beforedeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "beforepaste", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "blur", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "canplay", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "canplaythrough", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "change", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "click", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "command", listener: (ev: CommandEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "contextmenu", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "copy", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "cuechange", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "cut", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "dblclick", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "deactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "drag", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "dragend", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "dragenter", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "dragleave", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "dragover", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "dragstart", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "drop", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "durationchange", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "emptied", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "ended", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "focus", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "gotpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "input", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "keydown", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "keypress", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "keyup", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "loadeddata", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "loadedmetadata", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "lostpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mousedown", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mouseenter", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mouseleave", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mousemove", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mouseout", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mouseover", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mouseup", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mousewheel", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "msneedkey", listener: (ev: MSMediaKeyNeededEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "paste", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "play", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "playing", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "pointercancel", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerdown", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerenter", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerleave", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointermove", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerout", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerover", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerup", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "ratechange", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "reset", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "scroll", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "seeked", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "seeking", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "select", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "selectstart", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "stalled", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "submit", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "suspend", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "timeupdate", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "touchcancel", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "touchend", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "touchmove", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "touchstart", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "volumechange", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "waiting", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "webkitfullscreenchange", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "webkitfullscreenerror", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var HTMLVideoElement: {
          prototype: HTMLVideoElement;
          new(): HTMLVideoElement;
      }
      
      interface HashChangeEvent extends Event {
          newURL: string;
          oldURL: string;
      }
      
      declare var HashChangeEvent: {
          prototype: HashChangeEvent;
          new(type: string, eventInitDict?: HashChangeEventInit): HashChangeEvent;
      }
      
      interface History {
          length: number;
          state: any;
          back(distance?: any): void;
          forward(distance?: any): void;
          go(delta?: any): void;
          pushState(statedata: any, title?: string, url?: string): void;
          replaceState(statedata: any, title?: string, url?: string): void;
      }
      
      declare var History: {
          prototype: History;
          new(): History;
      }
      
      interface IDBCursor {
          direction: string;
          key: any;
          primaryKey: any;
          source: any;
          advance(count: number): void;
          continue(key?: any): void;
          delete(): IDBRequest;
          update(value: any): IDBRequest;
          NEXT: string;
          NEXT_NO_DUPLICATE: string;
          PREV: string;
          PREV_NO_DUPLICATE: string;
      }
      
      declare var IDBCursor: {
          prototype: IDBCursor;
          new(): IDBCursor;
          NEXT: string;
          NEXT_NO_DUPLICATE: string;
          PREV: string;
          PREV_NO_DUPLICATE: string;
      }
      
      interface IDBCursorWithValue extends IDBCursor {
          value: any;
      }
      
      declare var IDBCursorWithValue: {
          prototype: IDBCursorWithValue;
          new(): IDBCursorWithValue;
      }
      
      interface IDBDatabase extends EventTarget {
          name: string;
          objectStoreNames: DOMStringList;
          onabort: (ev: Event) => any;
          onerror: (ev: Event) => any;
          version: string;
          close(): void;
          createObjectStore(name: string, optionalParameters?: any): IDBObjectStore;
          deleteObjectStore(name: string): void;
          transaction(storeNames: any, mode?: string): IDBTransaction;
          addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var IDBDatabase: {
          prototype: IDBDatabase;
          new(): IDBDatabase;
      }
      
      interface IDBFactory {
          cmp(first: any, second: any): number;
          deleteDatabase(name: string): IDBOpenDBRequest;
          open(name: string, version?: number): IDBOpenDBRequest;
      }
      
      declare var IDBFactory: {
          prototype: IDBFactory;
          new(): IDBFactory;
      }
      
      interface IDBIndex {
          keyPath: string;
          name: string;
          objectStore: IDBObjectStore;
          unique: boolean;
          count(key?: any): IDBRequest;
          get(key: any): IDBRequest;
          getKey(key: any): IDBRequest;
          openCursor(range?: IDBKeyRange, direction?: string): IDBRequest;
          openKeyCursor(range?: IDBKeyRange, direction?: string): IDBRequest;
      }
      
      declare var IDBIndex: {
          prototype: IDBIndex;
          new(): IDBIndex;
      }
      
      interface IDBKeyRange {
          lower: any;
          lowerOpen: boolean;
          upper: any;
          upperOpen: boolean;
      }
      
      declare var IDBKeyRange: {
          prototype: IDBKeyRange;
          new(): IDBKeyRange;
          bound(lower: any, upper: any, lowerOpen?: boolean, upperOpen?: boolean): IDBKeyRange;
          lowerBound(bound: any, open?: boolean): IDBKeyRange;
          only(value: any): IDBKeyRange;
          upperBound(bound: any, open?: boolean): IDBKeyRange;
      }
      
      interface IDBObjectStore {
          indexNames: DOMStringList;
          keyPath: string;
          name: string;
          transaction: IDBTransaction;
          add(value: any, key?: any): IDBRequest;
          clear(): IDBRequest;
          count(key?: any): IDBRequest;
          createIndex(name: string, keyPath: string, optionalParameters?: any): IDBIndex;
          delete(key: any): IDBRequest;
          deleteIndex(indexName: string): void;
          get(key: any): IDBRequest;
          index(name: string): IDBIndex;
          openCursor(range?: any, direction?: string): IDBRequest;
          put(value: any, key?: any): IDBRequest;
      }
      
      declare var IDBObjectStore: {
          prototype: IDBObjectStore;
          new(): IDBObjectStore;
      }
      
      interface IDBOpenDBRequest extends IDBRequest {
          onblocked: (ev: Event) => any;
          onupgradeneeded: (ev: IDBVersionChangeEvent) => any;
          addEventListener(type: "blocked", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "success", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "upgradeneeded", listener: (ev: IDBVersionChangeEvent) => any, useCapture?: boolean): void;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var IDBOpenDBRequest: {
          prototype: IDBOpenDBRequest;
          new(): IDBOpenDBRequest;
      }
      
      interface IDBRequest extends EventTarget {
          error: DOMError;
          onerror: (ev: Event) => any;
          onsuccess: (ev: Event) => any;
          readyState: string;
          result: any;
          source: any;
          transaction: IDBTransaction;
          addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "success", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var IDBRequest: {
          prototype: IDBRequest;
          new(): IDBRequest;
      }
      
      interface IDBTransaction extends EventTarget {
          db: IDBDatabase;
          error: DOMError;
          mode: string;
          onabort: (ev: Event) => any;
          oncomplete: (ev: Event) => any;
          onerror: (ev: Event) => any;
          abort(): void;
          objectStore(name: string): IDBObjectStore;
          READ_ONLY: string;
          READ_WRITE: string;
          VERSION_CHANGE: string;
          addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "complete", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var IDBTransaction: {
          prototype: IDBTransaction;
          new(): IDBTransaction;
          READ_ONLY: string;
          READ_WRITE: string;
          VERSION_CHANGE: string;
      }
      
      interface IDBVersionChangeEvent extends Event {
          newVersion: number;
          oldVersion: number;
      }
      
      declare var IDBVersionChangeEvent: {
          prototype: IDBVersionChangeEvent;
          new(): IDBVersionChangeEvent;
      }
      
      interface ImageData {
          data: number[];
          height: number;
          width: number;
      }
      
      declare var ImageData: {
          prototype: ImageData;
          new(): ImageData;
      }
      
      interface KeyboardEvent extends UIEvent {
          altKey: boolean;
          char: string;
          charCode: number;
          ctrlKey: boolean;
          key: string;
          keyCode: number;
          locale: string;
          location: number;
          metaKey: boolean;
          repeat: boolean;
          shiftKey: boolean;
          which: number;
          getModifierState(keyArg: string): boolean;
          initKeyboardEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, keyArg: string, locationArg: number, modifiersListArg: string, repeat: boolean, locale: string): void;
          DOM_KEY_LOCATION_JOYSTICK: number;
          DOM_KEY_LOCATION_LEFT: number;
          DOM_KEY_LOCATION_MOBILE: number;
          DOM_KEY_LOCATION_NUMPAD: number;
          DOM_KEY_LOCATION_RIGHT: number;
          DOM_KEY_LOCATION_STANDARD: number;
      }
      
      declare var KeyboardEvent: {
          prototype: KeyboardEvent;
          new(typeArg: string, eventInitDict?: KeyboardEventInit): KeyboardEvent;
          DOM_KEY_LOCATION_JOYSTICK: number;
          DOM_KEY_LOCATION_LEFT: number;
          DOM_KEY_LOCATION_MOBILE: number;
          DOM_KEY_LOCATION_NUMPAD: number;
          DOM_KEY_LOCATION_RIGHT: number;
          DOM_KEY_LOCATION_STANDARD: number;
      }
      
      interface Location {
          hash: string;
          host: string;
          hostname: string;
          href: string;
          origin: string;
          pathname: string;
          port: string;
          protocol: string;
          search: string;
          assign(url: string): void;
          reload(forcedReload?: boolean): void;
          replace(url: string): void;
          toString(): string;
      }
      
      declare var Location: {
          prototype: Location;
          new(): Location;
      }
      
      interface LongRunningScriptDetectedEvent extends Event {
          executionTime: number;
          stopPageScriptExecution: boolean;
      }
      
      declare var LongRunningScriptDetectedEvent: {
          prototype: LongRunningScriptDetectedEvent;
          new(): LongRunningScriptDetectedEvent;
      }
      
      interface MSApp {
          clearTemporaryWebDataAsync(): MSAppAsyncOperation;
          createBlobFromRandomAccessStream(type: string, seeker: any): Blob;
          createDataPackage(object: any): any;
          createDataPackageFromSelection(): any;
          createFileFromStorageFile(storageFile: any): File;
          createStreamFromInputStream(type: string, inputStream: any): MSStream;
          execAsyncAtPriority(asynchronousCallback: MSExecAtPriorityFunctionCallback, priority: string, ...args: any[]): void;
          execAtPriority(synchronousCallback: MSExecAtPriorityFunctionCallback, priority: string, ...args: any[]): any;
          getCurrentPriority(): string;
          getHtmlPrintDocumentSourceAsync(htmlDoc: any): any;
          getViewId(view: any): any;
          isTaskScheduledAtPriorityOrHigher(priority: string): boolean;
          pageHandlesAllApplicationActivations(enabled: boolean): void;
          suppressSubdownloadCredentialPrompts(suppress: boolean): void;
          terminateApp(exceptionObject: any): void;
          CURRENT: string;
          HIGH: string;
          IDLE: string;
          NORMAL: string;
      }
      declare var MSApp: MSApp;
      
      interface MSAppAsyncOperation extends EventTarget {
          error: DOMError;
          oncomplete: (ev: Event) => any;
          onerror: (ev: Event) => any;
          readyState: number;
          result: any;
          start(): void;
          COMPLETED: number;
          ERROR: number;
          STARTED: number;
          addEventListener(type: "complete", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var MSAppAsyncOperation: {
          prototype: MSAppAsyncOperation;
          new(): MSAppAsyncOperation;
          COMPLETED: number;
          ERROR: number;
          STARTED: number;
      }
      
      interface MSBlobBuilder {
          append(data: any, endings?: string): void;
          getBlob(contentType?: string): Blob;
      }
      
      declare var MSBlobBuilder: {
          prototype: MSBlobBuilder;
          new(): MSBlobBuilder;
      }
      
      interface MSCSSMatrix {
          a: number;
          b: number;
          c: number;
          d: number;
          e: number;
          f: number;
          m11: number;
          m12: number;
          m13: number;
          m14: number;
          m21: number;
          m22: number;
          m23: number;
          m24: number;
          m31: number;
          m32: number;
          m33: number;
          m34: number;
          m41: number;
          m42: number;
          m43: number;
          m44: number;
          inverse(): MSCSSMatrix;
          multiply(secondMatrix: MSCSSMatrix): MSCSSMatrix;
          rotate(angleX: number, angleY?: number, angleZ?: number): MSCSSMatrix;
          rotateAxisAngle(x: number, y: number, z: number, angle: number): MSCSSMatrix;
          scale(scaleX: number, scaleY?: number, scaleZ?: number): MSCSSMatrix;
          setMatrixValue(value: string): void;
          skewX(angle: number): MSCSSMatrix;
          skewY(angle: number): MSCSSMatrix;
          toString(): string;
          translate(x: number, y: number, z?: number): MSCSSMatrix;
      }
      
      declare var MSCSSMatrix: {
          prototype: MSCSSMatrix;
          new(text?: string): MSCSSMatrix;
      }
      
      interface MSGesture {
          target: Element;
          addPointer(pointerId: number): void;
          stop(): void;
      }
      
      declare var MSGesture: {
          prototype: MSGesture;
          new(): MSGesture;
      }
      
      interface MSGestureEvent extends UIEvent {
          clientX: number;
          clientY: number;
          expansion: number;
          gestureObject: any;
          hwTimestamp: number;
          offsetX: number;
          offsetY: number;
          rotation: number;
          scale: number;
          screenX: number;
          screenY: number;
          translationX: number;
          translationY: number;
          velocityAngular: number;
          velocityExpansion: number;
          velocityX: number;
          velocityY: number;
          initGestureEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, offsetXArg: number, offsetYArg: number, translationXArg: number, translationYArg: number, scaleArg: number, expansionArg: number, rotationArg: number, velocityXArg: number, velocityYArg: number, velocityExpansionArg: number, velocityAngularArg: number, hwTimestampArg: number): void;
          MSGESTURE_FLAG_BEGIN: number;
          MSGESTURE_FLAG_CANCEL: number;
          MSGESTURE_FLAG_END: number;
          MSGESTURE_FLAG_INERTIA: number;
          MSGESTURE_FLAG_NONE: number;
      }
      
      declare var MSGestureEvent: {
          prototype: MSGestureEvent;
          new(): MSGestureEvent;
          MSGESTURE_FLAG_BEGIN: number;
          MSGESTURE_FLAG_CANCEL: number;
          MSGESTURE_FLAG_END: number;
          MSGESTURE_FLAG_INERTIA: number;
          MSGESTURE_FLAG_NONE: number;
      }
      
      interface MSGraphicsTrust {
          constrictionActive: boolean;
          status: string;
      }
      
      declare var MSGraphicsTrust: {
          prototype: MSGraphicsTrust;
          new(): MSGraphicsTrust;
      }
      
      interface MSHTMLWebViewElement extends HTMLElement {
          canGoBack: boolean;
          canGoForward: boolean;
          containsFullScreenElement: boolean;
          documentTitle: string;
          height: number;
          settings: MSWebViewSettings;
          src: string;
          width: number;
          addWebAllowedObject(name: string, applicationObject: any): void;
          buildLocalStreamUri(contentIdentifier: string, relativePath: string): string;
          capturePreviewToBlobAsync(): MSWebViewAsyncOperation;
          captureSelectedContentToDataPackageAsync(): MSWebViewAsyncOperation;
          getDeferredPermissionRequestById(id: number): DeferredPermissionRequest;
          getDeferredPermissionRequests(): DeferredPermissionRequest[];
          goBack(): void;
          goForward(): void;
          invokeScriptAsync(scriptName: string, ...args: any[]): MSWebViewAsyncOperation;
          navigate(uri: string): void;
          navigateToLocalStreamUri(source: string, streamResolver: any): void;
          navigateToString(contents: string): void;
          navigateWithHttpRequestMessage(requestMessage: any): void;
          refresh(): void;
          stop(): void;
      }
      
      declare var MSHTMLWebViewElement: {
          prototype: MSHTMLWebViewElement;
          new(): MSHTMLWebViewElement;
      }
      
      interface MSHeaderFooter {
          URL: string;
          dateLong: string;
          dateShort: string;
          font: string;
          htmlFoot: string;
          htmlHead: string;
          page: number;
          pageTotal: number;
          textFoot: string;
          textHead: string;
          timeLong: string;
          timeShort: string;
          title: string;
      }
      
      declare var MSHeaderFooter: {
          prototype: MSHeaderFooter;
          new(): MSHeaderFooter;
      }
      
      interface MSInputMethodContext extends EventTarget {
          compositionEndOffset: number;
          compositionStartOffset: number;
          oncandidatewindowhide: (ev: Event) => any;
          oncandidatewindowshow: (ev: Event) => any;
          oncandidatewindowupdate: (ev: Event) => any;
          target: HTMLElement;
          getCandidateWindowClientRect(): ClientRect;
          getCompositionAlternatives(): string[];
          hasComposition(): boolean;
          isCandidateWindowVisible(): boolean;
          addEventListener(type: "MSCandidateWindowHide", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "MSCandidateWindowShow", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "MSCandidateWindowUpdate", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var MSInputMethodContext: {
          prototype: MSInputMethodContext;
          new(): MSInputMethodContext;
      }
      
      interface MSManipulationEvent extends UIEvent {
          currentState: number;
          inertiaDestinationX: number;
          inertiaDestinationY: number;
          lastState: number;
          initMSManipulationEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, lastState: number, currentState: number): void;
          MS_MANIPULATION_STATE_ACTIVE: number;
          MS_MANIPULATION_STATE_CANCELLED: number;
          MS_MANIPULATION_STATE_COMMITTED: number;
          MS_MANIPULATION_STATE_DRAGGING: number;
          MS_MANIPULATION_STATE_INERTIA: number;
          MS_MANIPULATION_STATE_PRESELECT: number;
          MS_MANIPULATION_STATE_SELECTING: number;
          MS_MANIPULATION_STATE_STOPPED: number;
      }
      
      declare var MSManipulationEvent: {
          prototype: MSManipulationEvent;
          new(): MSManipulationEvent;
          MS_MANIPULATION_STATE_ACTIVE: number;
          MS_MANIPULATION_STATE_CANCELLED: number;
          MS_MANIPULATION_STATE_COMMITTED: number;
          MS_MANIPULATION_STATE_DRAGGING: number;
          MS_MANIPULATION_STATE_INERTIA: number;
          MS_MANIPULATION_STATE_PRESELECT: number;
          MS_MANIPULATION_STATE_SELECTING: number;
          MS_MANIPULATION_STATE_STOPPED: number;
      }
      
      interface MSMediaKeyError {
          code: number;
          systemCode: number;
          MS_MEDIA_KEYERR_CLIENT: number;
          MS_MEDIA_KEYERR_DOMAIN: number;
          MS_MEDIA_KEYERR_HARDWARECHANGE: number;
          MS_MEDIA_KEYERR_OUTPUT: number;
          MS_MEDIA_KEYERR_SERVICE: number;
          MS_MEDIA_KEYERR_UNKNOWN: number;
      }
      
      declare var MSMediaKeyError: {
          prototype: MSMediaKeyError;
          new(): MSMediaKeyError;
          MS_MEDIA_KEYERR_CLIENT: number;
          MS_MEDIA_KEYERR_DOMAIN: number;
          MS_MEDIA_KEYERR_HARDWARECHANGE: number;
          MS_MEDIA_KEYERR_OUTPUT: number;
          MS_MEDIA_KEYERR_SERVICE: number;
          MS_MEDIA_KEYERR_UNKNOWN: number;
      }
      
      interface MSMediaKeyMessageEvent extends Event {
          destinationURL: string;
          message: Uint8Array;
      }
      
      declare var MSMediaKeyMessageEvent: {
          prototype: MSMediaKeyMessageEvent;
          new(): MSMediaKeyMessageEvent;
      }
      
      interface MSMediaKeyNeededEvent extends Event {
          initData: Uint8Array;
      }
      
      declare var MSMediaKeyNeededEvent: {
          prototype: MSMediaKeyNeededEvent;
          new(): MSMediaKeyNeededEvent;
      }
      
      interface MSMediaKeySession extends EventTarget {
          error: MSMediaKeyError;
          keySystem: string;
          sessionId: string;
          close(): void;
          update(key: Uint8Array): void;
      }
      
      declare var MSMediaKeySession: {
          prototype: MSMediaKeySession;
          new(): MSMediaKeySession;
      }
      
      interface MSMediaKeys {
          keySystem: string;
          createSession(type: string, initData: Uint8Array, cdmData?: Uint8Array): MSMediaKeySession;
      }
      
      declare var MSMediaKeys: {
          prototype: MSMediaKeys;
          new(keySystem: string): MSMediaKeys;
          isTypeSupported(keySystem: string, type?: string): boolean;
      }
      
      interface MSMimeTypesCollection {
          length: number;
      }
      
      declare var MSMimeTypesCollection: {
          prototype: MSMimeTypesCollection;
          new(): MSMimeTypesCollection;
      }
      
      interface MSPluginsCollection {
          length: number;
          refresh(reload?: boolean): void;
      }
      
      declare var MSPluginsCollection: {
          prototype: MSPluginsCollection;
          new(): MSPluginsCollection;
      }
      
      interface MSPointerEvent extends MouseEvent {
          currentPoint: any;
          height: number;
          hwTimestamp: number;
          intermediatePoints: any;
          isPrimary: boolean;
          pointerId: number;
          pointerType: any;
          pressure: number;
          rotation: number;
          tiltX: number;
          tiltY: number;
          width: number;
          getCurrentPoint(element: Element): void;
          getIntermediatePoints(element: Element): void;
          initPointerEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget, offsetXArg: number, offsetYArg: number, widthArg: number, heightArg: number, pressure: number, rotation: number, tiltX: number, tiltY: number, pointerIdArg: number, pointerType: any, hwTimestampArg: number, isPrimary: boolean): void;
      }
      
      declare var MSPointerEvent: {
          prototype: MSPointerEvent;
          new(typeArg: string, eventInitDict?: PointerEventInit): MSPointerEvent;
      }
      
      interface MSPrintManagerTemplatePrinter extends MSTemplatePrinter, EventTarget {
          percentScale: number;
          showHeaderFooter: boolean;
          shrinkToFit: boolean;
          drawPreviewPage(element: HTMLElement, pageNumber: number): void;
          endPrint(): void;
          getPrintTaskOptionValue(key: string): any;
          invalidatePreview(): void;
          setPageCount(pageCount: number): void;
          startPrint(): void;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var MSPrintManagerTemplatePrinter: {
          prototype: MSPrintManagerTemplatePrinter;
          new(): MSPrintManagerTemplatePrinter;
      }
      
      interface MSRangeCollection {
          length: number;
          item(index: number): Range;
          [index: number]: Range;
      }
      
      declare var MSRangeCollection: {
          prototype: MSRangeCollection;
          new(): MSRangeCollection;
      }
      
      interface MSSiteModeEvent extends Event {
          actionURL: string;
          buttonID: number;
      }
      
      declare var MSSiteModeEvent: {
          prototype: MSSiteModeEvent;
          new(): MSSiteModeEvent;
      }
      
      interface MSStream {
          type: string;
          msClose(): void;
          msDetachStream(): any;
      }
      
      declare var MSStream: {
          prototype: MSStream;
          new(): MSStream;
      }
      
      interface MSStreamReader extends EventTarget, MSBaseReader {
          error: DOMError;
          readAsArrayBuffer(stream: MSStream, size?: number): void;
          readAsBinaryString(stream: MSStream, size?: number): void;
          readAsBlob(stream: MSStream, size?: number): void;
          readAsDataURL(stream: MSStream, size?: number): void;
          readAsText(stream: MSStream, encoding?: string, size?: number): void;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var MSStreamReader: {
          prototype: MSStreamReader;
          new(): MSStreamReader;
      }
      
      interface MSTemplatePrinter {
          collate: boolean;
          copies: number;
          currentPage: boolean;
          currentPageAvail: boolean;
          duplex: boolean;
          footer: string;
          frameActive: boolean;
          frameActiveEnabled: boolean;
          frameAsShown: boolean;
          framesetDocument: boolean;
          header: string;
          headerFooterFont: string;
          marginBottom: number;
          marginLeft: number;
          marginRight: number;
          marginTop: number;
          orientation: string;
          pageFrom: number;
          pageHeight: number;
          pageTo: number;
          pageWidth: number;
          selectedPages: boolean;
          selection: boolean;
          selectionEnabled: boolean;
          unprintableBottom: number;
          unprintableLeft: number;
          unprintableRight: number;
          unprintableTop: number;
          usePrinterCopyCollate: boolean;
          createHeaderFooter(): MSHeaderFooter;
          deviceSupports(property: string): any;
          ensurePrintDialogDefaults(): boolean;
          getPageMarginBottom(pageRule: CSSPageRule, pageWidth: number, pageHeight: number): any;
          getPageMarginBottomImportant(pageRule: CSSPageRule): boolean;
          getPageMarginLeft(pageRule: CSSPageRule, pageWidth: number, pageHeight: number): any;
          getPageMarginLeftImportant(pageRule: CSSPageRule): boolean;
          getPageMarginRight(pageRule: CSSPageRule, pageWidth: number, pageHeight: number): any;
          getPageMarginRightImportant(pageRule: CSSPageRule): boolean;
          getPageMarginTop(pageRule: CSSPageRule, pageWidth: number, pageHeight: number): any;
          getPageMarginTopImportant(pageRule: CSSPageRule): boolean;
          printBlankPage(): void;
          printNonNative(document: any): boolean;
          printNonNativeFrames(document: any, activeFrame: boolean): void;
          printPage(element: HTMLElement): void;
          showPageSetupDialog(): boolean;
          showPrintDialog(): boolean;
          startDoc(title: string): boolean;
          stopDoc(): void;
          updatePageStatus(status: number): void;
      }
      
      declare var MSTemplatePrinter: {
          prototype: MSTemplatePrinter;
          new(): MSTemplatePrinter;
      }
      
      interface MSWebViewAsyncOperation extends EventTarget {
          error: DOMError;
          oncomplete: (ev: Event) => any;
          onerror: (ev: Event) => any;
          readyState: number;
          result: any;
          target: MSHTMLWebViewElement;
          type: number;
          start(): void;
          COMPLETED: number;
          ERROR: number;
          STARTED: number;
          TYPE_CAPTURE_PREVIEW_TO_RANDOM_ACCESS_STREAM: number;
          TYPE_CREATE_DATA_PACKAGE_FROM_SELECTION: number;
          TYPE_INVOKE_SCRIPT: number;
          addEventListener(type: "complete", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var MSWebViewAsyncOperation: {
          prototype: MSWebViewAsyncOperation;
          new(): MSWebViewAsyncOperation;
          COMPLETED: number;
          ERROR: number;
          STARTED: number;
          TYPE_CAPTURE_PREVIEW_TO_RANDOM_ACCESS_STREAM: number;
          TYPE_CREATE_DATA_PACKAGE_FROM_SELECTION: number;
          TYPE_INVOKE_SCRIPT: number;
      }
      
      interface MSWebViewSettings {
          isIndexedDBEnabled: boolean;
          isJavaScriptEnabled: boolean;
      }
      
      declare var MSWebViewSettings: {
          prototype: MSWebViewSettings;
          new(): MSWebViewSettings;
      }
      
      interface MediaElementAudioSourceNode extends AudioNode {
      }
      
      declare var MediaElementAudioSourceNode: {
          prototype: MediaElementAudioSourceNode;
          new(): MediaElementAudioSourceNode;
      }
      
      interface MediaError {
          code: number;
          msExtendedCode: number;
          MEDIA_ERR_ABORTED: number;
          MEDIA_ERR_DECODE: number;
          MEDIA_ERR_NETWORK: number;
          MEDIA_ERR_SRC_NOT_SUPPORTED: number;
          MS_MEDIA_ERR_ENCRYPTED: number;
      }
      
      declare var MediaError: {
          prototype: MediaError;
          new(): MediaError;
          MEDIA_ERR_ABORTED: number;
          MEDIA_ERR_DECODE: number;
          MEDIA_ERR_NETWORK: number;
          MEDIA_ERR_SRC_NOT_SUPPORTED: number;
          MS_MEDIA_ERR_ENCRYPTED: number;
      }
      
      interface MediaList {
          length: number;
          mediaText: string;
          appendMedium(newMedium: string): void;
          deleteMedium(oldMedium: string): void;
          item(index: number): string;
          toString(): string;
          [index: number]: string;
      }
      
      declare var MediaList: {
          prototype: MediaList;
          new(): MediaList;
      }
      
      interface MediaQueryList {
          matches: boolean;
          media: string;
          addListener(listener: MediaQueryListListener): void;
          removeListener(listener: MediaQueryListListener): void;
      }
      
      declare var MediaQueryList: {
          prototype: MediaQueryList;
          new(): MediaQueryList;
      }
      
      interface MediaSource extends EventTarget {
          activeSourceBuffers: SourceBufferList;
          duration: number;
          readyState: string;
          sourceBuffers: SourceBufferList;
          addSourceBuffer(type: string): SourceBuffer;
          endOfStream(error?: string): void;
          removeSourceBuffer(sourceBuffer: SourceBuffer): void;
      }
      
      declare var MediaSource: {
          prototype: MediaSource;
          new(): MediaSource;
          isTypeSupported(type: string): boolean;
      }
      
      interface MessageChannel {
          port1: MessagePort;
          port2: MessagePort;
      }
      
      declare var MessageChannel: {
          prototype: MessageChannel;
          new(): MessageChannel;
      }
      
      interface MessageEvent extends Event {
          data: any;
          origin: string;
          ports: any;
          source: Window;
          initMessageEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, dataArg: any, originArg: string, lastEventIdArg: string, sourceArg: Window): void;
      }
      
      declare var MessageEvent: {
          prototype: MessageEvent;
          new(): MessageEvent;
      }
      
      interface MessagePort extends EventTarget {
          onmessage: (ev: MessageEvent) => any;
          close(): void;
          postMessage(message?: any, ports?: any): void;
          start(): void;
          addEventListener(type: "message", listener: (ev: MessageEvent) => any, useCapture?: boolean): void;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var MessagePort: {
          prototype: MessagePort;
          new(): MessagePort;
      }
      
      interface MimeType {
          description: string;
          enabledPlugin: Plugin;
          suffixes: string;
          type: string;
      }
      
      declare var MimeType: {
          prototype: MimeType;
          new(): MimeType;
      }
      
      interface MimeTypeArray {
          length: number;
          item(index: number): Plugin;
          namedItem(type: string): Plugin;
          [index: number]: Plugin;
      }
      
      declare var MimeTypeArray: {
          prototype: MimeTypeArray;
          new(): MimeTypeArray;
      }
      
      interface MouseEvent extends UIEvent {
          altKey: boolean;
          button: number;
          buttons: number;
          clientX: number;
          clientY: number;
          ctrlKey: boolean;
          fromElement: Element;
          layerX: number;
          layerY: number;
          metaKey: boolean;
          movementX: number;
          movementY: number;
          offsetX: number;
          offsetY: number;
          pageX: number;
          pageY: number;
          relatedTarget: EventTarget;
          screenX: number;
          screenY: number;
          shiftKey: boolean;
          toElement: Element;
          which: number;
          x: number;
          y: number;
          getModifierState(keyArg: string): boolean;
          initMouseEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget): void;
      }
      
      declare var MouseEvent: {
          prototype: MouseEvent;
          new(typeArg: string, eventInitDict?: MouseEventInit): MouseEvent;
      }
      
      interface MouseWheelEvent extends MouseEvent {
          wheelDelta: number;
          wheelDeltaX: number;
          wheelDeltaY: number;
          initMouseWheelEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, buttonArg: number, relatedTargetArg: EventTarget, modifiersListArg: string, wheelDeltaArg: number): void;
      }
      
      declare var MouseWheelEvent: {
          prototype: MouseWheelEvent;
          new(): MouseWheelEvent;
      }
      
      interface MutationEvent extends Event {
          attrChange: number;
          attrName: string;
          newValue: string;
          prevValue: string;
          relatedNode: Node;
          initMutationEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, relatedNodeArg: Node, prevValueArg: string, newValueArg: string, attrNameArg: string, attrChangeArg: number): void;
          ADDITION: number;
          MODIFICATION: number;
          REMOVAL: number;
      }
      
      declare var MutationEvent: {
          prototype: MutationEvent;
          new(): MutationEvent;
          ADDITION: number;
          MODIFICATION: number;
          REMOVAL: number;
      }
      
      interface MutationObserver {
          disconnect(): void;
          observe(target: Node, options: MutationObserverInit): void;
          takeRecords(): MutationRecord[];
      }
      
      declare var MutationObserver: {
          prototype: MutationObserver;
          new(callback: MutationCallback): MutationObserver;
      }
      
      interface MutationRecord {
          addedNodes: NodeList;
          attributeName: string;
          attributeNamespace: string;
          nextSibling: Node;
          oldValue: string;
          previousSibling: Node;
          removedNodes: NodeList;
          target: Node;
          type: string;
      }
      
      declare var MutationRecord: {
          prototype: MutationRecord;
          new(): MutationRecord;
      }
      
      interface NamedNodeMap {
          length: number;
          getNamedItem(name: string): Attr;
          getNamedItemNS(namespaceURI: string, localName: string): Attr;
          item(index: number): Attr;
          removeNamedItem(name: string): Attr;
          removeNamedItemNS(namespaceURI: string, localName: string): Attr;
          setNamedItem(arg: Attr): Attr;
          setNamedItemNS(arg: Attr): Attr;
          [index: number]: Attr;
      }
      
      declare var NamedNodeMap: {
          prototype: NamedNodeMap;
          new(): NamedNodeMap;
      }
      
      interface NavigationCompletedEvent extends NavigationEvent {
          isSuccess: boolean;
          webErrorStatus: number;
      }
      
      declare var NavigationCompletedEvent: {
          prototype: NavigationCompletedEvent;
          new(): NavigationCompletedEvent;
      }
      
      interface NavigationEvent extends Event {
          uri: string;
      }
      
      declare var NavigationEvent: {
          prototype: NavigationEvent;
          new(): NavigationEvent;
      }
      
      interface NavigationEventWithReferrer extends NavigationEvent {
          referer: string;
      }
      
      declare var NavigationEventWithReferrer: {
          prototype: NavigationEventWithReferrer;
          new(): NavigationEventWithReferrer;
      }
      
      interface Navigator extends Object, NavigatorID, NavigatorOnLine, NavigatorContentUtils, NavigatorStorageUtils, NavigatorGeolocation, MSNavigatorDoNotTrack, MSFileSaver {
          appCodeName: string;
          appMinorVersion: string;
          browserLanguage: string;
          connectionSpeed: number;
          cookieEnabled: boolean;
          cpuClass: string;
          language: string;
          maxTouchPoints: number;
          mimeTypes: MSMimeTypesCollection;
          msManipulationViewsEnabled: boolean;
          msMaxTouchPoints: number;
          msPointerEnabled: boolean;
          plugins: MSPluginsCollection;
          pointerEnabled: boolean;
          systemLanguage: string;
          userLanguage: string;
          webdriver: boolean;
          getGamepads(): Gamepad[];
          javaEnabled(): boolean;
          msLaunchUri(uri: string, successCallback?: MSLaunchUriCallback, noHandlerCallback?: MSLaunchUriCallback): void;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var Navigator: {
          prototype: Navigator;
          new(): Navigator;
      }
      
      interface Node extends EventTarget {
          attributes: NamedNodeMap;
          baseURI: string;
          childNodes: NodeList;
          firstChild: Node;
          lastChild: Node;
          localName: string;
          namespaceURI: string;
          nextSibling: Node;
          nodeName: string;
          nodeType: number;
          nodeValue: string;
          ownerDocument: Document;
          parentElement: HTMLElement;
          parentNode: Node;
          prefix: string;
          previousSibling: Node;
          textContent: string;
          appendChild(newChild: Node): Node;
          cloneNode(deep?: boolean): Node;
          compareDocumentPosition(other: Node): number;
          hasAttributes(): boolean;
          hasChildNodes(): boolean;
          insertBefore(newChild: Node, refChild?: Node): Node;
          isDefaultNamespace(namespaceURI: string): boolean;
          isEqualNode(arg: Node): boolean;
          isSameNode(other: Node): boolean;
          lookupNamespaceURI(prefix: string): string;
          lookupPrefix(namespaceURI: string): string;
          normalize(): void;
          removeChild(oldChild: Node): Node;
          replaceChild(newChild: Node, oldChild: Node): Node;
          ATTRIBUTE_NODE: number;
          CDATA_SECTION_NODE: number;
          COMMENT_NODE: number;
          DOCUMENT_FRAGMENT_NODE: number;
          DOCUMENT_NODE: number;
          DOCUMENT_POSITION_CONTAINED_BY: number;
          DOCUMENT_POSITION_CONTAINS: number;
          DOCUMENT_POSITION_DISCONNECTED: number;
          DOCUMENT_POSITION_FOLLOWING: number;
          DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number;
          DOCUMENT_POSITION_PRECEDING: number;
          DOCUMENT_TYPE_NODE: number;
          ELEMENT_NODE: number;
          ENTITY_NODE: number;
          ENTITY_REFERENCE_NODE: number;
          NOTATION_NODE: number;
          PROCESSING_INSTRUCTION_NODE: number;
          TEXT_NODE: number;
      }
      
      declare var Node: {
          prototype: Node;
          new(): Node;
          ATTRIBUTE_NODE: number;
          CDATA_SECTION_NODE: number;
          COMMENT_NODE: number;
          DOCUMENT_FRAGMENT_NODE: number;
          DOCUMENT_NODE: number;
          DOCUMENT_POSITION_CONTAINED_BY: number;
          DOCUMENT_POSITION_CONTAINS: number;
          DOCUMENT_POSITION_DISCONNECTED: number;
          DOCUMENT_POSITION_FOLLOWING: number;
          DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number;
          DOCUMENT_POSITION_PRECEDING: number;
          DOCUMENT_TYPE_NODE: number;
          ELEMENT_NODE: number;
          ENTITY_NODE: number;
          ENTITY_REFERENCE_NODE: number;
          NOTATION_NODE: number;
          PROCESSING_INSTRUCTION_NODE: number;
          TEXT_NODE: number;
      }
      
      interface NodeFilter {
          FILTER_ACCEPT: number;
          FILTER_REJECT: number;
          FILTER_SKIP: number;
          SHOW_ALL: number;
          SHOW_ATTRIBUTE: number;
          SHOW_CDATA_SECTION: number;
          SHOW_COMMENT: number;
          SHOW_DOCUMENT: number;
          SHOW_DOCUMENT_FRAGMENT: number;
          SHOW_DOCUMENT_TYPE: number;
          SHOW_ELEMENT: number;
          SHOW_ENTITY: number;
          SHOW_ENTITY_REFERENCE: number;
          SHOW_NOTATION: number;
          SHOW_PROCESSING_INSTRUCTION: number;
          SHOW_TEXT: number;
      }
      declare var NodeFilter: NodeFilter;
      
      interface NodeIterator {
          expandEntityReferences: boolean;
          filter: NodeFilter;
          root: Node;
          whatToShow: number;
          detach(): void;
          nextNode(): Node;
          previousNode(): Node;
      }
      
      declare var NodeIterator: {
          prototype: NodeIterator;
          new(): NodeIterator;
      }
      
      interface NodeList {
          length: number;
          item(index: number): Node;
          [index: number]: Node;
      }
      
      declare var NodeList: {
          prototype: NodeList;
          new(): NodeList;
      }
      
      interface OES_element_index_uint {
      }
      
      declare var OES_element_index_uint: {
          prototype: OES_element_index_uint;
          new(): OES_element_index_uint;
      }
      
      interface OES_standard_derivatives {
          FRAGMENT_SHADER_DERIVATIVE_HINT_OES: number;
      }
      
      declare var OES_standard_derivatives: {
          prototype: OES_standard_derivatives;
          new(): OES_standard_derivatives;
          FRAGMENT_SHADER_DERIVATIVE_HINT_OES: number;
      }
      
      interface OES_texture_float {
      }
      
      declare var OES_texture_float: {
          prototype: OES_texture_float;
          new(): OES_texture_float;
      }
      
      interface OES_texture_float_linear {
      }
      
      declare var OES_texture_float_linear: {
          prototype: OES_texture_float_linear;
          new(): OES_texture_float_linear;
      }
      
      interface OfflineAudioCompletionEvent extends Event {
          renderedBuffer: AudioBuffer;
      }
      
      declare var OfflineAudioCompletionEvent: {
          prototype: OfflineAudioCompletionEvent;
          new(): OfflineAudioCompletionEvent;
      }
      
      interface OfflineAudioContext extends AudioContext {
          oncomplete: (ev: Event) => any;
          startRendering(): void;
          addEventListener(type: "complete", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var OfflineAudioContext: {
          prototype: OfflineAudioContext;
          new(numberOfChannels: number, length: number, sampleRate: number): OfflineAudioContext;
      }
      
      interface OscillatorNode extends AudioNode {
          detune: AudioParam;
          frequency: AudioParam;
          onended: (ev: Event) => any;
          type: string;
          setPeriodicWave(periodicWave: PeriodicWave): void;
          start(when?: number): void;
          stop(when?: number): void;
          addEventListener(type: "ended", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var OscillatorNode: {
          prototype: OscillatorNode;
          new(): OscillatorNode;
      }
      
      interface PageTransitionEvent extends Event {
          persisted: boolean;
      }
      
      declare var PageTransitionEvent: {
          prototype: PageTransitionEvent;
          new(): PageTransitionEvent;
      }
      
      interface PannerNode extends AudioNode {
          coneInnerAngle: number;
          coneOuterAngle: number;
          coneOuterGain: number;
          distanceModel: string;
          maxDistance: number;
          panningModel: string;
          refDistance: number;
          rolloffFactor: number;
          setOrientation(x: number, y: number, z: number): void;
          setPosition(x: number, y: number, z: number): void;
          setVelocity(x: number, y: number, z: number): void;
      }
      
      declare var PannerNode: {
          prototype: PannerNode;
          new(): PannerNode;
      }
      
      interface PerfWidgetExternal {
          activeNetworkRequestCount: number;
          averageFrameTime: number;
          averagePaintTime: number;
          extraInformationEnabled: boolean;
          independentRenderingEnabled: boolean;
          irDisablingContentString: string;
          irStatusAvailable: boolean;
          maxCpuSpeed: number;
          paintRequestsPerSecond: number;
          performanceCounter: number;
          performanceCounterFrequency: number;
          addEventListener(eventType: string, callback: Function): void;
          getMemoryUsage(): number;
          getProcessCpuUsage(): number;
          getRecentCpuUsage(last: number): any;
          getRecentFrames(last: number): any;
          getRecentMemoryUsage(last: number): any;
          getRecentPaintRequests(last: number): any;
          removeEventListener(eventType: string, callback: Function): void;
          repositionWindow(x: number, y: number): void;
          resizeWindow(width: number, height: number): void;
      }
      
      declare var PerfWidgetExternal: {
          prototype: PerfWidgetExternal;
          new(): PerfWidgetExternal;
      }
      
      interface Performance {
          navigation: PerformanceNavigation;
          timing: PerformanceTiming;
          clearMarks(markName?: string): void;
          clearMeasures(measureName?: string): void;
          clearResourceTimings(): void;
          getEntries(): any;
          getEntriesByName(name: string, entryType?: string): any;
          getEntriesByType(entryType: string): any;
          getMarks(markName?: string): any;
          getMeasures(measureName?: string): any;
          mark(markName: string): void;
          measure(measureName: string, startMarkName?: string, endMarkName?: string): void;
          now(): number;
          setResourceTimingBufferSize(maxSize: number): void;
          toJSON(): any;
      }
      
      declare var Performance: {
          prototype: Performance;
          new(): Performance;
      }
      
      interface PerformanceEntry {
          duration: number;
          entryType: string;
          name: string;
          startTime: number;
      }
      
      declare var PerformanceEntry: {
          prototype: PerformanceEntry;
          new(): PerformanceEntry;
      }
      
      interface PerformanceMark extends PerformanceEntry {
      }
      
      declare var PerformanceMark: {
          prototype: PerformanceMark;
          new(): PerformanceMark;
      }
      
      interface PerformanceMeasure extends PerformanceEntry {
      }
      
      declare var PerformanceMeasure: {
          prototype: PerformanceMeasure;
          new(): PerformanceMeasure;
      }
      
      interface PerformanceNavigation {
          redirectCount: number;
          type: number;
          toJSON(): any;
          TYPE_BACK_FORWARD: number;
          TYPE_NAVIGATE: number;
          TYPE_RELOAD: number;
          TYPE_RESERVED: number;
      }
      
      declare var PerformanceNavigation: {
          prototype: PerformanceNavigation;
          new(): PerformanceNavigation;
          TYPE_BACK_FORWARD: number;
          TYPE_NAVIGATE: number;
          TYPE_RELOAD: number;
          TYPE_RESERVED: number;
      }
      
      interface PerformanceNavigationTiming extends PerformanceEntry {
          connectEnd: number;
          connectStart: number;
          domComplete: number;
          domContentLoadedEventEnd: number;
          domContentLoadedEventStart: number;
          domInteractive: number;
          domLoading: number;
          domainLookupEnd: number;
          domainLookupStart: number;
          fetchStart: number;
          loadEventEnd: number;
          loadEventStart: number;
          navigationStart: number;
          redirectCount: number;
          redirectEnd: number;
          redirectStart: number;
          requestStart: number;
          responseEnd: number;
          responseStart: number;
          type: string;
          unloadEventEnd: number;
          unloadEventStart: number;
      }
      
      declare var PerformanceNavigationTiming: {
          prototype: PerformanceNavigationTiming;
          new(): PerformanceNavigationTiming;
      }
      
      interface PerformanceResourceTiming extends PerformanceEntry {
          connectEnd: number;
          connectStart: number;
          domainLookupEnd: number;
          domainLookupStart: number;
          fetchStart: number;
          initiatorType: string;
          redirectEnd: number;
          redirectStart: number;
          requestStart: number;
          responseEnd: number;
          responseStart: number;
      }
      
      declare var PerformanceResourceTiming: {
          prototype: PerformanceResourceTiming;
          new(): PerformanceResourceTiming;
      }
      
      interface PerformanceTiming {
          connectEnd: number;
          connectStart: number;
          domComplete: number;
          domContentLoadedEventEnd: number;
          domContentLoadedEventStart: number;
          domInteractive: number;
          domLoading: number;
          domainLookupEnd: number;
          domainLookupStart: number;
          fetchStart: number;
          loadEventEnd: number;
          loadEventStart: number;
          msFirstPaint: number;
          navigationStart: number;
          redirectEnd: number;
          redirectStart: number;
          requestStart: number;
          responseEnd: number;
          responseStart: number;
          unloadEventEnd: number;
          unloadEventStart: number;
          toJSON(): any;
      }
      
      declare var PerformanceTiming: {
          prototype: PerformanceTiming;
          new(): PerformanceTiming;
      }
      
      interface PeriodicWave {
      }
      
      declare var PeriodicWave: {
          prototype: PeriodicWave;
          new(): PeriodicWave;
      }
      
      interface PermissionRequest extends DeferredPermissionRequest {
          state: string;
          defer(): void;
      }
      
      declare var PermissionRequest: {
          prototype: PermissionRequest;
          new(): PermissionRequest;
      }
      
      interface PermissionRequestedEvent extends Event {
          permissionRequest: PermissionRequest;
      }
      
      declare var PermissionRequestedEvent: {
          prototype: PermissionRequestedEvent;
          new(): PermissionRequestedEvent;
      }
      
      interface Plugin {
          description: string;
          filename: string;
          length: number;
          name: string;
          version: string;
          item(index: number): MimeType;
          namedItem(type: string): MimeType;
          [index: number]: MimeType;
      }
      
      declare var Plugin: {
          prototype: Plugin;
          new(): Plugin;
      }
      
      interface PluginArray {
          length: number;
          item(index: number): Plugin;
          namedItem(name: string): Plugin;
          refresh(reload?: boolean): void;
          [index: number]: Plugin;
      }
      
      declare var PluginArray: {
          prototype: PluginArray;
          new(): PluginArray;
      }
      
      interface PointerEvent extends MouseEvent {
          currentPoint: any;
          height: number;
          hwTimestamp: number;
          intermediatePoints: any;
          isPrimary: boolean;
          pointerId: number;
          pointerType: any;
          pressure: number;
          rotation: number;
          tiltX: number;
          tiltY: number;
          width: number;
          getCurrentPoint(element: Element): void;
          getIntermediatePoints(element: Element): void;
          initPointerEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget, offsetXArg: number, offsetYArg: number, widthArg: number, heightArg: number, pressure: number, rotation: number, tiltX: number, tiltY: number, pointerIdArg: number, pointerType: any, hwTimestampArg: number, isPrimary: boolean): void;
      }
      
      declare var PointerEvent: {
          prototype: PointerEvent;
          new(typeArg: string, eventInitDict?: PointerEventInit): PointerEvent;
      }
      
      interface PopStateEvent extends Event {
          state: any;
          initPopStateEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, stateArg: any): void;
      }
      
      declare var PopStateEvent: {
          prototype: PopStateEvent;
          new(): PopStateEvent;
      }
      
      interface Position {
          coords: Coordinates;
          timestamp: Date;
      }
      
      declare var Position: {
          prototype: Position;
          new(): Position;
      }
      
      interface PositionError {
          code: number;
          message: string;
          toString(): string;
          PERMISSION_DENIED: number;
          POSITION_UNAVAILABLE: number;
          TIMEOUT: number;
      }
      
      declare var PositionError: {
          prototype: PositionError;
          new(): PositionError;
          PERMISSION_DENIED: number;
          POSITION_UNAVAILABLE: number;
          TIMEOUT: number;
      }
      
      interface ProcessingInstruction extends CharacterData {
          target: string;
      }
      
      declare var ProcessingInstruction: {
          prototype: ProcessingInstruction;
          new(): ProcessingInstruction;
      }
      
      interface ProgressEvent extends Event {
          lengthComputable: boolean;
          loaded: number;
          total: number;
          initProgressEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, lengthComputableArg: boolean, loadedArg: number, totalArg: number): void;
      }
      
      declare var ProgressEvent: {
          prototype: ProgressEvent;
          new(): ProgressEvent;
      }
      
      interface Range {
          collapsed: boolean;
          commonAncestorContainer: Node;
          endContainer: Node;
          endOffset: number;
          startContainer: Node;
          startOffset: number;
          cloneContents(): DocumentFragment;
          cloneRange(): Range;
          collapse(toStart: boolean): void;
          compareBoundaryPoints(how: number, sourceRange: Range): number;
          createContextualFragment(fragment: string): DocumentFragment;
          deleteContents(): void;
          detach(): void;
          expand(Unit: string): boolean;
          extractContents(): DocumentFragment;
          getBoundingClientRect(): ClientRect;
          getClientRects(): ClientRectList;
          insertNode(newNode: Node): void;
          selectNode(refNode: Node): void;
          selectNodeContents(refNode: Node): void;
          setEnd(refNode: Node, offset: number): void;
          setEndAfter(refNode: Node): void;
          setEndBefore(refNode: Node): void;
          setStart(refNode: Node, offset: number): void;
          setStartAfter(refNode: Node): void;
          setStartBefore(refNode: Node): void;
          surroundContents(newParent: Node): void;
          toString(): string;
          END_TO_END: number;
          END_TO_START: number;
          START_TO_END: number;
          START_TO_START: number;
      }
      
      declare var Range: {
          prototype: Range;
          new(): Range;
          END_TO_END: number;
          END_TO_START: number;
          START_TO_END: number;
          START_TO_START: number;
      }
      
      interface SVGAElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGURIReference {
          target: SVGAnimatedString;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var SVGAElement: {
          prototype: SVGAElement;
          new(): SVGAElement;
      }
      
      interface SVGAngle {
          unitType: number;
          value: number;
          valueAsString: string;
          valueInSpecifiedUnits: number;
          convertToSpecifiedUnits(unitType: number): void;
          newValueSpecifiedUnits(unitType: number, valueInSpecifiedUnits: number): void;
          SVG_ANGLETYPE_DEG: number;
          SVG_ANGLETYPE_GRAD: number;
          SVG_ANGLETYPE_RAD: number;
          SVG_ANGLETYPE_UNKNOWN: number;
          SVG_ANGLETYPE_UNSPECIFIED: number;
      }
      
      declare var SVGAngle: {
          prototype: SVGAngle;
          new(): SVGAngle;
          SVG_ANGLETYPE_DEG: number;
          SVG_ANGLETYPE_GRAD: number;
          SVG_ANGLETYPE_RAD: number;
          SVG_ANGLETYPE_UNKNOWN: number;
          SVG_ANGLETYPE_UNSPECIFIED: number;
      }
      
      interface SVGAnimatedAngle {
          animVal: SVGAngle;
          baseVal: SVGAngle;
      }
      
      declare var SVGAnimatedAngle: {
          prototype: SVGAnimatedAngle;
          new(): SVGAnimatedAngle;
      }
      
      interface SVGAnimatedBoolean {
          animVal: boolean;
          baseVal: boolean;
      }
      
      declare var SVGAnimatedBoolean: {
          prototype: SVGAnimatedBoolean;
          new(): SVGAnimatedBoolean;
      }
      
      interface SVGAnimatedEnumeration {
          animVal: number;
          baseVal: number;
      }
      
      declare var SVGAnimatedEnumeration: {
          prototype: SVGAnimatedEnumeration;
          new(): SVGAnimatedEnumeration;
      }
      
      interface SVGAnimatedInteger {
          animVal: number;
          baseVal: number;
      }
      
      declare var SVGAnimatedInteger: {
          prototype: SVGAnimatedInteger;
          new(): SVGAnimatedInteger;
      }
      
      interface SVGAnimatedLength {
          animVal: SVGLength;
          baseVal: SVGLength;
      }
      
      declare var SVGAnimatedLength: {
          prototype: SVGAnimatedLength;
          new(): SVGAnimatedLength;
      }
      
      interface SVGAnimatedLengthList {
          animVal: SVGLengthList;
          baseVal: SVGLengthList;
      }
      
      declare var SVGAnimatedLengthList: {
          prototype: SVGAnimatedLengthList;
          new(): SVGAnimatedLengthList;
      }
      
      interface SVGAnimatedNumber {
          animVal: number;
          baseVal: number;
      }
      
      declare var SVGAnimatedNumber: {
          prototype: SVGAnimatedNumber;
          new(): SVGAnimatedNumber;
      }
      
      interface SVGAnimatedNumberList {
          animVal: SVGNumberList;
          baseVal: SVGNumberList;
      }
      
      declare var SVGAnimatedNumberList: {
          prototype: SVGAnimatedNumberList;
          new(): SVGAnimatedNumberList;
      }
      
      interface SVGAnimatedPreserveAspectRatio {
          animVal: SVGPreserveAspectRatio;
          baseVal: SVGPreserveAspectRatio;
      }
      
      declare var SVGAnimatedPreserveAspectRatio: {
          prototype: SVGAnimatedPreserveAspectRatio;
          new(): SVGAnimatedPreserveAspectRatio;
      }
      
      interface SVGAnimatedRect {
          animVal: SVGRect;
          baseVal: SVGRect;
      }
      
      declare var SVGAnimatedRect: {
          prototype: SVGAnimatedRect;
          new(): SVGAnimatedRect;
      }
      
      interface SVGAnimatedString {
          animVal: string;
          baseVal: string;
      }
      
      declare var SVGAnimatedString: {
          prototype: SVGAnimatedString;
          new(): SVGAnimatedString;
      }
      
      interface SVGAnimatedTransformList {
          animVal: SVGTransformList;
          baseVal: SVGTransformList;
      }
      
      declare var SVGAnimatedTransformList: {
          prototype: SVGAnimatedTransformList;
          new(): SVGAnimatedTransformList;
      }
      
      interface SVGCircleElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {
          cx: SVGAnimatedLength;
          cy: SVGAnimatedLength;
          r: SVGAnimatedLength;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var SVGCircleElement: {
          prototype: SVGCircleElement;
          new(): SVGCircleElement;
      }
      
      interface SVGClipPathElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGUnitTypes {
          clipPathUnits: SVGAnimatedEnumeration;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var SVGClipPathElement: {
          prototype: SVGClipPathElement;
          new(): SVGClipPathElement;
      }
      
      interface SVGComponentTransferFunctionElement extends SVGElement {
          amplitude: SVGAnimatedNumber;
          exponent: SVGAnimatedNumber;
          intercept: SVGAnimatedNumber;
          offset: SVGAnimatedNumber;
          slope: SVGAnimatedNumber;
          tableValues: SVGAnimatedNumberList;
          type: SVGAnimatedEnumeration;
          SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE: number;
          SVG_FECOMPONENTTRANSFER_TYPE_GAMMA: number;
          SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY: number;
          SVG_FECOMPONENTTRANSFER_TYPE_LINEAR: number;
          SVG_FECOMPONENTTRANSFER_TYPE_TABLE: number;
          SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN: number;
      }
      
      declare var SVGComponentTransferFunctionElement: {
          prototype: SVGComponentTransferFunctionElement;
          new(): SVGComponentTransferFunctionElement;
          SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE: number;
          SVG_FECOMPONENTTRANSFER_TYPE_GAMMA: number;
          SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY: number;
          SVG_FECOMPONENTTRANSFER_TYPE_LINEAR: number;
          SVG_FECOMPONENTTRANSFER_TYPE_TABLE: number;
          SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN: number;
      }
      
      interface SVGDefsElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var SVGDefsElement: {
          prototype: SVGDefsElement;
          new(): SVGDefsElement;
      }
      
      interface SVGDescElement extends SVGElement, SVGStylable, SVGLangSpace {
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var SVGDescElement: {
          prototype: SVGDescElement;
          new(): SVGDescElement;
      }
      
      interface SVGElement extends Element {
          id: string;
          onclick: (ev: MouseEvent) => any;
          ondblclick: (ev: MouseEvent) => any;
          onfocusin: (ev: FocusEvent) => any;
          onfocusout: (ev: FocusEvent) => any;
          onload: (ev: Event) => any;
          onmousedown: (ev: MouseEvent) => any;
          onmousemove: (ev: MouseEvent) => any;
          onmouseout: (ev: MouseEvent) => any;
          onmouseover: (ev: MouseEvent) => any;
          onmouseup: (ev: MouseEvent) => any;
          ownerSVGElement: SVGSVGElement;
          viewportElement: SVGElement;
          xmlbase: string;
          addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureHold", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGotPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSInertiaStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSLostPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerCancel", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerDown", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerEnter", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerLeave", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerMove", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerOut", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerOver", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerUp", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "ariarequest", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "click", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "command", listener: (ev: CommandEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "dblclick", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "focusin", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "focusout", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "gotpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "lostpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mousedown", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mousemove", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mouseout", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mouseover", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mouseup", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointercancel", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerdown", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerenter", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerleave", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointermove", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerout", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerover", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerup", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "touchcancel", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "touchend", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "touchmove", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "touchstart", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "webkitfullscreenchange", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "webkitfullscreenerror", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var SVGElement: {
          prototype: SVGElement;
          new(): SVGElement;
      }
      
      interface SVGElementInstance extends EventTarget {
          childNodes: SVGElementInstanceList;
          correspondingElement: SVGElement;
          correspondingUseElement: SVGUseElement;
          firstChild: SVGElementInstance;
          lastChild: SVGElementInstance;
          nextSibling: SVGElementInstance;
          parentNode: SVGElementInstance;
          previousSibling: SVGElementInstance;
      }
      
      declare var SVGElementInstance: {
          prototype: SVGElementInstance;
          new(): SVGElementInstance;
      }
      
      interface SVGElementInstanceList {
          length: number;
          item(index: number): SVGElementInstance;
      }
      
      declare var SVGElementInstanceList: {
          prototype: SVGElementInstanceList;
          new(): SVGElementInstanceList;
      }
      
      interface SVGEllipseElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {
          cx: SVGAnimatedLength;
          cy: SVGAnimatedLength;
          rx: SVGAnimatedLength;
          ry: SVGAnimatedLength;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var SVGEllipseElement: {
          prototype: SVGEllipseElement;
          new(): SVGEllipseElement;
      }
      
      interface SVGFEBlendElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
          in1: SVGAnimatedString;
          in2: SVGAnimatedString;
          mode: SVGAnimatedEnumeration;
          SVG_FEBLEND_MODE_COLOR: number;
          SVG_FEBLEND_MODE_COLOR_BURN: number;
          SVG_FEBLEND_MODE_COLOR_DODGE: number;
          SVG_FEBLEND_MODE_DARKEN: number;
          SVG_FEBLEND_MODE_DIFFERENCE: number;
          SVG_FEBLEND_MODE_EXCLUSION: number;
          SVG_FEBLEND_MODE_HARD_LIGHT: number;
          SVG_FEBLEND_MODE_HUE: number;
          SVG_FEBLEND_MODE_LIGHTEN: number;
          SVG_FEBLEND_MODE_LUMINOSITY: number;
          SVG_FEBLEND_MODE_MULTIPLY: number;
          SVG_FEBLEND_MODE_NORMAL: number;
          SVG_FEBLEND_MODE_OVERLAY: number;
          SVG_FEBLEND_MODE_SATURATION: number;
          SVG_FEBLEND_MODE_SCREEN: number;
          SVG_FEBLEND_MODE_SOFT_LIGHT: number;
          SVG_FEBLEND_MODE_UNKNOWN: number;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var SVGFEBlendElement: {
          prototype: SVGFEBlendElement;
          new(): SVGFEBlendElement;
          SVG_FEBLEND_MODE_COLOR: number;
          SVG_FEBLEND_MODE_COLOR_BURN: number;
          SVG_FEBLEND_MODE_COLOR_DODGE: number;
          SVG_FEBLEND_MODE_DARKEN: number;
          SVG_FEBLEND_MODE_DIFFERENCE: number;
          SVG_FEBLEND_MODE_EXCLUSION: number;
          SVG_FEBLEND_MODE_HARD_LIGHT: number;
          SVG_FEBLEND_MODE_HUE: number;
          SVG_FEBLEND_MODE_LIGHTEN: number;
          SVG_FEBLEND_MODE_LUMINOSITY: number;
          SVG_FEBLEND_MODE_MULTIPLY: number;
          SVG_FEBLEND_MODE_NORMAL: number;
          SVG_FEBLEND_MODE_OVERLAY: number;
          SVG_FEBLEND_MODE_SATURATION: number;
          SVG_FEBLEND_MODE_SCREEN: number;
          SVG_FEBLEND_MODE_SOFT_LIGHT: number;
          SVG_FEBLEND_MODE_UNKNOWN: number;
      }
      
      interface SVGFEColorMatrixElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
          in1: SVGAnimatedString;
          type: SVGAnimatedEnumeration;
          values: SVGAnimatedNumberList;
          SVG_FECOLORMATRIX_TYPE_HUEROTATE: number;
          SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA: number;
          SVG_FECOLORMATRIX_TYPE_MATRIX: number;
          SVG_FECOLORMATRIX_TYPE_SATURATE: number;
          SVG_FECOLORMATRIX_TYPE_UNKNOWN: number;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var SVGFEColorMatrixElement: {
          prototype: SVGFEColorMatrixElement;
          new(): SVGFEColorMatrixElement;
          SVG_FECOLORMATRIX_TYPE_HUEROTATE: number;
          SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA: number;
          SVG_FECOLORMATRIX_TYPE_MATRIX: number;
          SVG_FECOLORMATRIX_TYPE_SATURATE: number;
          SVG_FECOLORMATRIX_TYPE_UNKNOWN: number;
      }
      
      interface SVGFEComponentTransferElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
          in1: SVGAnimatedString;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var SVGFEComponentTransferElement: {
          prototype: SVGFEComponentTransferElement;
          new(): SVGFEComponentTransferElement;
      }
      
      interface SVGFECompositeElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
          in1: SVGAnimatedString;
          in2: SVGAnimatedString;
          k1: SVGAnimatedNumber;
          k2: SVGAnimatedNumber;
          k3: SVGAnimatedNumber;
          k4: SVGAnimatedNumber;
          operator: SVGAnimatedEnumeration;
          SVG_FECOMPOSITE_OPERATOR_ARITHMETIC: number;
          SVG_FECOMPOSITE_OPERATOR_ATOP: number;
          SVG_FECOMPOSITE_OPERATOR_IN: number;
          SVG_FECOMPOSITE_OPERATOR_OUT: number;
          SVG_FECOMPOSITE_OPERATOR_OVER: number;
          SVG_FECOMPOSITE_OPERATOR_UNKNOWN: number;
          SVG_FECOMPOSITE_OPERATOR_XOR: number;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var SVGFECompositeElement: {
          prototype: SVGFECompositeElement;
          new(): SVGFECompositeElement;
          SVG_FECOMPOSITE_OPERATOR_ARITHMETIC: number;
          SVG_FECOMPOSITE_OPERATOR_ATOP: number;
          SVG_FECOMPOSITE_OPERATOR_IN: number;
          SVG_FECOMPOSITE_OPERATOR_OUT: number;
          SVG_FECOMPOSITE_OPERATOR_OVER: number;
          SVG_FECOMPOSITE_OPERATOR_UNKNOWN: number;
          SVG_FECOMPOSITE_OPERATOR_XOR: number;
      }
      
      interface SVGFEConvolveMatrixElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
          bias: SVGAnimatedNumber;
          divisor: SVGAnimatedNumber;
          edgeMode: SVGAnimatedEnumeration;
          in1: SVGAnimatedString;
          kernelMatrix: SVGAnimatedNumberList;
          kernelUnitLengthX: SVGAnimatedNumber;
          kernelUnitLengthY: SVGAnimatedNumber;
          orderX: SVGAnimatedInteger;
          orderY: SVGAnimatedInteger;
          preserveAlpha: SVGAnimatedBoolean;
          targetX: SVGAnimatedInteger;
          targetY: SVGAnimatedInteger;
          SVG_EDGEMODE_DUPLICATE: number;
          SVG_EDGEMODE_NONE: number;
          SVG_EDGEMODE_UNKNOWN: number;
          SVG_EDGEMODE_WRAP: number;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var SVGFEConvolveMatrixElement: {
          prototype: SVGFEConvolveMatrixElement;
          new(): SVGFEConvolveMatrixElement;
          SVG_EDGEMODE_DUPLICATE: number;
          SVG_EDGEMODE_NONE: number;
          SVG_EDGEMODE_UNKNOWN: number;
          SVG_EDGEMODE_WRAP: number;
      }
      
      interface SVGFEDiffuseLightingElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
          diffuseConstant: SVGAnimatedNumber;
          in1: SVGAnimatedString;
          kernelUnitLengthX: SVGAnimatedNumber;
          kernelUnitLengthY: SVGAnimatedNumber;
          surfaceScale: SVGAnimatedNumber;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var SVGFEDiffuseLightingElement: {
          prototype: SVGFEDiffuseLightingElement;
          new(): SVGFEDiffuseLightingElement;
      }
      
      interface SVGFEDisplacementMapElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
          in1: SVGAnimatedString;
          in2: SVGAnimatedString;
          scale: SVGAnimatedNumber;
          xChannelSelector: SVGAnimatedEnumeration;
          yChannelSelector: SVGAnimatedEnumeration;
          SVG_CHANNEL_A: number;
          SVG_CHANNEL_B: number;
          SVG_CHANNEL_G: number;
          SVG_CHANNEL_R: number;
          SVG_CHANNEL_UNKNOWN: number;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var SVGFEDisplacementMapElement: {
          prototype: SVGFEDisplacementMapElement;
          new(): SVGFEDisplacementMapElement;
          SVG_CHANNEL_A: number;
          SVG_CHANNEL_B: number;
          SVG_CHANNEL_G: number;
          SVG_CHANNEL_R: number;
          SVG_CHANNEL_UNKNOWN: number;
      }
      
      interface SVGFEDistantLightElement extends SVGElement {
          azimuth: SVGAnimatedNumber;
          elevation: SVGAnimatedNumber;
      }
      
      declare var SVGFEDistantLightElement: {
          prototype: SVGFEDistantLightElement;
          new(): SVGFEDistantLightElement;
      }
      
      interface SVGFEFloodElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var SVGFEFloodElement: {
          prototype: SVGFEFloodElement;
          new(): SVGFEFloodElement;
      }
      
      interface SVGFEFuncAElement extends SVGComponentTransferFunctionElement {
      }
      
      declare var SVGFEFuncAElement: {
          prototype: SVGFEFuncAElement;
          new(): SVGFEFuncAElement;
      }
      
      interface SVGFEFuncBElement extends SVGComponentTransferFunctionElement {
      }
      
      declare var SVGFEFuncBElement: {
          prototype: SVGFEFuncBElement;
          new(): SVGFEFuncBElement;
      }
      
      interface SVGFEFuncGElement extends SVGComponentTransferFunctionElement {
      }
      
      declare var SVGFEFuncGElement: {
          prototype: SVGFEFuncGElement;
          new(): SVGFEFuncGElement;
      }
      
      interface SVGFEFuncRElement extends SVGComponentTransferFunctionElement {
      }
      
      declare var SVGFEFuncRElement: {
          prototype: SVGFEFuncRElement;
          new(): SVGFEFuncRElement;
      }
      
      interface SVGFEGaussianBlurElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
          in1: SVGAnimatedString;
          stdDeviationX: SVGAnimatedNumber;
          stdDeviationY: SVGAnimatedNumber;
          setStdDeviation(stdDeviationX: number, stdDeviationY: number): void;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var SVGFEGaussianBlurElement: {
          prototype: SVGFEGaussianBlurElement;
          new(): SVGFEGaussianBlurElement;
      }
      
      interface SVGFEImageElement extends SVGElement, SVGFilterPrimitiveStandardAttributes, SVGLangSpace, SVGURIReference, SVGExternalResourcesRequired {
          preserveAspectRatio: SVGAnimatedPreserveAspectRatio;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var SVGFEImageElement: {
          prototype: SVGFEImageElement;
          new(): SVGFEImageElement;
      }
      
      interface SVGFEMergeElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var SVGFEMergeElement: {
          prototype: SVGFEMergeElement;
          new(): SVGFEMergeElement;
      }
      
      interface SVGFEMergeNodeElement extends SVGElement {
          in1: SVGAnimatedString;
      }
      
      declare var SVGFEMergeNodeElement: {
          prototype: SVGFEMergeNodeElement;
          new(): SVGFEMergeNodeElement;
      }
      
      interface SVGFEMorphologyElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
          in1: SVGAnimatedString;
          operator: SVGAnimatedEnumeration;
          radiusX: SVGAnimatedNumber;
          radiusY: SVGAnimatedNumber;
          SVG_MORPHOLOGY_OPERATOR_DILATE: number;
          SVG_MORPHOLOGY_OPERATOR_ERODE: number;
          SVG_MORPHOLOGY_OPERATOR_UNKNOWN: number;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var SVGFEMorphologyElement: {
          prototype: SVGFEMorphologyElement;
          new(): SVGFEMorphologyElement;
          SVG_MORPHOLOGY_OPERATOR_DILATE: number;
          SVG_MORPHOLOGY_OPERATOR_ERODE: number;
          SVG_MORPHOLOGY_OPERATOR_UNKNOWN: number;
      }
      
      interface SVGFEOffsetElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
          dx: SVGAnimatedNumber;
          dy: SVGAnimatedNumber;
          in1: SVGAnimatedString;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var SVGFEOffsetElement: {
          prototype: SVGFEOffsetElement;
          new(): SVGFEOffsetElement;
      }
      
      interface SVGFEPointLightElement extends SVGElement {
          x: SVGAnimatedNumber;
          y: SVGAnimatedNumber;
          z: SVGAnimatedNumber;
      }
      
      declare var SVGFEPointLightElement: {
          prototype: SVGFEPointLightElement;
          new(): SVGFEPointLightElement;
      }
      
      interface SVGFESpecularLightingElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
          in1: SVGAnimatedString;
          kernelUnitLengthX: SVGAnimatedNumber;
          kernelUnitLengthY: SVGAnimatedNumber;
          specularConstant: SVGAnimatedNumber;
          specularExponent: SVGAnimatedNumber;
          surfaceScale: SVGAnimatedNumber;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var SVGFESpecularLightingElement: {
          prototype: SVGFESpecularLightingElement;
          new(): SVGFESpecularLightingElement;
      }
      
      interface SVGFESpotLightElement extends SVGElement {
          limitingConeAngle: SVGAnimatedNumber;
          pointsAtX: SVGAnimatedNumber;
          pointsAtY: SVGAnimatedNumber;
          pointsAtZ: SVGAnimatedNumber;
          specularExponent: SVGAnimatedNumber;
          x: SVGAnimatedNumber;
          y: SVGAnimatedNumber;
          z: SVGAnimatedNumber;
      }
      
      declare var SVGFESpotLightElement: {
          prototype: SVGFESpotLightElement;
          new(): SVGFESpotLightElement;
      }
      
      interface SVGFETileElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
          in1: SVGAnimatedString;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var SVGFETileElement: {
          prototype: SVGFETileElement;
          new(): SVGFETileElement;
      }
      
      interface SVGFETurbulenceElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
          baseFrequencyX: SVGAnimatedNumber;
          baseFrequencyY: SVGAnimatedNumber;
          numOctaves: SVGAnimatedInteger;
          seed: SVGAnimatedNumber;
          stitchTiles: SVGAnimatedEnumeration;
          type: SVGAnimatedEnumeration;
          SVG_STITCHTYPE_NOSTITCH: number;
          SVG_STITCHTYPE_STITCH: number;
          SVG_STITCHTYPE_UNKNOWN: number;
          SVG_TURBULENCE_TYPE_FRACTALNOISE: number;
          SVG_TURBULENCE_TYPE_TURBULENCE: number;
          SVG_TURBULENCE_TYPE_UNKNOWN: number;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var SVGFETurbulenceElement: {
          prototype: SVGFETurbulenceElement;
          new(): SVGFETurbulenceElement;
          SVG_STITCHTYPE_NOSTITCH: number;
          SVG_STITCHTYPE_STITCH: number;
          SVG_STITCHTYPE_UNKNOWN: number;
          SVG_TURBULENCE_TYPE_FRACTALNOISE: number;
          SVG_TURBULENCE_TYPE_TURBULENCE: number;
          SVG_TURBULENCE_TYPE_UNKNOWN: number;
      }
      
      interface SVGFilterElement extends SVGElement, SVGUnitTypes, SVGStylable, SVGLangSpace, SVGURIReference, SVGExternalResourcesRequired {
          filterResX: SVGAnimatedInteger;
          filterResY: SVGAnimatedInteger;
          filterUnits: SVGAnimatedEnumeration;
          height: SVGAnimatedLength;
          primitiveUnits: SVGAnimatedEnumeration;
          width: SVGAnimatedLength;
          x: SVGAnimatedLength;
          y: SVGAnimatedLength;
          setFilterRes(filterResX: number, filterResY: number): void;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var SVGFilterElement: {
          prototype: SVGFilterElement;
          new(): SVGFilterElement;
      }
      
      interface SVGForeignObjectElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {
          height: SVGAnimatedLength;
          width: SVGAnimatedLength;
          x: SVGAnimatedLength;
          y: SVGAnimatedLength;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var SVGForeignObjectElement: {
          prototype: SVGForeignObjectElement;
          new(): SVGForeignObjectElement;
      }
      
      interface SVGGElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var SVGGElement: {
          prototype: SVGGElement;
          new(): SVGGElement;
      }
      
      interface SVGGradientElement extends SVGElement, SVGStylable, SVGExternalResourcesRequired, SVGURIReference, SVGUnitTypes {
          gradientTransform: SVGAnimatedTransformList;
          gradientUnits: SVGAnimatedEnumeration;
          spreadMethod: SVGAnimatedEnumeration;
          SVG_SPREADMETHOD_PAD: number;
          SVG_SPREADMETHOD_REFLECT: number;
          SVG_SPREADMETHOD_REPEAT: number;
          SVG_SPREADMETHOD_UNKNOWN: number;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var SVGGradientElement: {
          prototype: SVGGradientElement;
          new(): SVGGradientElement;
          SVG_SPREADMETHOD_PAD: number;
          SVG_SPREADMETHOD_REFLECT: number;
          SVG_SPREADMETHOD_REPEAT: number;
          SVG_SPREADMETHOD_UNKNOWN: number;
      }
      
      interface SVGImageElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGURIReference {
          height: SVGAnimatedLength;
          preserveAspectRatio: SVGAnimatedPreserveAspectRatio;
          width: SVGAnimatedLength;
          x: SVGAnimatedLength;
          y: SVGAnimatedLength;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var SVGImageElement: {
          prototype: SVGImageElement;
          new(): SVGImageElement;
      }
      
      interface SVGLength {
          unitType: number;
          value: number;
          valueAsString: string;
          valueInSpecifiedUnits: number;
          convertToSpecifiedUnits(unitType: number): void;
          newValueSpecifiedUnits(unitType: number, valueInSpecifiedUnits: number): void;
          SVG_LENGTHTYPE_CM: number;
          SVG_LENGTHTYPE_EMS: number;
          SVG_LENGTHTYPE_EXS: number;
          SVG_LENGTHTYPE_IN: number;
          SVG_LENGTHTYPE_MM: number;
          SVG_LENGTHTYPE_NUMBER: number;
          SVG_LENGTHTYPE_PC: number;
          SVG_LENGTHTYPE_PERCENTAGE: number;
          SVG_LENGTHTYPE_PT: number;
          SVG_LENGTHTYPE_PX: number;
          SVG_LENGTHTYPE_UNKNOWN: number;
      }
      
      declare var SVGLength: {
          prototype: SVGLength;
          new(): SVGLength;
          SVG_LENGTHTYPE_CM: number;
          SVG_LENGTHTYPE_EMS: number;
          SVG_LENGTHTYPE_EXS: number;
          SVG_LENGTHTYPE_IN: number;
          SVG_LENGTHTYPE_MM: number;
          SVG_LENGTHTYPE_NUMBER: number;
          SVG_LENGTHTYPE_PC: number;
          SVG_LENGTHTYPE_PERCENTAGE: number;
          SVG_LENGTHTYPE_PT: number;
          SVG_LENGTHTYPE_PX: number;
          SVG_LENGTHTYPE_UNKNOWN: number;
      }
      
      interface SVGLengthList {
          numberOfItems: number;
          appendItem(newItem: SVGLength): SVGLength;
          clear(): void;
          getItem(index: number): SVGLength;
          initialize(newItem: SVGLength): SVGLength;
          insertItemBefore(newItem: SVGLength, index: number): SVGLength;
          removeItem(index: number): SVGLength;
          replaceItem(newItem: SVGLength, index: number): SVGLength;
      }
      
      declare var SVGLengthList: {
          prototype: SVGLengthList;
          new(): SVGLengthList;
      }
      
      interface SVGLineElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {
          x1: SVGAnimatedLength;
          x2: SVGAnimatedLength;
          y1: SVGAnimatedLength;
          y2: SVGAnimatedLength;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var SVGLineElement: {
          prototype: SVGLineElement;
          new(): SVGLineElement;
      }
      
      interface SVGLinearGradientElement extends SVGGradientElement {
          x1: SVGAnimatedLength;
          x2: SVGAnimatedLength;
          y1: SVGAnimatedLength;
          y2: SVGAnimatedLength;
      }
      
      declare var SVGLinearGradientElement: {
          prototype: SVGLinearGradientElement;
          new(): SVGLinearGradientElement;
      }
      
      interface SVGMarkerElement extends SVGElement, SVGStylable, SVGLangSpace, SVGExternalResourcesRequired, SVGFitToViewBox {
          markerHeight: SVGAnimatedLength;
          markerUnits: SVGAnimatedEnumeration;
          markerWidth: SVGAnimatedLength;
          orientAngle: SVGAnimatedAngle;
          orientType: SVGAnimatedEnumeration;
          refX: SVGAnimatedLength;
          refY: SVGAnimatedLength;
          setOrientToAngle(angle: SVGAngle): void;
          setOrientToAuto(): void;
          SVG_MARKERUNITS_STROKEWIDTH: number;
          SVG_MARKERUNITS_UNKNOWN: number;
          SVG_MARKERUNITS_USERSPACEONUSE: number;
          SVG_MARKER_ORIENT_ANGLE: number;
          SVG_MARKER_ORIENT_AUTO: number;
          SVG_MARKER_ORIENT_UNKNOWN: number;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var SVGMarkerElement: {
          prototype: SVGMarkerElement;
          new(): SVGMarkerElement;
          SVG_MARKERUNITS_STROKEWIDTH: number;
          SVG_MARKERUNITS_UNKNOWN: number;
          SVG_MARKERUNITS_USERSPACEONUSE: number;
          SVG_MARKER_ORIENT_ANGLE: number;
          SVG_MARKER_ORIENT_AUTO: number;
          SVG_MARKER_ORIENT_UNKNOWN: number;
      }
      
      interface SVGMaskElement extends SVGElement, SVGStylable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGUnitTypes {
          height: SVGAnimatedLength;
          maskContentUnits: SVGAnimatedEnumeration;
          maskUnits: SVGAnimatedEnumeration;
          width: SVGAnimatedLength;
          x: SVGAnimatedLength;
          y: SVGAnimatedLength;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var SVGMaskElement: {
          prototype: SVGMaskElement;
          new(): SVGMaskElement;
      }
      
      interface SVGMatrix {
          a: number;
          b: number;
          c: number;
          d: number;
          e: number;
          f: number;
          flipX(): SVGMatrix;
          flipY(): SVGMatrix;
          inverse(): SVGMatrix;
          multiply(secondMatrix: SVGMatrix): SVGMatrix;
          rotate(angle: number): SVGMatrix;
          rotateFromVector(x: number, y: number): SVGMatrix;
          scale(scaleFactor: number): SVGMatrix;
          scaleNonUniform(scaleFactorX: number, scaleFactorY: number): SVGMatrix;
          skewX(angle: number): SVGMatrix;
          skewY(angle: number): SVGMatrix;
          translate(x: number, y: number): SVGMatrix;
      }
      
      declare var SVGMatrix: {
          prototype: SVGMatrix;
          new(): SVGMatrix;
      }
      
      interface SVGMetadataElement extends SVGElement {
      }
      
      declare var SVGMetadataElement: {
          prototype: SVGMetadataElement;
          new(): SVGMetadataElement;
      }
      
      interface SVGNumber {
          value: number;
      }
      
      declare var SVGNumber: {
          prototype: SVGNumber;
          new(): SVGNumber;
      }
      
      interface SVGNumberList {
          numberOfItems: number;
          appendItem(newItem: SVGNumber): SVGNumber;
          clear(): void;
          getItem(index: number): SVGNumber;
          initialize(newItem: SVGNumber): SVGNumber;
          insertItemBefore(newItem: SVGNumber, index: number): SVGNumber;
          removeItem(index: number): SVGNumber;
          replaceItem(newItem: SVGNumber, index: number): SVGNumber;
      }
      
      declare var SVGNumberList: {
          prototype: SVGNumberList;
          new(): SVGNumberList;
      }
      
      interface SVGPathElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGAnimatedPathData {
          createSVGPathSegArcAbs(x: number, y: number, r1: number, r2: number, angle: number, largeArcFlag: boolean, sweepFlag: boolean): SVGPathSegArcAbs;
          createSVGPathSegArcRel(x: number, y: number, r1: number, r2: number, angle: number, largeArcFlag: boolean, sweepFlag: boolean): SVGPathSegArcRel;
          createSVGPathSegClosePath(): SVGPathSegClosePath;
          createSVGPathSegCurvetoCubicAbs(x: number, y: number, x1: number, y1: number, x2: number, y2: number): SVGPathSegCurvetoCubicAbs;
          createSVGPathSegCurvetoCubicRel(x: number, y: number, x1: number, y1: number, x2: number, y2: number): SVGPathSegCurvetoCubicRel;
          createSVGPathSegCurvetoCubicSmoothAbs(x: number, y: number, x2: number, y2: number): SVGPathSegCurvetoCubicSmoothAbs;
          createSVGPathSegCurvetoCubicSmoothRel(x: number, y: number, x2: number, y2: number): SVGPathSegCurvetoCubicSmoothRel;
          createSVGPathSegCurvetoQuadraticAbs(x: number, y: number, x1: number, y1: number): SVGPathSegCurvetoQuadraticAbs;
          createSVGPathSegCurvetoQuadraticRel(x: number, y: number, x1: number, y1: number): SVGPathSegCurvetoQuadraticRel;
          createSVGPathSegCurvetoQuadraticSmoothAbs(x: number, y: number): SVGPathSegCurvetoQuadraticSmoothAbs;
          createSVGPathSegCurvetoQuadraticSmoothRel(x: number, y: number): SVGPathSegCurvetoQuadraticSmoothRel;
          createSVGPathSegLinetoAbs(x: number, y: number): SVGPathSegLinetoAbs;
          createSVGPathSegLinetoHorizontalAbs(x: number): SVGPathSegLinetoHorizontalAbs;
          createSVGPathSegLinetoHorizontalRel(x: number): SVGPathSegLinetoHorizontalRel;
          createSVGPathSegLinetoRel(x: number, y: number): SVGPathSegLinetoRel;
          createSVGPathSegLinetoVerticalAbs(y: number): SVGPathSegLinetoVerticalAbs;
          createSVGPathSegLinetoVerticalRel(y: number): SVGPathSegLinetoVerticalRel;
          createSVGPathSegMovetoAbs(x: number, y: number): SVGPathSegMovetoAbs;
          createSVGPathSegMovetoRel(x: number, y: number): SVGPathSegMovetoRel;
          getPathSegAtLength(distance: number): number;
          getPointAtLength(distance: number): SVGPoint;
          getTotalLength(): number;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var SVGPathElement: {
          prototype: SVGPathElement;
          new(): SVGPathElement;
      }
      
      interface SVGPathSeg {
          pathSegType: number;
          pathSegTypeAsLetter: string;
          PATHSEG_ARC_ABS: number;
          PATHSEG_ARC_REL: number;
          PATHSEG_CLOSEPATH: number;
          PATHSEG_CURVETO_CUBIC_ABS: number;
          PATHSEG_CURVETO_CUBIC_REL: number;
          PATHSEG_CURVETO_CUBIC_SMOOTH_ABS: number;
          PATHSEG_CURVETO_CUBIC_SMOOTH_REL: number;
          PATHSEG_CURVETO_QUADRATIC_ABS: number;
          PATHSEG_CURVETO_QUADRATIC_REL: number;
          PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS: number;
          PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL: number;
          PATHSEG_LINETO_ABS: number;
          PATHSEG_LINETO_HORIZONTAL_ABS: number;
          PATHSEG_LINETO_HORIZONTAL_REL: number;
          PATHSEG_LINETO_REL: number;
          PATHSEG_LINETO_VERTICAL_ABS: number;
          PATHSEG_LINETO_VERTICAL_REL: number;
          PATHSEG_MOVETO_ABS: number;
          PATHSEG_MOVETO_REL: number;
          PATHSEG_UNKNOWN: number;
      }
      
      declare var SVGPathSeg: {
          prototype: SVGPathSeg;
          new(): SVGPathSeg;
          PATHSEG_ARC_ABS: number;
          PATHSEG_ARC_REL: number;
          PATHSEG_CLOSEPATH: number;
          PATHSEG_CURVETO_CUBIC_ABS: number;
          PATHSEG_CURVETO_CUBIC_REL: number;
          PATHSEG_CURVETO_CUBIC_SMOOTH_ABS: number;
          PATHSEG_CURVETO_CUBIC_SMOOTH_REL: number;
          PATHSEG_CURVETO_QUADRATIC_ABS: number;
          PATHSEG_CURVETO_QUADRATIC_REL: number;
          PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS: number;
          PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL: number;
          PATHSEG_LINETO_ABS: number;
          PATHSEG_LINETO_HORIZONTAL_ABS: number;
          PATHSEG_LINETO_HORIZONTAL_REL: number;
          PATHSEG_LINETO_REL: number;
          PATHSEG_LINETO_VERTICAL_ABS: number;
          PATHSEG_LINETO_VERTICAL_REL: number;
          PATHSEG_MOVETO_ABS: number;
          PATHSEG_MOVETO_REL: number;
          PATHSEG_UNKNOWN: number;
      }
      
      interface SVGPathSegArcAbs extends SVGPathSeg {
          angle: number;
          largeArcFlag: boolean;
          r1: number;
          r2: number;
          sweepFlag: boolean;
          x: number;
          y: number;
      }
      
      declare var SVGPathSegArcAbs: {
          prototype: SVGPathSegArcAbs;
          new(): SVGPathSegArcAbs;
      }
      
      interface SVGPathSegArcRel extends SVGPathSeg {
          angle: number;
          largeArcFlag: boolean;
          r1: number;
          r2: number;
          sweepFlag: boolean;
          x: number;
          y: number;
      }
      
      declare var SVGPathSegArcRel: {
          prototype: SVGPathSegArcRel;
          new(): SVGPathSegArcRel;
      }
      
      interface SVGPathSegClosePath extends SVGPathSeg {
      }
      
      declare var SVGPathSegClosePath: {
          prototype: SVGPathSegClosePath;
          new(): SVGPathSegClosePath;
      }
      
      interface SVGPathSegCurvetoCubicAbs extends SVGPathSeg {
          x: number;
          x1: number;
          x2: number;
          y: number;
          y1: number;
          y2: number;
      }
      
      declare var SVGPathSegCurvetoCubicAbs: {
          prototype: SVGPathSegCurvetoCubicAbs;
          new(): SVGPathSegCurvetoCubicAbs;
      }
      
      interface SVGPathSegCurvetoCubicRel extends SVGPathSeg {
          x: number;
          x1: number;
          x2: number;
          y: number;
          y1: number;
          y2: number;
      }
      
      declare var SVGPathSegCurvetoCubicRel: {
          prototype: SVGPathSegCurvetoCubicRel;
          new(): SVGPathSegCurvetoCubicRel;
      }
      
      interface SVGPathSegCurvetoCubicSmoothAbs extends SVGPathSeg {
          x: number;
          x2: number;
          y: number;
          y2: number;
      }
      
      declare var SVGPathSegCurvetoCubicSmoothAbs: {
          prototype: SVGPathSegCurvetoCubicSmoothAbs;
          new(): SVGPathSegCurvetoCubicSmoothAbs;
      }
      
      interface SVGPathSegCurvetoCubicSmoothRel extends SVGPathSeg {
          x: number;
          x2: number;
          y: number;
          y2: number;
      }
      
      declare var SVGPathSegCurvetoCubicSmoothRel: {
          prototype: SVGPathSegCurvetoCubicSmoothRel;
          new(): SVGPathSegCurvetoCubicSmoothRel;
      }
      
      interface SVGPathSegCurvetoQuadraticAbs extends SVGPathSeg {
          x: number;
          x1: number;
          y: number;
          y1: number;
      }
      
      declare var SVGPathSegCurvetoQuadraticAbs: {
          prototype: SVGPathSegCurvetoQuadraticAbs;
          new(): SVGPathSegCurvetoQuadraticAbs;
      }
      
      interface SVGPathSegCurvetoQuadraticRel extends SVGPathSeg {
          x: number;
          x1: number;
          y: number;
          y1: number;
      }
      
      declare var SVGPathSegCurvetoQuadraticRel: {
          prototype: SVGPathSegCurvetoQuadraticRel;
          new(): SVGPathSegCurvetoQuadraticRel;
      }
      
      interface SVGPathSegCurvetoQuadraticSmoothAbs extends SVGPathSeg {
          x: number;
          y: number;
      }
      
      declare var SVGPathSegCurvetoQuadraticSmoothAbs: {
          prototype: SVGPathSegCurvetoQuadraticSmoothAbs;
          new(): SVGPathSegCurvetoQuadraticSmoothAbs;
      }
      
      interface SVGPathSegCurvetoQuadraticSmoothRel extends SVGPathSeg {
          x: number;
          y: number;
      }
      
      declare var SVGPathSegCurvetoQuadraticSmoothRel: {
          prototype: SVGPathSegCurvetoQuadraticSmoothRel;
          new(): SVGPathSegCurvetoQuadraticSmoothRel;
      }
      
      interface SVGPathSegLinetoAbs extends SVGPathSeg {
          x: number;
          y: number;
      }
      
      declare var SVGPathSegLinetoAbs: {
          prototype: SVGPathSegLinetoAbs;
          new(): SVGPathSegLinetoAbs;
      }
      
      interface SVGPathSegLinetoHorizontalAbs extends SVGPathSeg {
          x: number;
      }
      
      declare var SVGPathSegLinetoHorizontalAbs: {
          prototype: SVGPathSegLinetoHorizontalAbs;
          new(): SVGPathSegLinetoHorizontalAbs;
      }
      
      interface SVGPathSegLinetoHorizontalRel extends SVGPathSeg {
          x: number;
      }
      
      declare var SVGPathSegLinetoHorizontalRel: {
          prototype: SVGPathSegLinetoHorizontalRel;
          new(): SVGPathSegLinetoHorizontalRel;
      }
      
      interface SVGPathSegLinetoRel extends SVGPathSeg {
          x: number;
          y: number;
      }
      
      declare var SVGPathSegLinetoRel: {
          prototype: SVGPathSegLinetoRel;
          new(): SVGPathSegLinetoRel;
      }
      
      interface SVGPathSegLinetoVerticalAbs extends SVGPathSeg {
          y: number;
      }
      
      declare var SVGPathSegLinetoVerticalAbs: {
          prototype: SVGPathSegLinetoVerticalAbs;
          new(): SVGPathSegLinetoVerticalAbs;
      }
      
      interface SVGPathSegLinetoVerticalRel extends SVGPathSeg {
          y: number;
      }
      
      declare var SVGPathSegLinetoVerticalRel: {
          prototype: SVGPathSegLinetoVerticalRel;
          new(): SVGPathSegLinetoVerticalRel;
      }
      
      interface SVGPathSegList {
          numberOfItems: number;
          appendItem(newItem: SVGPathSeg): SVGPathSeg;
          clear(): void;
          getItem(index: number): SVGPathSeg;
          initialize(newItem: SVGPathSeg): SVGPathSeg;
          insertItemBefore(newItem: SVGPathSeg, index: number): SVGPathSeg;
          removeItem(index: number): SVGPathSeg;
          replaceItem(newItem: SVGPathSeg, index: number): SVGPathSeg;
      }
      
      declare var SVGPathSegList: {
          prototype: SVGPathSegList;
          new(): SVGPathSegList;
      }
      
      interface SVGPathSegMovetoAbs extends SVGPathSeg {
          x: number;
          y: number;
      }
      
      declare var SVGPathSegMovetoAbs: {
          prototype: SVGPathSegMovetoAbs;
          new(): SVGPathSegMovetoAbs;
      }
      
      interface SVGPathSegMovetoRel extends SVGPathSeg {
          x: number;
          y: number;
      }
      
      declare var SVGPathSegMovetoRel: {
          prototype: SVGPathSegMovetoRel;
          new(): SVGPathSegMovetoRel;
      }
      
      interface SVGPatternElement extends SVGElement, SVGStylable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGFitToViewBox, SVGURIReference, SVGUnitTypes {
          height: SVGAnimatedLength;
          patternContentUnits: SVGAnimatedEnumeration;
          patternTransform: SVGAnimatedTransformList;
          patternUnits: SVGAnimatedEnumeration;
          width: SVGAnimatedLength;
          x: SVGAnimatedLength;
          y: SVGAnimatedLength;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var SVGPatternElement: {
          prototype: SVGPatternElement;
          new(): SVGPatternElement;
      }
      
      interface SVGPoint {
          x: number;
          y: number;
          matrixTransform(matrix: SVGMatrix): SVGPoint;
      }
      
      declare var SVGPoint: {
          prototype: SVGPoint;
          new(): SVGPoint;
      }
      
      interface SVGPointList {
          numberOfItems: number;
          appendItem(newItem: SVGPoint): SVGPoint;
          clear(): void;
          getItem(index: number): SVGPoint;
          initialize(newItem: SVGPoint): SVGPoint;
          insertItemBefore(newItem: SVGPoint, index: number): SVGPoint;
          removeItem(index: number): SVGPoint;
          replaceItem(newItem: SVGPoint, index: number): SVGPoint;
      }
      
      declare var SVGPointList: {
          prototype: SVGPointList;
          new(): SVGPointList;
      }
      
      interface SVGPolygonElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGAnimatedPoints {
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var SVGPolygonElement: {
          prototype: SVGPolygonElement;
          new(): SVGPolygonElement;
      }
      
      interface SVGPolylineElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGAnimatedPoints {
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var SVGPolylineElement: {
          prototype: SVGPolylineElement;
          new(): SVGPolylineElement;
      }
      
      interface SVGPreserveAspectRatio {
          align: number;
          meetOrSlice: number;
          SVG_MEETORSLICE_MEET: number;
          SVG_MEETORSLICE_SLICE: number;
          SVG_MEETORSLICE_UNKNOWN: number;
          SVG_PRESERVEASPECTRATIO_NONE: number;
          SVG_PRESERVEASPECTRATIO_UNKNOWN: number;
          SVG_PRESERVEASPECTRATIO_XMAXYMAX: number;
          SVG_PRESERVEASPECTRATIO_XMAXYMID: number;
          SVG_PRESERVEASPECTRATIO_XMAXYMIN: number;
          SVG_PRESERVEASPECTRATIO_XMIDYMAX: number;
          SVG_PRESERVEASPECTRATIO_XMIDYMID: number;
          SVG_PRESERVEASPECTRATIO_XMIDYMIN: number;
          SVG_PRESERVEASPECTRATIO_XMINYMAX: number;
          SVG_PRESERVEASPECTRATIO_XMINYMID: number;
          SVG_PRESERVEASPECTRATIO_XMINYMIN: number;
      }
      
      declare var SVGPreserveAspectRatio: {
          prototype: SVGPreserveAspectRatio;
          new(): SVGPreserveAspectRatio;
          SVG_MEETORSLICE_MEET: number;
          SVG_MEETORSLICE_SLICE: number;
          SVG_MEETORSLICE_UNKNOWN: number;
          SVG_PRESERVEASPECTRATIO_NONE: number;
          SVG_PRESERVEASPECTRATIO_UNKNOWN: number;
          SVG_PRESERVEASPECTRATIO_XMAXYMAX: number;
          SVG_PRESERVEASPECTRATIO_XMAXYMID: number;
          SVG_PRESERVEASPECTRATIO_XMAXYMIN: number;
          SVG_PRESERVEASPECTRATIO_XMIDYMAX: number;
          SVG_PRESERVEASPECTRATIO_XMIDYMID: number;
          SVG_PRESERVEASPECTRATIO_XMIDYMIN: number;
          SVG_PRESERVEASPECTRATIO_XMINYMAX: number;
          SVG_PRESERVEASPECTRATIO_XMINYMID: number;
          SVG_PRESERVEASPECTRATIO_XMINYMIN: number;
      }
      
      interface SVGRadialGradientElement extends SVGGradientElement {
          cx: SVGAnimatedLength;
          cy: SVGAnimatedLength;
          fx: SVGAnimatedLength;
          fy: SVGAnimatedLength;
          r: SVGAnimatedLength;
      }
      
      declare var SVGRadialGradientElement: {
          prototype: SVGRadialGradientElement;
          new(): SVGRadialGradientElement;
      }
      
      interface SVGRect {
          height: number;
          width: number;
          x: number;
          y: number;
      }
      
      declare var SVGRect: {
          prototype: SVGRect;
          new(): SVGRect;
      }
      
      interface SVGRectElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {
          height: SVGAnimatedLength;
          rx: SVGAnimatedLength;
          ry: SVGAnimatedLength;
          width: SVGAnimatedLength;
          x: SVGAnimatedLength;
          y: SVGAnimatedLength;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var SVGRectElement: {
          prototype: SVGRectElement;
          new(): SVGRectElement;
      }
      
      interface SVGSVGElement extends SVGElement, DocumentEvent, SVGLocatable, SVGTests, SVGStylable, SVGLangSpace, SVGExternalResourcesRequired, SVGFitToViewBox, SVGZoomAndPan {
          contentScriptType: string;
          contentStyleType: string;
          currentScale: number;
          currentTranslate: SVGPoint;
          height: SVGAnimatedLength;
          onabort: (ev: Event) => any;
          onerror: (ev: Event) => any;
          onresize: (ev: UIEvent) => any;
          onscroll: (ev: UIEvent) => any;
          onunload: (ev: Event) => any;
          onzoom: (ev: SVGZoomEvent) => any;
          pixelUnitToMillimeterX: number;
          pixelUnitToMillimeterY: number;
          screenPixelToMillimeterX: number;
          screenPixelToMillimeterY: number;
          viewport: SVGRect;
          width: SVGAnimatedLength;
          x: SVGAnimatedLength;
          y: SVGAnimatedLength;
          checkEnclosure(element: SVGElement, rect: SVGRect): boolean;
          checkIntersection(element: SVGElement, rect: SVGRect): boolean;
          createSVGAngle(): SVGAngle;
          createSVGLength(): SVGLength;
          createSVGMatrix(): SVGMatrix;
          createSVGNumber(): SVGNumber;
          createSVGPoint(): SVGPoint;
          createSVGRect(): SVGRect;
          createSVGTransform(): SVGTransform;
          createSVGTransformFromMatrix(matrix: SVGMatrix): SVGTransform;
          deselectAll(): void;
          forceRedraw(): void;
          getComputedStyle(elt: Element, pseudoElt?: string): CSSStyleDeclaration;
          getCurrentTime(): number;
          getElementById(elementId: string): Element;
          getEnclosureList(rect: SVGRect, referenceElement: SVGElement): NodeList;
          getIntersectionList(rect: SVGRect, referenceElement: SVGElement): NodeList;
          pauseAnimations(): void;
          setCurrentTime(seconds: number): void;
          suspendRedraw(maxWaitMilliseconds: number): number;
          unpauseAnimations(): void;
          unsuspendRedraw(suspendHandleID: number): void;
          unsuspendRedrawAll(): void;
          addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureHold", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGotPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSInertiaStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSLostPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerCancel", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerDown", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerEnter", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerLeave", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerMove", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerOut", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerOver", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerUp", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "SVGAbort", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "SVGError", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "SVGUnload", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "SVGZoom", listener: (ev: SVGZoomEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "ariarequest", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "click", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "command", listener: (ev: CommandEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "dblclick", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "focusin", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "focusout", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "gotpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "lostpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mousedown", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mousemove", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mouseout", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mouseover", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mouseup", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointercancel", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerdown", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerenter", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerleave", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointermove", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerout", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerover", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerup", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "resize", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "scroll", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "touchcancel", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "touchend", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "touchmove", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "touchstart", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "webkitfullscreenchange", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "webkitfullscreenerror", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var SVGSVGElement: {
          prototype: SVGSVGElement;
          new(): SVGSVGElement;
      }
      
      interface SVGScriptElement extends SVGElement, SVGExternalResourcesRequired, SVGURIReference {
          type: string;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var SVGScriptElement: {
          prototype: SVGScriptElement;
          new(): SVGScriptElement;
      }
      
      interface SVGStopElement extends SVGElement, SVGStylable {
          offset: SVGAnimatedNumber;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var SVGStopElement: {
          prototype: SVGStopElement;
          new(): SVGStopElement;
      }
      
      interface SVGStringList {
          numberOfItems: number;
          appendItem(newItem: string): string;
          clear(): void;
          getItem(index: number): string;
          initialize(newItem: string): string;
          insertItemBefore(newItem: string, index: number): string;
          removeItem(index: number): string;
          replaceItem(newItem: string, index: number): string;
      }
      
      declare var SVGStringList: {
          prototype: SVGStringList;
          new(): SVGStringList;
      }
      
      interface SVGStyleElement extends SVGElement, SVGLangSpace {
          media: string;
          title: string;
          type: string;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var SVGStyleElement: {
          prototype: SVGStyleElement;
          new(): SVGStyleElement;
      }
      
      interface SVGSwitchElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var SVGSwitchElement: {
          prototype: SVGSwitchElement;
          new(): SVGSwitchElement;
      }
      
      interface SVGSymbolElement extends SVGElement, SVGStylable, SVGLangSpace, SVGExternalResourcesRequired, SVGFitToViewBox {
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var SVGSymbolElement: {
          prototype: SVGSymbolElement;
          new(): SVGSymbolElement;
      }
      
      interface SVGTSpanElement extends SVGTextPositioningElement {
      }
      
      declare var SVGTSpanElement: {
          prototype: SVGTSpanElement;
          new(): SVGTSpanElement;
      }
      
      interface SVGTextContentElement extends SVGElement, SVGStylable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {
          lengthAdjust: SVGAnimatedEnumeration;
          textLength: SVGAnimatedLength;
          getCharNumAtPosition(point: SVGPoint): number;
          getComputedTextLength(): number;
          getEndPositionOfChar(charnum: number): SVGPoint;
          getExtentOfChar(charnum: number): SVGRect;
          getNumberOfChars(): number;
          getRotationOfChar(charnum: number): number;
          getStartPositionOfChar(charnum: number): SVGPoint;
          getSubStringLength(charnum: number, nchars: number): number;
          selectSubString(charnum: number, nchars: number): void;
          LENGTHADJUST_SPACING: number;
          LENGTHADJUST_SPACINGANDGLYPHS: number;
          LENGTHADJUST_UNKNOWN: number;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var SVGTextContentElement: {
          prototype: SVGTextContentElement;
          new(): SVGTextContentElement;
          LENGTHADJUST_SPACING: number;
          LENGTHADJUST_SPACINGANDGLYPHS: number;
          LENGTHADJUST_UNKNOWN: number;
      }
      
      interface SVGTextElement extends SVGTextPositioningElement, SVGTransformable {
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var SVGTextElement: {
          prototype: SVGTextElement;
          new(): SVGTextElement;
      }
      
      interface SVGTextPathElement extends SVGTextContentElement, SVGURIReference {
          method: SVGAnimatedEnumeration;
          spacing: SVGAnimatedEnumeration;
          startOffset: SVGAnimatedLength;
          TEXTPATH_METHODTYPE_ALIGN: number;
          TEXTPATH_METHODTYPE_STRETCH: number;
          TEXTPATH_METHODTYPE_UNKNOWN: number;
          TEXTPATH_SPACINGTYPE_AUTO: number;
          TEXTPATH_SPACINGTYPE_EXACT: number;
          TEXTPATH_SPACINGTYPE_UNKNOWN: number;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var SVGTextPathElement: {
          prototype: SVGTextPathElement;
          new(): SVGTextPathElement;
          TEXTPATH_METHODTYPE_ALIGN: number;
          TEXTPATH_METHODTYPE_STRETCH: number;
          TEXTPATH_METHODTYPE_UNKNOWN: number;
          TEXTPATH_SPACINGTYPE_AUTO: number;
          TEXTPATH_SPACINGTYPE_EXACT: number;
          TEXTPATH_SPACINGTYPE_UNKNOWN: number;
      }
      
      interface SVGTextPositioningElement extends SVGTextContentElement {
          dx: SVGAnimatedLengthList;
          dy: SVGAnimatedLengthList;
          rotate: SVGAnimatedNumberList;
          x: SVGAnimatedLengthList;
          y: SVGAnimatedLengthList;
      }
      
      declare var SVGTextPositioningElement: {
          prototype: SVGTextPositioningElement;
          new(): SVGTextPositioningElement;
      }
      
      interface SVGTitleElement extends SVGElement, SVGStylable, SVGLangSpace {
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var SVGTitleElement: {
          prototype: SVGTitleElement;
          new(): SVGTitleElement;
      }
      
      interface SVGTransform {
          angle: number;
          matrix: SVGMatrix;
          type: number;
          setMatrix(matrix: SVGMatrix): void;
          setRotate(angle: number, cx: number, cy: number): void;
          setScale(sx: number, sy: number): void;
          setSkewX(angle: number): void;
          setSkewY(angle: number): void;
          setTranslate(tx: number, ty: number): void;
          SVG_TRANSFORM_MATRIX: number;
          SVG_TRANSFORM_ROTATE: number;
          SVG_TRANSFORM_SCALE: number;
          SVG_TRANSFORM_SKEWX: number;
          SVG_TRANSFORM_SKEWY: number;
          SVG_TRANSFORM_TRANSLATE: number;
          SVG_TRANSFORM_UNKNOWN: number;
      }
      
      declare var SVGTransform: {
          prototype: SVGTransform;
          new(): SVGTransform;
          SVG_TRANSFORM_MATRIX: number;
          SVG_TRANSFORM_ROTATE: number;
          SVG_TRANSFORM_SCALE: number;
          SVG_TRANSFORM_SKEWX: number;
          SVG_TRANSFORM_SKEWY: number;
          SVG_TRANSFORM_TRANSLATE: number;
          SVG_TRANSFORM_UNKNOWN: number;
      }
      
      interface SVGTransformList {
          numberOfItems: number;
          appendItem(newItem: SVGTransform): SVGTransform;
          clear(): void;
          consolidate(): SVGTransform;
          createSVGTransformFromMatrix(matrix: SVGMatrix): SVGTransform;
          getItem(index: number): SVGTransform;
          initialize(newItem: SVGTransform): SVGTransform;
          insertItemBefore(newItem: SVGTransform, index: number): SVGTransform;
          removeItem(index: number): SVGTransform;
          replaceItem(newItem: SVGTransform, index: number): SVGTransform;
      }
      
      declare var SVGTransformList: {
          prototype: SVGTransformList;
          new(): SVGTransformList;
      }
      
      interface SVGUnitTypes {
          SVG_UNIT_TYPE_OBJECTBOUNDINGBOX: number;
          SVG_UNIT_TYPE_UNKNOWN: number;
          SVG_UNIT_TYPE_USERSPACEONUSE: number;
      }
      declare var SVGUnitTypes: SVGUnitTypes;
      
      interface SVGUseElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGURIReference {
          animatedInstanceRoot: SVGElementInstance;
          height: SVGAnimatedLength;
          instanceRoot: SVGElementInstance;
          width: SVGAnimatedLength;
          x: SVGAnimatedLength;
          y: SVGAnimatedLength;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var SVGUseElement: {
          prototype: SVGUseElement;
          new(): SVGUseElement;
      }
      
      interface SVGViewElement extends SVGElement, SVGExternalResourcesRequired, SVGFitToViewBox, SVGZoomAndPan {
          viewTarget: SVGStringList;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var SVGViewElement: {
          prototype: SVGViewElement;
          new(): SVGViewElement;
      }
      
      interface SVGZoomAndPan {
          SVG_ZOOMANDPAN_DISABLE: number;
          SVG_ZOOMANDPAN_MAGNIFY: number;
          SVG_ZOOMANDPAN_UNKNOWN: number;
      }
      declare var SVGZoomAndPan: SVGZoomAndPan;
      
      interface SVGZoomEvent extends UIEvent {
          newScale: number;
          newTranslate: SVGPoint;
          previousScale: number;
          previousTranslate: SVGPoint;
          zoomRectScreen: SVGRect;
      }
      
      declare var SVGZoomEvent: {
          prototype: SVGZoomEvent;
          new(): SVGZoomEvent;
      }
      
      interface Screen extends EventTarget {
          availHeight: number;
          availWidth: number;
          bufferDepth: number;
          colorDepth: number;
          deviceXDPI: number;
          deviceYDPI: number;
          fontSmoothingEnabled: boolean;
          height: number;
          logicalXDPI: number;
          logicalYDPI: number;
          msOrientation: string;
          onmsorientationchange: (ev: Event) => any;
          pixelDepth: number;
          systemXDPI: number;
          systemYDPI: number;
          width: number;
          msLockOrientation(orientations: string): boolean;
          msLockOrientation(orientations: string[]): boolean;
          msUnlockOrientation(): void;
          addEventListener(type: "MSOrientationChange", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var Screen: {
          prototype: Screen;
          new(): Screen;
      }
      
      interface ScriptNotifyEvent extends Event {
          callingUri: string;
          value: string;
      }
      
      declare var ScriptNotifyEvent: {
          prototype: ScriptNotifyEvent;
          new(): ScriptNotifyEvent;
      }
      
      interface ScriptProcessorNode extends AudioNode {
          bufferSize: number;
          onaudioprocess: (ev: AudioProcessingEvent) => any;
          addEventListener(type: "audioprocess", listener: (ev: AudioProcessingEvent) => any, useCapture?: boolean): void;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var ScriptProcessorNode: {
          prototype: ScriptProcessorNode;
          new(): ScriptProcessorNode;
      }
      
      interface Selection {
          anchorNode: Node;
          anchorOffset: number;
          focusNode: Node;
          focusOffset: number;
          isCollapsed: boolean;
          rangeCount: number;
          type: string;
          addRange(range: Range): void;
          collapse(parentNode: Node, offset: number): void;
          collapseToEnd(): void;
          collapseToStart(): void;
          containsNode(node: Node, partlyContained: boolean): boolean;
          deleteFromDocument(): void;
          empty(): void;
          extend(newNode: Node, offset: number): void;
          getRangeAt(index: number): Range;
          removeAllRanges(): void;
          removeRange(range: Range): void;
          selectAllChildren(parentNode: Node): void;
          setBaseAndExtent(baseNode: Node, baseOffset: number, extentNode: Node, extentOffset: number): void;
          toString(): string;
      }
      
      declare var Selection: {
          prototype: Selection;
          new(): Selection;
      }
      
      interface SourceBuffer extends EventTarget {
          appendWindowEnd: number;
          appendWindowStart: number;
          audioTracks: AudioTrackList;
          buffered: TimeRanges;
          mode: string;
          timestampOffset: number;
          updating: boolean;
          videoTracks: VideoTrackList;
          abort(): void;
          appendBuffer(data: ArrayBuffer): void;
          appendBuffer(data: ArrayBufferView): void;
          appendStream(stream: MSStream, maxSize?: number): void;
          remove(start: number, end: number): void;
      }
      
      declare var SourceBuffer: {
          prototype: SourceBuffer;
          new(): SourceBuffer;
      }
      
      interface SourceBufferList extends EventTarget {
          length: number;
          item(index: number): SourceBuffer;
          [index: number]: SourceBuffer;
      }
      
      declare var SourceBufferList: {
          prototype: SourceBufferList;
          new(): SourceBufferList;
      }
      
      interface StereoPannerNode extends AudioNode {
          pan: AudioParam;
      }
      
      declare var StereoPannerNode: {
          prototype: StereoPannerNode;
          new(): StereoPannerNode;
      }
      
      interface Storage {
          length: number;
          clear(): void;
          getItem(key: string): any;
          key(index: number): string;
          removeItem(key: string): void;
          setItem(key: string, data: string): void;
          [key: string]: any;
          [index: number]: string;
      }
      
      declare var Storage: {
          prototype: Storage;
          new(): Storage;
      }
      
      interface StorageEvent extends Event {
          key: string;
          newValue: any;
          oldValue: any;
          storageArea: Storage;
          url: string;
          initStorageEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, keyArg: string, oldValueArg: any, newValueArg: any, urlArg: string, storageAreaArg: Storage): void;
      }
      
      declare var StorageEvent: {
          prototype: StorageEvent;
          new(): StorageEvent;
      }
      
      interface StyleMedia {
          type: string;
          matchMedium(mediaquery: string): boolean;
      }
      
      declare var StyleMedia: {
          prototype: StyleMedia;
          new(): StyleMedia;
      }
      
      interface StyleSheet {
          disabled: boolean;
          href: string;
          media: MediaList;
          ownerNode: Node;
          parentStyleSheet: StyleSheet;
          title: string;
          type: string;
      }
      
      declare var StyleSheet: {
          prototype: StyleSheet;
          new(): StyleSheet;
      }
      
      interface StyleSheetList {
          length: number;
          item(index?: number): StyleSheet;
          [index: number]: StyleSheet;
      }
      
      declare var StyleSheetList: {
          prototype: StyleSheetList;
          new(): StyleSheetList;
      }
      
      interface StyleSheetPageList {
          length: number;
          item(index: number): CSSPageRule;
          [index: number]: CSSPageRule;
      }
      
      declare var StyleSheetPageList: {
          prototype: StyleSheetPageList;
          new(): StyleSheetPageList;
      }
      
      interface SubtleCrypto {
          decrypt(algorithm: string, key: CryptoKey, data: ArrayBufferView): any;
          decrypt(algorithm: Algorithm, key: CryptoKey, data: ArrayBufferView): any;
          deriveBits(algorithm: string, baseKey: CryptoKey, length: number): any;
          deriveBits(algorithm: Algorithm, baseKey: CryptoKey, length: number): any;
          deriveKey(algorithm: string, baseKey: CryptoKey, derivedKeyType: string, extractable: boolean, keyUsages: string[]): any;
          deriveKey(algorithm: string, baseKey: CryptoKey, derivedKeyType: Algorithm, extractable: boolean, keyUsages: string[]): any;
          deriveKey(algorithm: Algorithm, baseKey: CryptoKey, derivedKeyType: string, extractable: boolean, keyUsages: string[]): any;
          deriveKey(algorithm: Algorithm, baseKey: CryptoKey, derivedKeyType: Algorithm, extractable: boolean, keyUsages: string[]): any;
          digest(algorithm: string, data: ArrayBufferView): any;
          digest(algorithm: Algorithm, data: ArrayBufferView): any;
          encrypt(algorithm: string, key: CryptoKey, data: ArrayBufferView): any;
          encrypt(algorithm: Algorithm, key: CryptoKey, data: ArrayBufferView): any;
          exportKey(format: string, key: CryptoKey): any;
          generateKey(algorithm: string, extractable: boolean, keyUsages: string[]): any;
          generateKey(algorithm: Algorithm, extractable: boolean, keyUsages: string[]): any;
          importKey(format: string, keyData: ArrayBufferView, algorithm: string, extractable: boolean, keyUsages: string[]): any;
          importKey(format: string, keyData: ArrayBufferView, algorithm: Algorithm, extractable: boolean, keyUsages: string[]): any;
          sign(algorithm: string, key: CryptoKey, data: ArrayBufferView): any;
          sign(algorithm: Algorithm, key: CryptoKey, data: ArrayBufferView): any;
          unwrapKey(format: string, wrappedKey: ArrayBufferView, unwrappingKey: CryptoKey, unwrapAlgorithm: string, unwrappedKeyAlgorithm: string, extractable: boolean, keyUsages: string[]): any;
          unwrapKey(format: string, wrappedKey: ArrayBufferView, unwrappingKey: CryptoKey, unwrapAlgorithm: string, unwrappedKeyAlgorithm: Algorithm, extractable: boolean, keyUsages: string[]): any;
          unwrapKey(format: string, wrappedKey: ArrayBufferView, unwrappingKey: CryptoKey, unwrapAlgorithm: Algorithm, unwrappedKeyAlgorithm: string, extractable: boolean, keyUsages: string[]): any;
          unwrapKey(format: string, wrappedKey: ArrayBufferView, unwrappingKey: CryptoKey, unwrapAlgorithm: Algorithm, unwrappedKeyAlgorithm: Algorithm, extractable: boolean, keyUsages: string[]): any;
          verify(algorithm: string, key: CryptoKey, signature: ArrayBufferView, data: ArrayBufferView): any;
          verify(algorithm: Algorithm, key: CryptoKey, signature: ArrayBufferView, data: ArrayBufferView): any;
          wrapKey(format: string, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: string): any;
          wrapKey(format: string, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: Algorithm): any;
      }
      
      declare var SubtleCrypto: {
          prototype: SubtleCrypto;
          new(): SubtleCrypto;
      }
      
      interface Text extends CharacterData {
          wholeText: string;
          replaceWholeText(content: string): Text;
          splitText(offset: number): Text;
      }
      
      declare var Text: {
          prototype: Text;
          new(): Text;
      }
      
      interface TextEvent extends UIEvent {
          data: string;
          inputMethod: number;
          locale: string;
          initTextEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, dataArg: string, inputMethod: number, locale: string): void;
          DOM_INPUT_METHOD_DROP: number;
          DOM_INPUT_METHOD_HANDWRITING: number;
          DOM_INPUT_METHOD_IME: number;
          DOM_INPUT_METHOD_KEYBOARD: number;
          DOM_INPUT_METHOD_MULTIMODAL: number;
          DOM_INPUT_METHOD_OPTION: number;
          DOM_INPUT_METHOD_PASTE: number;
          DOM_INPUT_METHOD_SCRIPT: number;
          DOM_INPUT_METHOD_UNKNOWN: number;
          DOM_INPUT_METHOD_VOICE: number;
      }
      
      declare var TextEvent: {
          prototype: TextEvent;
          new(): TextEvent;
          DOM_INPUT_METHOD_DROP: number;
          DOM_INPUT_METHOD_HANDWRITING: number;
          DOM_INPUT_METHOD_IME: number;
          DOM_INPUT_METHOD_KEYBOARD: number;
          DOM_INPUT_METHOD_MULTIMODAL: number;
          DOM_INPUT_METHOD_OPTION: number;
          DOM_INPUT_METHOD_PASTE: number;
          DOM_INPUT_METHOD_SCRIPT: number;
          DOM_INPUT_METHOD_UNKNOWN: number;
          DOM_INPUT_METHOD_VOICE: number;
      }
      
      interface TextMetrics {
          width: number;
      }
      
      declare var TextMetrics: {
          prototype: TextMetrics;
          new(): TextMetrics;
      }
      
      interface TextRange {
          boundingHeight: number;
          boundingLeft: number;
          boundingTop: number;
          boundingWidth: number;
          htmlText: string;
          offsetLeft: number;
          offsetTop: number;
          text: string;
          collapse(start?: boolean): void;
          compareEndPoints(how: string, sourceRange: TextRange): number;
          duplicate(): TextRange;
          execCommand(cmdID: string, showUI?: boolean, value?: any): boolean;
          execCommandShowHelp(cmdID: string): boolean;
          expand(Unit: string): boolean;
          findText(string: string, count?: number, flags?: number): boolean;
          getBookmark(): string;
          getBoundingClientRect(): ClientRect;
          getClientRects(): ClientRectList;
          inRange(range: TextRange): boolean;
          isEqual(range: TextRange): boolean;
          move(unit: string, count?: number): number;
          moveEnd(unit: string, count?: number): number;
          moveStart(unit: string, count?: number): number;
          moveToBookmark(bookmark: string): boolean;
          moveToElementText(element: Element): void;
          moveToPoint(x: number, y: number): void;
          parentElement(): Element;
          pasteHTML(html: string): void;
          queryCommandEnabled(cmdID: string): boolean;
          queryCommandIndeterm(cmdID: string): boolean;
          queryCommandState(cmdID: string): boolean;
          queryCommandSupported(cmdID: string): boolean;
          queryCommandText(cmdID: string): string;
          queryCommandValue(cmdID: string): any;
          scrollIntoView(fStart?: boolean): void;
          select(): void;
          setEndPoint(how: string, SourceRange: TextRange): void;
      }
      
      declare var TextRange: {
          prototype: TextRange;
          new(): TextRange;
      }
      
      interface TextRangeCollection {
          length: number;
          item(index: number): TextRange;
          [index: number]: TextRange;
      }
      
      declare var TextRangeCollection: {
          prototype: TextRangeCollection;
          new(): TextRangeCollection;
      }
      
      interface TextTrack extends EventTarget {
          activeCues: TextTrackCueList;
          cues: TextTrackCueList;
          inBandMetadataTrackDispatchType: string;
          kind: string;
          label: string;
          language: string;
          mode: any;
          oncuechange: (ev: Event) => any;
          onerror: (ev: Event) => any;
          onload: (ev: Event) => any;
          readyState: number;
          addCue(cue: TextTrackCue): void;
          removeCue(cue: TextTrackCue): void;
          DISABLED: number;
          ERROR: number;
          HIDDEN: number;
          LOADED: number;
          LOADING: number;
          NONE: number;
          SHOWING: number;
          addEventListener(type: "cuechange", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var TextTrack: {
          prototype: TextTrack;
          new(): TextTrack;
          DISABLED: number;
          ERROR: number;
          HIDDEN: number;
          LOADED: number;
          LOADING: number;
          NONE: number;
          SHOWING: number;
      }
      
      interface TextTrackCue extends EventTarget {
          endTime: number;
          id: string;
          onenter: (ev: Event) => any;
          onexit: (ev: Event) => any;
          pauseOnExit: boolean;
          startTime: number;
          text: string;
          track: TextTrack;
          getCueAsHTML(): DocumentFragment;
          addEventListener(type: "enter", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "exit", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var TextTrackCue: {
          prototype: TextTrackCue;
          new(startTime: number, endTime: number, text: string): TextTrackCue;
      }
      
      interface TextTrackCueList {
          length: number;
          getCueById(id: string): TextTrackCue;
          item(index: number): TextTrackCue;
          [index: number]: TextTrackCue;
      }
      
      declare var TextTrackCueList: {
          prototype: TextTrackCueList;
          new(): TextTrackCueList;
      }
      
      interface TextTrackList extends EventTarget {
          length: number;
          onaddtrack: (ev: TrackEvent) => any;
          item(index: number): TextTrack;
          addEventListener(type: "addtrack", listener: (ev: TrackEvent) => any, useCapture?: boolean): void;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
          [index: number]: TextTrack;
      }
      
      declare var TextTrackList: {
          prototype: TextTrackList;
          new(): TextTrackList;
      }
      
      interface TimeRanges {
          length: number;
          end(index: number): number;
          start(index: number): number;
      }
      
      declare var TimeRanges: {
          prototype: TimeRanges;
          new(): TimeRanges;
      }
      
      interface Touch {
          clientX: number;
          clientY: number;
          identifier: number;
          pageX: number;
          pageY: number;
          screenX: number;
          screenY: number;
          target: EventTarget;
      }
      
      declare var Touch: {
          prototype: Touch;
          new(): Touch;
      }
      
      interface TouchEvent extends UIEvent {
          altKey: boolean;
          changedTouches: TouchList;
          ctrlKey: boolean;
          metaKey: boolean;
          shiftKey: boolean;
          targetTouches: TouchList;
          touches: TouchList;
      }
      
      declare var TouchEvent: {
          prototype: TouchEvent;
          new(): TouchEvent;
      }
      
      interface TouchList {
          length: number;
          item(index: number): Touch;
          [index: number]: Touch;
      }
      
      declare var TouchList: {
          prototype: TouchList;
          new(): TouchList;
      }
      
      interface TrackEvent extends Event {
          track: any;
      }
      
      declare var TrackEvent: {
          prototype: TrackEvent;
          new(): TrackEvent;
      }
      
      interface TransitionEvent extends Event {
          elapsedTime: number;
          propertyName: string;
          initTransitionEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, propertyNameArg: string, elapsedTimeArg: number): void;
      }
      
      declare var TransitionEvent: {
          prototype: TransitionEvent;
          new(): TransitionEvent;
      }
      
      interface TreeWalker {
          currentNode: Node;
          expandEntityReferences: boolean;
          filter: NodeFilter;
          root: Node;
          whatToShow: number;
          firstChild(): Node;
          lastChild(): Node;
          nextNode(): Node;
          nextSibling(): Node;
          parentNode(): Node;
          previousNode(): Node;
          previousSibling(): Node;
      }
      
      declare var TreeWalker: {
          prototype: TreeWalker;
          new(): TreeWalker;
      }
      
      interface UIEvent extends Event {
          detail: number;
          view: Window;
          initUIEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number): void;
      }
      
      declare var UIEvent: {
          prototype: UIEvent;
          new(type: string, eventInitDict?: UIEventInit): UIEvent;
      }
      
      interface URL {
          createObjectURL(object: any, options?: ObjectURLOptions): string;
          revokeObjectURL(url: string): void;
      }
      declare var URL: URL;
      
      interface UnviewableContentIdentifiedEvent extends NavigationEventWithReferrer {
          mediaType: string;
      }
      
      declare var UnviewableContentIdentifiedEvent: {
          prototype: UnviewableContentIdentifiedEvent;
          new(): UnviewableContentIdentifiedEvent;
      }
      
      interface ValidityState {
          badInput: boolean;
          customError: boolean;
          patternMismatch: boolean;
          rangeOverflow: boolean;
          rangeUnderflow: boolean;
          stepMismatch: boolean;
          tooLong: boolean;
          typeMismatch: boolean;
          valid: boolean;
          valueMissing: boolean;
      }
      
      declare var ValidityState: {
          prototype: ValidityState;
          new(): ValidityState;
      }
      
      interface VideoPlaybackQuality {
          corruptedVideoFrames: number;
          creationTime: number;
          droppedVideoFrames: number;
          totalFrameDelay: number;
          totalVideoFrames: number;
      }
      
      declare var VideoPlaybackQuality: {
          prototype: VideoPlaybackQuality;
          new(): VideoPlaybackQuality;
      }
      
      interface VideoTrack {
          id: string;
          kind: string;
          label: string;
          language: string;
          selected: boolean;
          sourceBuffer: SourceBuffer;
      }
      
      declare var VideoTrack: {
          prototype: VideoTrack;
          new(): VideoTrack;
      }
      
      interface VideoTrackList extends EventTarget {
          length: number;
          onaddtrack: (ev: TrackEvent) => any;
          onchange: (ev: Event) => any;
          onremovetrack: (ev: TrackEvent) => any;
          selectedIndex: number;
          getTrackById(id: string): VideoTrack;
          item(index: number): VideoTrack;
          addEventListener(type: "addtrack", listener: (ev: TrackEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "change", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "removetrack", listener: (ev: TrackEvent) => any, useCapture?: boolean): void;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
          [index: number]: VideoTrack;
      }
      
      declare var VideoTrackList: {
          prototype: VideoTrackList;
          new(): VideoTrackList;
      }
      
      interface WEBGL_compressed_texture_s3tc {
          COMPRESSED_RGBA_S3TC_DXT1_EXT: number;
          COMPRESSED_RGBA_S3TC_DXT3_EXT: number;
          COMPRESSED_RGBA_S3TC_DXT5_EXT: number;
          COMPRESSED_RGB_S3TC_DXT1_EXT: number;
      }
      
      declare var WEBGL_compressed_texture_s3tc: {
          prototype: WEBGL_compressed_texture_s3tc;
          new(): WEBGL_compressed_texture_s3tc;
          COMPRESSED_RGBA_S3TC_DXT1_EXT: number;
          COMPRESSED_RGBA_S3TC_DXT3_EXT: number;
          COMPRESSED_RGBA_S3TC_DXT5_EXT: number;
          COMPRESSED_RGB_S3TC_DXT1_EXT: number;
      }
      
      interface WEBGL_debug_renderer_info {
          UNMASKED_RENDERER_WEBGL: number;
          UNMASKED_VENDOR_WEBGL: number;
      }
      
      declare var WEBGL_debug_renderer_info: {
          prototype: WEBGL_debug_renderer_info;
          new(): WEBGL_debug_renderer_info;
          UNMASKED_RENDERER_WEBGL: number;
          UNMASKED_VENDOR_WEBGL: number;
      }
      
      interface WEBGL_depth_texture {
          UNSIGNED_INT_24_8_WEBGL: number;
      }
      
      declare var WEBGL_depth_texture: {
          prototype: WEBGL_depth_texture;
          new(): WEBGL_depth_texture;
          UNSIGNED_INT_24_8_WEBGL: number;
      }
      
      interface WaveShaperNode extends AudioNode {
          curve: any;
          oversample: string;
      }
      
      declare var WaveShaperNode: {
          prototype: WaveShaperNode;
          new(): WaveShaperNode;
      }
      
      interface WebGLActiveInfo {
          name: string;
          size: number;
          type: number;
      }
      
      declare var WebGLActiveInfo: {
          prototype: WebGLActiveInfo;
          new(): WebGLActiveInfo;
      }
      
      interface WebGLBuffer extends WebGLObject {
      }
      
      declare var WebGLBuffer: {
          prototype: WebGLBuffer;
          new(): WebGLBuffer;
      }
      
      interface WebGLContextEvent extends Event {
          statusMessage: string;
      }
      
      declare var WebGLContextEvent: {
          prototype: WebGLContextEvent;
          new(): WebGLContextEvent;
      }
      
      interface WebGLFramebuffer extends WebGLObject {
      }
      
      declare var WebGLFramebuffer: {
          prototype: WebGLFramebuffer;
          new(): WebGLFramebuffer;
      }
      
      interface WebGLObject {
      }
      
      declare var WebGLObject: {
          prototype: WebGLObject;
          new(): WebGLObject;
      }
      
      interface WebGLProgram extends WebGLObject {
      }
      
      declare var WebGLProgram: {
          prototype: WebGLProgram;
          new(): WebGLProgram;
      }
      
      interface WebGLRenderbuffer extends WebGLObject {
      }
      
      declare var WebGLRenderbuffer: {
          prototype: WebGLRenderbuffer;
          new(): WebGLRenderbuffer;
      }
      
      interface WebGLRenderingContext {
          canvas: HTMLCanvasElement;
          drawingBufferHeight: number;
          drawingBufferWidth: number;
          activeTexture(texture: number): void;
          attachShader(program: WebGLProgram, shader: WebGLShader): void;
          bindAttribLocation(program: WebGLProgram, index: number, name: string): void;
          bindBuffer(target: number, buffer: WebGLBuffer): void;
          bindFramebuffer(target: number, framebuffer: WebGLFramebuffer): void;
          bindRenderbuffer(target: number, renderbuffer: WebGLRenderbuffer): void;
          bindTexture(target: number, texture: WebGLTexture): void;
          blendColor(red: number, green: number, blue: number, alpha: number): void;
          blendEquation(mode: number): void;
          blendEquationSeparate(modeRGB: number, modeAlpha: number): void;
          blendFunc(sfactor: number, dfactor: number): void;
          blendFuncSeparate(srcRGB: number, dstRGB: number, srcAlpha: number, dstAlpha: number): void;
          bufferData(target: number, size: number, usage: number): void;
          bufferData(target: number, size: ArrayBufferView, usage: number): void;
          bufferData(target: number, size: any, usage: number): void;
          bufferSubData(target: number, offset: number, data: ArrayBufferView): void;
          bufferSubData(target: number, offset: number, data: any): void;
          checkFramebufferStatus(target: number): number;
          clear(mask: number): void;
          clearColor(red: number, green: number, blue: number, alpha: number): void;
          clearDepth(depth: number): void;
          clearStencil(s: number): void;
          colorMask(red: boolean, green: boolean, blue: boolean, alpha: boolean): void;
          compileShader(shader: WebGLShader): void;
          compressedTexImage2D(target: number, level: number, internalformat: number, width: number, height: number, border: number, data: ArrayBufferView): void;
          compressedTexSubImage2D(target: number, level: number, xoffset: number, yoffset: number, width: number, height: number, format: number, data: ArrayBufferView): void;
          copyTexImage2D(target: number, level: number, internalformat: number, x: number, y: number, width: number, height: number, border: number): void;
          copyTexSubImage2D(target: number, level: number, xoffset: number, yoffset: number, x: number, y: number, width: number, height: number): void;
          createBuffer(): WebGLBuffer;
          createFramebuffer(): WebGLFramebuffer;
          createProgram(): WebGLProgram;
          createRenderbuffer(): WebGLRenderbuffer;
          createShader(type: number): WebGLShader;
          createTexture(): WebGLTexture;
          cullFace(mode: number): void;
          deleteBuffer(buffer: WebGLBuffer): void;
          deleteFramebuffer(framebuffer: WebGLFramebuffer): void;
          deleteProgram(program: WebGLProgram): void;
          deleteRenderbuffer(renderbuffer: WebGLRenderbuffer): void;
          deleteShader(shader: WebGLShader): void;
          deleteTexture(texture: WebGLTexture): void;
          depthFunc(func: number): void;
          depthMask(flag: boolean): void;
          depthRange(zNear: number, zFar: number): void;
          detachShader(program: WebGLProgram, shader: WebGLShader): void;
          disable(cap: number): void;
          disableVertexAttribArray(index: number): void;
          drawArrays(mode: number, first: number, count: number): void;
          drawElements(mode: number, count: number, type: number, offset: number): void;
          enable(cap: number): void;
          enableVertexAttribArray(index: number): void;
          finish(): void;
          flush(): void;
          framebufferRenderbuffer(target: number, attachment: number, renderbuffertarget: number, renderbuffer: WebGLRenderbuffer): void;
          framebufferTexture2D(target: number, attachment: number, textarget: number, texture: WebGLTexture, level: number): void;
          frontFace(mode: number): void;
          generateMipmap(target: number): void;
          getActiveAttrib(program: WebGLProgram, index: number): WebGLActiveInfo;
          getActiveUniform(program: WebGLProgram, index: number): WebGLActiveInfo;
          getAttachedShaders(program: WebGLProgram): WebGLShader[];
          getAttribLocation(program: WebGLProgram, name: string): number;
          getBufferParameter(target: number, pname: number): any;
          getContextAttributes(): WebGLContextAttributes;
          getError(): number;
          getExtension(name: string): any;
          getFramebufferAttachmentParameter(target: number, attachment: number, pname: number): any;
          getParameter(pname: number): any;
          getProgramInfoLog(program: WebGLProgram): string;
          getProgramParameter(program: WebGLProgram, pname: number): any;
          getRenderbufferParameter(target: number, pname: number): any;
          getShaderInfoLog(shader: WebGLShader): string;
          getShaderParameter(shader: WebGLShader, pname: number): any;
          getShaderPrecisionFormat(shadertype: number, precisiontype: number): WebGLShaderPrecisionFormat;
          getShaderSource(shader: WebGLShader): string;
          getSupportedExtensions(): string[];
          getTexParameter(target: number, pname: number): any;
          getUniform(program: WebGLProgram, location: WebGLUniformLocation): any;
          getUniformLocation(program: WebGLProgram, name: string): WebGLUniformLocation;
          getVertexAttrib(index: number, pname: number): any;
          getVertexAttribOffset(index: number, pname: number): number;
          hint(target: number, mode: number): void;
          isBuffer(buffer: WebGLBuffer): boolean;
          isContextLost(): boolean;
          isEnabled(cap: number): boolean;
          isFramebuffer(framebuffer: WebGLFramebuffer): boolean;
          isProgram(program: WebGLProgram): boolean;
          isRenderbuffer(renderbuffer: WebGLRenderbuffer): boolean;
          isShader(shader: WebGLShader): boolean;
          isTexture(texture: WebGLTexture): boolean;
          lineWidth(width: number): void;
          linkProgram(program: WebGLProgram): void;
          pixelStorei(pname: number, param: number): void;
          polygonOffset(factor: number, units: number): void;
          readPixels(x: number, y: number, width: number, height: number, format: number, type: number, pixels: ArrayBufferView): void;
          renderbufferStorage(target: number, internalformat: number, width: number, height: number): void;
          sampleCoverage(value: number, invert: boolean): void;
          scissor(x: number, y: number, width: number, height: number): void;
          shaderSource(shader: WebGLShader, source: string): void;
          stencilFunc(func: number, ref: number, mask: number): void;
          stencilFuncSeparate(face: number, func: number, ref: number, mask: number): void;
          stencilMask(mask: number): void;
          stencilMaskSeparate(face: number, mask: number): void;
          stencilOp(fail: number, zfail: number, zpass: number): void;
          stencilOpSeparate(face: number, fail: number, zfail: number, zpass: number): void;
          texImage2D(target: number, level: number, internalformat: number, format: number, type: number, pixels: ImageData): void;
          texParameterf(target: number, pname: number, param: number): void;
          texParameteri(target: number, pname: number, param: number): void;
          texSubImage2D(target: number, level: number, xoffset: number, yoffset: number, format: number, type: number, pixels: ImageData): void;
          uniform1f(location: WebGLUniformLocation, x: number): void;
          uniform1fv(location: WebGLUniformLocation, v: any): void;
          uniform1i(location: WebGLUniformLocation, x: number): void;
          uniform1iv(location: WebGLUniformLocation, v: Int32Array): void;
          uniform2f(location: WebGLUniformLocation, x: number, y: number): void;
          uniform2fv(location: WebGLUniformLocation, v: any): void;
          uniform2i(location: WebGLUniformLocation, x: number, y: number): void;
          uniform2iv(location: WebGLUniformLocation, v: Int32Array): void;
          uniform3f(location: WebGLUniformLocation, x: number, y: number, z: number): void;
          uniform3fv(location: WebGLUniformLocation, v: any): void;
          uniform3i(location: WebGLUniformLocation, x: number, y: number, z: number): void;
          uniform3iv(location: WebGLUniformLocation, v: Int32Array): void;
          uniform4f(location: WebGLUniformLocation, x: number, y: number, z: number, w: number): void;
          uniform4fv(location: WebGLUniformLocation, v: any): void;
          uniform4i(location: WebGLUniformLocation, x: number, y: number, z: number, w: number): void;
          uniform4iv(location: WebGLUniformLocation, v: Int32Array): void;
          uniformMatrix2fv(location: WebGLUniformLocation, transpose: boolean, value: any): void;
          uniformMatrix3fv(location: WebGLUniformLocation, transpose: boolean, value: any): void;
          uniformMatrix4fv(location: WebGLUniformLocation, transpose: boolean, value: any): void;
          useProgram(program: WebGLProgram): void;
          validateProgram(program: WebGLProgram): void;
          vertexAttrib1f(indx: number, x: number): void;
          vertexAttrib1fv(indx: number, values: any): void;
          vertexAttrib2f(indx: number, x: number, y: number): void;
          vertexAttrib2fv(indx: number, values: any): void;
          vertexAttrib3f(indx: number, x: number, y: number, z: number): void;
          vertexAttrib3fv(indx: number, values: any): void;
          vertexAttrib4f(indx: number, x: number, y: number, z: number, w: number): void;
          vertexAttrib4fv(indx: number, values: any): void;
          vertexAttribPointer(indx: number, size: number, type: number, normalized: boolean, stride: number, offset: number): void;
          viewport(x: number, y: number, width: number, height: number): void;
          ACTIVE_ATTRIBUTES: number;
          ACTIVE_TEXTURE: number;
          ACTIVE_UNIFORMS: number;
          ALIASED_LINE_WIDTH_RANGE: number;
          ALIASED_POINT_SIZE_RANGE: number;
          ALPHA: number;
          ALPHA_BITS: number;
          ALWAYS: number;
          ARRAY_BUFFER: number;
          ARRAY_BUFFER_BINDING: number;
          ATTACHED_SHADERS: number;
          BACK: number;
          BLEND: number;
          BLEND_COLOR: number;
          BLEND_DST_ALPHA: number;
          BLEND_DST_RGB: number;
          BLEND_EQUATION: number;
          BLEND_EQUATION_ALPHA: number;
          BLEND_EQUATION_RGB: number;
          BLEND_SRC_ALPHA: number;
          BLEND_SRC_RGB: number;
          BLUE_BITS: number;
          BOOL: number;
          BOOL_VEC2: number;
          BOOL_VEC3: number;
          BOOL_VEC4: number;
          BROWSER_DEFAULT_WEBGL: number;
          BUFFER_SIZE: number;
          BUFFER_USAGE: number;
          BYTE: number;
          CCW: number;
          CLAMP_TO_EDGE: number;
          COLOR_ATTACHMENT0: number;
          COLOR_BUFFER_BIT: number;
          COLOR_CLEAR_VALUE: number;
          COLOR_WRITEMASK: number;
          COMPILE_STATUS: number;
          COMPRESSED_TEXTURE_FORMATS: number;
          CONSTANT_ALPHA: number;
          CONSTANT_COLOR: number;
          CONTEXT_LOST_WEBGL: number;
          CULL_FACE: number;
          CULL_FACE_MODE: number;
          CURRENT_PROGRAM: number;
          CURRENT_VERTEX_ATTRIB: number;
          CW: number;
          DECR: number;
          DECR_WRAP: number;
          DELETE_STATUS: number;
          DEPTH_ATTACHMENT: number;
          DEPTH_BITS: number;
          DEPTH_BUFFER_BIT: number;
          DEPTH_CLEAR_VALUE: number;
          DEPTH_COMPONENT: number;
          DEPTH_COMPONENT16: number;
          DEPTH_FUNC: number;
          DEPTH_RANGE: number;
          DEPTH_STENCIL: number;
          DEPTH_STENCIL_ATTACHMENT: number;
          DEPTH_TEST: number;
          DEPTH_WRITEMASK: number;
          DITHER: number;
          DONT_CARE: number;
          DST_ALPHA: number;
          DST_COLOR: number;
          DYNAMIC_DRAW: number;
          ELEMENT_ARRAY_BUFFER: number;
          ELEMENT_ARRAY_BUFFER_BINDING: number;
          EQUAL: number;
          FASTEST: number;
          FLOAT: number;
          FLOAT_MAT2: number;
          FLOAT_MAT3: number;
          FLOAT_MAT4: number;
          FLOAT_VEC2: number;
          FLOAT_VEC3: number;
          FLOAT_VEC4: number;
          FRAGMENT_SHADER: number;
          FRAMEBUFFER: number;
          FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: number;
          FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: number;
          FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: number;
          FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: number;
          FRAMEBUFFER_BINDING: number;
          FRAMEBUFFER_COMPLETE: number;
          FRAMEBUFFER_INCOMPLETE_ATTACHMENT: number;
          FRAMEBUFFER_INCOMPLETE_DIMENSIONS: number;
          FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: number;
          FRAMEBUFFER_UNSUPPORTED: number;
          FRONT: number;
          FRONT_AND_BACK: number;
          FRONT_FACE: number;
          FUNC_ADD: number;
          FUNC_REVERSE_SUBTRACT: number;
          FUNC_SUBTRACT: number;
          GENERATE_MIPMAP_HINT: number;
          GEQUAL: number;
          GREATER: number;
          GREEN_BITS: number;
          HIGH_FLOAT: number;
          HIGH_INT: number;
          IMPLEMENTATION_COLOR_READ_FORMAT: number;
          IMPLEMENTATION_COLOR_READ_TYPE: number;
          INCR: number;
          INCR_WRAP: number;
          INT: number;
          INT_VEC2: number;
          INT_VEC3: number;
          INT_VEC4: number;
          INVALID_ENUM: number;
          INVALID_FRAMEBUFFER_OPERATION: number;
          INVALID_OPERATION: number;
          INVALID_VALUE: number;
          INVERT: number;
          KEEP: number;
          LEQUAL: number;
          LESS: number;
          LINEAR: number;
          LINEAR_MIPMAP_LINEAR: number;
          LINEAR_MIPMAP_NEAREST: number;
          LINES: number;
          LINE_LOOP: number;
          LINE_STRIP: number;
          LINE_WIDTH: number;
          LINK_STATUS: number;
          LOW_FLOAT: number;
          LOW_INT: number;
          LUMINANCE: number;
          LUMINANCE_ALPHA: number;
          MAX_COMBINED_TEXTURE_IMAGE_UNITS: number;
          MAX_CUBE_MAP_TEXTURE_SIZE: number;
          MAX_FRAGMENT_UNIFORM_VECTORS: number;
          MAX_RENDERBUFFER_SIZE: number;
          MAX_TEXTURE_IMAGE_UNITS: number;
          MAX_TEXTURE_SIZE: number;
          MAX_VARYING_VECTORS: number;
          MAX_VERTEX_ATTRIBS: number;
          MAX_VERTEX_TEXTURE_IMAGE_UNITS: number;
          MAX_VERTEX_UNIFORM_VECTORS: number;
          MAX_VIEWPORT_DIMS: number;
          MEDIUM_FLOAT: number;
          MEDIUM_INT: number;
          MIRRORED_REPEAT: number;
          NEAREST: number;
          NEAREST_MIPMAP_LINEAR: number;
          NEAREST_MIPMAP_NEAREST: number;
          NEVER: number;
          NICEST: number;
          NONE: number;
          NOTEQUAL: number;
          NO_ERROR: number;
          ONE: number;
          ONE_MINUS_CONSTANT_ALPHA: number;
          ONE_MINUS_CONSTANT_COLOR: number;
          ONE_MINUS_DST_ALPHA: number;
          ONE_MINUS_DST_COLOR: number;
          ONE_MINUS_SRC_ALPHA: number;
          ONE_MINUS_SRC_COLOR: number;
          OUT_OF_MEMORY: number;
          PACK_ALIGNMENT: number;
          POINTS: number;
          POLYGON_OFFSET_FACTOR: number;
          POLYGON_OFFSET_FILL: number;
          POLYGON_OFFSET_UNITS: number;
          RED_BITS: number;
          RENDERBUFFER: number;
          RENDERBUFFER_ALPHA_SIZE: number;
          RENDERBUFFER_BINDING: number;
          RENDERBUFFER_BLUE_SIZE: number;
          RENDERBUFFER_DEPTH_SIZE: number;
          RENDERBUFFER_GREEN_SIZE: number;
          RENDERBUFFER_HEIGHT: number;
          RENDERBUFFER_INTERNAL_FORMAT: number;
          RENDERBUFFER_RED_SIZE: number;
          RENDERBUFFER_STENCIL_SIZE: number;
          RENDERBUFFER_WIDTH: number;
          RENDERER: number;
          REPEAT: number;
          REPLACE: number;
          RGB: number;
          RGB565: number;
          RGB5_A1: number;
          RGBA: number;
          RGBA4: number;
          SAMPLER_2D: number;
          SAMPLER_CUBE: number;
          SAMPLES: number;
          SAMPLE_ALPHA_TO_COVERAGE: number;
          SAMPLE_BUFFERS: number;
          SAMPLE_COVERAGE: number;
          SAMPLE_COVERAGE_INVERT: number;
          SAMPLE_COVERAGE_VALUE: number;
          SCISSOR_BOX: number;
          SCISSOR_TEST: number;
          SHADER_TYPE: number;
          SHADING_LANGUAGE_VERSION: number;
          SHORT: number;
          SRC_ALPHA: number;
          SRC_ALPHA_SATURATE: number;
          SRC_COLOR: number;
          STATIC_DRAW: number;
          STENCIL_ATTACHMENT: number;
          STENCIL_BACK_FAIL: number;
          STENCIL_BACK_FUNC: number;
          STENCIL_BACK_PASS_DEPTH_FAIL: number;
          STENCIL_BACK_PASS_DEPTH_PASS: number;
          STENCIL_BACK_REF: number;
          STENCIL_BACK_VALUE_MASK: number;
          STENCIL_BACK_WRITEMASK: number;
          STENCIL_BITS: number;
          STENCIL_BUFFER_BIT: number;
          STENCIL_CLEAR_VALUE: number;
          STENCIL_FAIL: number;
          STENCIL_FUNC: number;
          STENCIL_INDEX: number;
          STENCIL_INDEX8: number;
          STENCIL_PASS_DEPTH_FAIL: number;
          STENCIL_PASS_DEPTH_PASS: number;
          STENCIL_REF: number;
          STENCIL_TEST: number;
          STENCIL_VALUE_MASK: number;
          STENCIL_WRITEMASK: number;
          STREAM_DRAW: number;
          SUBPIXEL_BITS: number;
          TEXTURE: number;
          TEXTURE0: number;
          TEXTURE1: number;
          TEXTURE10: number;
          TEXTURE11: number;
          TEXTURE12: number;
          TEXTURE13: number;
          TEXTURE14: number;
          TEXTURE15: number;
          TEXTURE16: number;
          TEXTURE17: number;
          TEXTURE18: number;
          TEXTURE19: number;
          TEXTURE2: number;
          TEXTURE20: number;
          TEXTURE21: number;
          TEXTURE22: number;
          TEXTURE23: number;
          TEXTURE24: number;
          TEXTURE25: number;
          TEXTURE26: number;
          TEXTURE27: number;
          TEXTURE28: number;
          TEXTURE29: number;
          TEXTURE3: number;
          TEXTURE30: number;
          TEXTURE31: number;
          TEXTURE4: number;
          TEXTURE5: number;
          TEXTURE6: number;
          TEXTURE7: number;
          TEXTURE8: number;
          TEXTURE9: number;
          TEXTURE_2D: number;
          TEXTURE_BINDING_2D: number;
          TEXTURE_BINDING_CUBE_MAP: number;
          TEXTURE_CUBE_MAP: number;
          TEXTURE_CUBE_MAP_NEGATIVE_X: number;
          TEXTURE_CUBE_MAP_NEGATIVE_Y: number;
          TEXTURE_CUBE_MAP_NEGATIVE_Z: number;
          TEXTURE_CUBE_MAP_POSITIVE_X: number;
          TEXTURE_CUBE_MAP_POSITIVE_Y: number;
          TEXTURE_CUBE_MAP_POSITIVE_Z: number;
          TEXTURE_MAG_FILTER: number;
          TEXTURE_MIN_FILTER: number;
          TEXTURE_WRAP_S: number;
          TEXTURE_WRAP_T: number;
          TRIANGLES: number;
          TRIANGLE_FAN: number;
          TRIANGLE_STRIP: number;
          UNPACK_ALIGNMENT: number;
          UNPACK_COLORSPACE_CONVERSION_WEBGL: number;
          UNPACK_FLIP_Y_WEBGL: number;
          UNPACK_PREMULTIPLY_ALPHA_WEBGL: number;
          UNSIGNED_BYTE: number;
          UNSIGNED_INT: number;
          UNSIGNED_SHORT: number;
          UNSIGNED_SHORT_4_4_4_4: number;
          UNSIGNED_SHORT_5_5_5_1: number;
          UNSIGNED_SHORT_5_6_5: number;
          VALIDATE_STATUS: number;
          VENDOR: number;
          VERSION: number;
          VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: number;
          VERTEX_ATTRIB_ARRAY_ENABLED: number;
          VERTEX_ATTRIB_ARRAY_NORMALIZED: number;
          VERTEX_ATTRIB_ARRAY_POINTER: number;
          VERTEX_ATTRIB_ARRAY_SIZE: number;
          VERTEX_ATTRIB_ARRAY_STRIDE: number;
          VERTEX_ATTRIB_ARRAY_TYPE: number;
          VERTEX_SHADER: number;
          VIEWPORT: number;
          ZERO: number;
      }
      
      declare var WebGLRenderingContext: {
          prototype: WebGLRenderingContext;
          new(): WebGLRenderingContext;
          ACTIVE_ATTRIBUTES: number;
          ACTIVE_TEXTURE: number;
          ACTIVE_UNIFORMS: number;
          ALIASED_LINE_WIDTH_RANGE: number;
          ALIASED_POINT_SIZE_RANGE: number;
          ALPHA: number;
          ALPHA_BITS: number;
          ALWAYS: number;
          ARRAY_BUFFER: number;
          ARRAY_BUFFER_BINDING: number;
          ATTACHED_SHADERS: number;
          BACK: number;
          BLEND: number;
          BLEND_COLOR: number;
          BLEND_DST_ALPHA: number;
          BLEND_DST_RGB: number;
          BLEND_EQUATION: number;
          BLEND_EQUATION_ALPHA: number;
          BLEND_EQUATION_RGB: number;
          BLEND_SRC_ALPHA: number;
          BLEND_SRC_RGB: number;
          BLUE_BITS: number;
          BOOL: number;
          BOOL_VEC2: number;
          BOOL_VEC3: number;
          BOOL_VEC4: number;
          BROWSER_DEFAULT_WEBGL: number;
          BUFFER_SIZE: number;
          BUFFER_USAGE: number;
          BYTE: number;
          CCW: number;
          CLAMP_TO_EDGE: number;
          COLOR_ATTACHMENT0: number;
          COLOR_BUFFER_BIT: number;
          COLOR_CLEAR_VALUE: number;
          COLOR_WRITEMASK: number;
          COMPILE_STATUS: number;
          COMPRESSED_TEXTURE_FORMATS: number;
          CONSTANT_ALPHA: number;
          CONSTANT_COLOR: number;
          CONTEXT_LOST_WEBGL: number;
          CULL_FACE: number;
          CULL_FACE_MODE: number;
          CURRENT_PROGRAM: number;
          CURRENT_VERTEX_ATTRIB: number;
          CW: number;
          DECR: number;
          DECR_WRAP: number;
          DELETE_STATUS: number;
          DEPTH_ATTACHMENT: number;
          DEPTH_BITS: number;
          DEPTH_BUFFER_BIT: number;
          DEPTH_CLEAR_VALUE: number;
          DEPTH_COMPONENT: number;
          DEPTH_COMPONENT16: number;
          DEPTH_FUNC: number;
          DEPTH_RANGE: number;
          DEPTH_STENCIL: number;
          DEPTH_STENCIL_ATTACHMENT: number;
          DEPTH_TEST: number;
          DEPTH_WRITEMASK: number;
          DITHER: number;
          DONT_CARE: number;
          DST_ALPHA: number;
          DST_COLOR: number;
          DYNAMIC_DRAW: number;
          ELEMENT_ARRAY_BUFFER: number;
          ELEMENT_ARRAY_BUFFER_BINDING: number;
          EQUAL: number;
          FASTEST: number;
          FLOAT: number;
          FLOAT_MAT2: number;
          FLOAT_MAT3: number;
          FLOAT_MAT4: number;
          FLOAT_VEC2: number;
          FLOAT_VEC3: number;
          FLOAT_VEC4: number;
          FRAGMENT_SHADER: number;
          FRAMEBUFFER: number;
          FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: number;
          FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: number;
          FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: number;
          FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: number;
          FRAMEBUFFER_BINDING: number;
          FRAMEBUFFER_COMPLETE: number;
          FRAMEBUFFER_INCOMPLETE_ATTACHMENT: number;
          FRAMEBUFFER_INCOMPLETE_DIMENSIONS: number;
          FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: number;
          FRAMEBUFFER_UNSUPPORTED: number;
          FRONT: number;
          FRONT_AND_BACK: number;
          FRONT_FACE: number;
          FUNC_ADD: number;
          FUNC_REVERSE_SUBTRACT: number;
          FUNC_SUBTRACT: number;
          GENERATE_MIPMAP_HINT: number;
          GEQUAL: number;
          GREATER: number;
          GREEN_BITS: number;
          HIGH_FLOAT: number;
          HIGH_INT: number;
          IMPLEMENTATION_COLOR_READ_FORMAT: number;
          IMPLEMENTATION_COLOR_READ_TYPE: number;
          INCR: number;
          INCR_WRAP: number;
          INT: number;
          INT_VEC2: number;
          INT_VEC3: number;
          INT_VEC4: number;
          INVALID_ENUM: number;
          INVALID_FRAMEBUFFER_OPERATION: number;
          INVALID_OPERATION: number;
          INVALID_VALUE: number;
          INVERT: number;
          KEEP: number;
          LEQUAL: number;
          LESS: number;
          LINEAR: number;
          LINEAR_MIPMAP_LINEAR: number;
          LINEAR_MIPMAP_NEAREST: number;
          LINES: number;
          LINE_LOOP: number;
          LINE_STRIP: number;
          LINE_WIDTH: number;
          LINK_STATUS: number;
          LOW_FLOAT: number;
          LOW_INT: number;
          LUMINANCE: number;
          LUMINANCE_ALPHA: number;
          MAX_COMBINED_TEXTURE_IMAGE_UNITS: number;
          MAX_CUBE_MAP_TEXTURE_SIZE: number;
          MAX_FRAGMENT_UNIFORM_VECTORS: number;
          MAX_RENDERBUFFER_SIZE: number;
          MAX_TEXTURE_IMAGE_UNITS: number;
          MAX_TEXTURE_SIZE: number;
          MAX_VARYING_VECTORS: number;
          MAX_VERTEX_ATTRIBS: number;
          MAX_VERTEX_TEXTURE_IMAGE_UNITS: number;
          MAX_VERTEX_UNIFORM_VECTORS: number;
          MAX_VIEWPORT_DIMS: number;
          MEDIUM_FLOAT: number;
          MEDIUM_INT: number;
          MIRRORED_REPEAT: number;
          NEAREST: number;
          NEAREST_MIPMAP_LINEAR: number;
          NEAREST_MIPMAP_NEAREST: number;
          NEVER: number;
          NICEST: number;
          NONE: number;
          NOTEQUAL: number;
          NO_ERROR: number;
          ONE: number;
          ONE_MINUS_CONSTANT_ALPHA: number;
          ONE_MINUS_CONSTANT_COLOR: number;
          ONE_MINUS_DST_ALPHA: number;
          ONE_MINUS_DST_COLOR: number;
          ONE_MINUS_SRC_ALPHA: number;
          ONE_MINUS_SRC_COLOR: number;
          OUT_OF_MEMORY: number;
          PACK_ALIGNMENT: number;
          POINTS: number;
          POLYGON_OFFSET_FACTOR: number;
          POLYGON_OFFSET_FILL: number;
          POLYGON_OFFSET_UNITS: number;
          RED_BITS: number;
          RENDERBUFFER: number;
          RENDERBUFFER_ALPHA_SIZE: number;
          RENDERBUFFER_BINDING: number;
          RENDERBUFFER_BLUE_SIZE: number;
          RENDERBUFFER_DEPTH_SIZE: number;
          RENDERBUFFER_GREEN_SIZE: number;
          RENDERBUFFER_HEIGHT: number;
          RENDERBUFFER_INTERNAL_FORMAT: number;
          RENDERBUFFER_RED_SIZE: number;
          RENDERBUFFER_STENCIL_SIZE: number;
          RENDERBUFFER_WIDTH: number;
          RENDERER: number;
          REPEAT: number;
          REPLACE: number;
          RGB: number;
          RGB565: number;
          RGB5_A1: number;
          RGBA: number;
          RGBA4: number;
          SAMPLER_2D: number;
          SAMPLER_CUBE: number;
          SAMPLES: number;
          SAMPLE_ALPHA_TO_COVERAGE: number;
          SAMPLE_BUFFERS: number;
          SAMPLE_COVERAGE: number;
          SAMPLE_COVERAGE_INVERT: number;
          SAMPLE_COVERAGE_VALUE: number;
          SCISSOR_BOX: number;
          SCISSOR_TEST: number;
          SHADER_TYPE: number;
          SHADING_LANGUAGE_VERSION: number;
          SHORT: number;
          SRC_ALPHA: number;
          SRC_ALPHA_SATURATE: number;
          SRC_COLOR: number;
          STATIC_DRAW: number;
          STENCIL_ATTACHMENT: number;
          STENCIL_BACK_FAIL: number;
          STENCIL_BACK_FUNC: number;
          STENCIL_BACK_PASS_DEPTH_FAIL: number;
          STENCIL_BACK_PASS_DEPTH_PASS: number;
          STENCIL_BACK_REF: number;
          STENCIL_BACK_VALUE_MASK: number;
          STENCIL_BACK_WRITEMASK: number;
          STENCIL_BITS: number;
          STENCIL_BUFFER_BIT: number;
          STENCIL_CLEAR_VALUE: number;
          STENCIL_FAIL: number;
          STENCIL_FUNC: number;
          STENCIL_INDEX: number;
          STENCIL_INDEX8: number;
          STENCIL_PASS_DEPTH_FAIL: number;
          STENCIL_PASS_DEPTH_PASS: number;
          STENCIL_REF: number;
          STENCIL_TEST: number;
          STENCIL_VALUE_MASK: number;
          STENCIL_WRITEMASK: number;
          STREAM_DRAW: number;
          SUBPIXEL_BITS: number;
          TEXTURE: number;
          TEXTURE0: number;
          TEXTURE1: number;
          TEXTURE10: number;
          TEXTURE11: number;
          TEXTURE12: number;
          TEXTURE13: number;
          TEXTURE14: number;
          TEXTURE15: number;
          TEXTURE16: number;
          TEXTURE17: number;
          TEXTURE18: number;
          TEXTURE19: number;
          TEXTURE2: number;
          TEXTURE20: number;
          TEXTURE21: number;
          TEXTURE22: number;
          TEXTURE23: number;
          TEXTURE24: number;
          TEXTURE25: number;
          TEXTURE26: number;
          TEXTURE27: number;
          TEXTURE28: number;
          TEXTURE29: number;
          TEXTURE3: number;
          TEXTURE30: number;
          TEXTURE31: number;
          TEXTURE4: number;
          TEXTURE5: number;
          TEXTURE6: number;
          TEXTURE7: number;
          TEXTURE8: number;
          TEXTURE9: number;
          TEXTURE_2D: number;
          TEXTURE_BINDING_2D: number;
          TEXTURE_BINDING_CUBE_MAP: number;
          TEXTURE_CUBE_MAP: number;
          TEXTURE_CUBE_MAP_NEGATIVE_X: number;
          TEXTURE_CUBE_MAP_NEGATIVE_Y: number;
          TEXTURE_CUBE_MAP_NEGATIVE_Z: number;
          TEXTURE_CUBE_MAP_POSITIVE_X: number;
          TEXTURE_CUBE_MAP_POSITIVE_Y: number;
          TEXTURE_CUBE_MAP_POSITIVE_Z: number;
          TEXTURE_MAG_FILTER: number;
          TEXTURE_MIN_FILTER: number;
          TEXTURE_WRAP_S: number;
          TEXTURE_WRAP_T: number;
          TRIANGLES: number;
          TRIANGLE_FAN: number;
          TRIANGLE_STRIP: number;
          UNPACK_ALIGNMENT: number;
          UNPACK_COLORSPACE_CONVERSION_WEBGL: number;
          UNPACK_FLIP_Y_WEBGL: number;
          UNPACK_PREMULTIPLY_ALPHA_WEBGL: number;
          UNSIGNED_BYTE: number;
          UNSIGNED_INT: number;
          UNSIGNED_SHORT: number;
          UNSIGNED_SHORT_4_4_4_4: number;
          UNSIGNED_SHORT_5_5_5_1: number;
          UNSIGNED_SHORT_5_6_5: number;
          VALIDATE_STATUS: number;
          VENDOR: number;
          VERSION: number;
          VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: number;
          VERTEX_ATTRIB_ARRAY_ENABLED: number;
          VERTEX_ATTRIB_ARRAY_NORMALIZED: number;
          VERTEX_ATTRIB_ARRAY_POINTER: number;
          VERTEX_ATTRIB_ARRAY_SIZE: number;
          VERTEX_ATTRIB_ARRAY_STRIDE: number;
          VERTEX_ATTRIB_ARRAY_TYPE: number;
          VERTEX_SHADER: number;
          VIEWPORT: number;
          ZERO: number;
      }
      
      interface WebGLShader extends WebGLObject {
      }
      
      declare var WebGLShader: {
          prototype: WebGLShader;
          new(): WebGLShader;
      }
      
      interface WebGLShaderPrecisionFormat {
          precision: number;
          rangeMax: number;
          rangeMin: number;
      }
      
      declare var WebGLShaderPrecisionFormat: {
          prototype: WebGLShaderPrecisionFormat;
          new(): WebGLShaderPrecisionFormat;
      }
      
      interface WebGLTexture extends WebGLObject {
      }
      
      declare var WebGLTexture: {
          prototype: WebGLTexture;
          new(): WebGLTexture;
      }
      
      interface WebGLUniformLocation {
      }
      
      declare var WebGLUniformLocation: {
          prototype: WebGLUniformLocation;
          new(): WebGLUniformLocation;
      }
      
      interface WebKitCSSMatrix {
          a: number;
          b: number;
          c: number;
          d: number;
          e: number;
          f: number;
          m11: number;
          m12: number;
          m13: number;
          m14: number;
          m21: number;
          m22: number;
          m23: number;
          m24: number;
          m31: number;
          m32: number;
          m33: number;
          m34: number;
          m41: number;
          m42: number;
          m43: number;
          m44: number;
          inverse(): WebKitCSSMatrix;
          multiply(secondMatrix: WebKitCSSMatrix): WebKitCSSMatrix;
          rotate(angleX: number, angleY?: number, angleZ?: number): WebKitCSSMatrix;
          rotateAxisAngle(x: number, y: number, z: number, angle: number): WebKitCSSMatrix;
          scale(scaleX: number, scaleY?: number, scaleZ?: number): WebKitCSSMatrix;
          setMatrixValue(value: string): void;
          skewX(angle: number): WebKitCSSMatrix;
          skewY(angle: number): WebKitCSSMatrix;
          toString(): string;
          translate(x: number, y: number, z?: number): WebKitCSSMatrix;
      }
      
      declare var WebKitCSSMatrix: {
          prototype: WebKitCSSMatrix;
          new(text?: string): WebKitCSSMatrix;
      }
      
      interface WebKitPoint {
          x: number;
          y: number;
      }
      
      declare var WebKitPoint: {
          prototype: WebKitPoint;
          new(x?: number, y?: number): WebKitPoint;
      }
      
      interface WebSocket extends EventTarget {
          binaryType: string;
          bufferedAmount: number;
          extensions: string;
          onclose: (ev: CloseEvent) => any;
          onerror: (ev: Event) => any;
          onmessage: (ev: MessageEvent) => any;
          onopen: (ev: Event) => any;
          protocol: string;
          readyState: number;
          url: string;
          close(code?: number, reason?: string): void;
          send(data: any): void;
          CLOSED: number;
          CLOSING: number;
          CONNECTING: number;
          OPEN: number;
          addEventListener(type: "close", listener: (ev: CloseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "message", listener: (ev: MessageEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "open", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var WebSocket: {
          prototype: WebSocket;
          new(url: string, protocols?: string): WebSocket;
          new(url: string, protocols?: any): WebSocket;
          CLOSED: number;
          CLOSING: number;
          CONNECTING: number;
          OPEN: number;
      }
      
      interface WheelEvent extends MouseEvent {
          deltaMode: number;
          deltaX: number;
          deltaY: number;
          deltaZ: number;
          getCurrentPoint(element: Element): void;
          initWheelEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, buttonArg: number, relatedTargetArg: EventTarget, modifiersListArg: string, deltaXArg: number, deltaYArg: number, deltaZArg: number, deltaMode: number): void;
          DOM_DELTA_LINE: number;
          DOM_DELTA_PAGE: number;
          DOM_DELTA_PIXEL: number;
      }
      
      declare var WheelEvent: {
          prototype: WheelEvent;
          new(typeArg: string, eventInitDict?: WheelEventInit): WheelEvent;
          DOM_DELTA_LINE: number;
          DOM_DELTA_PAGE: number;
          DOM_DELTA_PIXEL: number;
      }
      
      interface Window extends EventTarget, WindowTimers, WindowSessionStorage, WindowLocalStorage, WindowConsole, GlobalEventHandlers, IDBEnvironment, WindowBase64 {
          animationStartTime: number;
          applicationCache: ApplicationCache;
          clientInformation: Navigator;
          closed: boolean;
          crypto: Crypto;
          defaultStatus: string;
          devicePixelRatio: number;
          doNotTrack: string;
          document: Document;
          event: Event;
          external: External;
          frameElement: Element;
          frames: Window;
          history: History;
          innerHeight: number;
          innerWidth: number;
          length: number;
          location: Location;
          locationbar: BarProp;
          menubar: BarProp;
          msAnimationStartTime: number;
          msTemplatePrinter: MSTemplatePrinter;
          name: string;
          navigator: Navigator;
          offscreenBuffering: string | boolean;
          onabort: (ev: Event) => any;
          onafterprint: (ev: Event) => any;
          onbeforeprint: (ev: Event) => any;
          onbeforeunload: (ev: BeforeUnloadEvent) => any;
          onblur: (ev: FocusEvent) => any;
          oncanplay: (ev: Event) => any;
          oncanplaythrough: (ev: Event) => any;
          onchange: (ev: Event) => any;
          onclick: (ev: MouseEvent) => any;
          oncompassneedscalibration: (ev: Event) => any;
          oncontextmenu: (ev: PointerEvent) => any;
          ondblclick: (ev: MouseEvent) => any;
          ondevicemotion: (ev: DeviceMotionEvent) => any;
          ondeviceorientation: (ev: DeviceOrientationEvent) => any;
          ondrag: (ev: DragEvent) => any;
          ondragend: (ev: DragEvent) => any;
          ondragenter: (ev: DragEvent) => any;
          ondragleave: (ev: DragEvent) => any;
          ondragover: (ev: DragEvent) => any;
          ondragstart: (ev: DragEvent) => any;
          ondrop: (ev: DragEvent) => any;
          ondurationchange: (ev: Event) => any;
          onemptied: (ev: Event) => any;
          onended: (ev: Event) => any;
          onerror: ErrorEventHandler;
          onfocus: (ev: FocusEvent) => any;
          onhashchange: (ev: HashChangeEvent) => any;
          oninput: (ev: Event) => any;
          onkeydown: (ev: KeyboardEvent) => any;
          onkeypress: (ev: KeyboardEvent) => any;
          onkeyup: (ev: KeyboardEvent) => any;
          onload: (ev: Event) => any;
          onloadeddata: (ev: Event) => any;
          onloadedmetadata: (ev: Event) => any;
          onloadstart: (ev: Event) => any;
          onmessage: (ev: MessageEvent) => any;
          onmousedown: (ev: MouseEvent) => any;
          onmouseenter: (ev: MouseEvent) => any;
          onmouseleave: (ev: MouseEvent) => any;
          onmousemove: (ev: MouseEvent) => any;
          onmouseout: (ev: MouseEvent) => any;
          onmouseover: (ev: MouseEvent) => any;
          onmouseup: (ev: MouseEvent) => any;
          onmousewheel: (ev: MouseWheelEvent) => any;
          onmsgesturechange: (ev: MSGestureEvent) => any;
          onmsgesturedoubletap: (ev: MSGestureEvent) => any;
          onmsgestureend: (ev: MSGestureEvent) => any;
          onmsgesturehold: (ev: MSGestureEvent) => any;
          onmsgesturestart: (ev: MSGestureEvent) => any;
          onmsgesturetap: (ev: MSGestureEvent) => any;
          onmsinertiastart: (ev: MSGestureEvent) => any;
          onmspointercancel: (ev: MSPointerEvent) => any;
          onmspointerdown: (ev: MSPointerEvent) => any;
          onmspointerenter: (ev: MSPointerEvent) => any;
          onmspointerleave: (ev: MSPointerEvent) => any;
          onmspointermove: (ev: MSPointerEvent) => any;
          onmspointerout: (ev: MSPointerEvent) => any;
          onmspointerover: (ev: MSPointerEvent) => any;
          onmspointerup: (ev: MSPointerEvent) => any;
          onoffline: (ev: Event) => any;
          ononline: (ev: Event) => any;
          onorientationchange: (ev: Event) => any;
          onpagehide: (ev: PageTransitionEvent) => any;
          onpageshow: (ev: PageTransitionEvent) => any;
          onpause: (ev: Event) => any;
          onplay: (ev: Event) => any;
          onplaying: (ev: Event) => any;
          onpopstate: (ev: PopStateEvent) => any;
          onprogress: (ev: ProgressEvent) => any;
          onratechange: (ev: Event) => any;
          onreadystatechange: (ev: ProgressEvent) => any;
          onreset: (ev: Event) => any;
          onresize: (ev: UIEvent) => any;
          onscroll: (ev: UIEvent) => any;
          onseeked: (ev: Event) => any;
          onseeking: (ev: Event) => any;
          onselect: (ev: UIEvent) => any;
          onstalled: (ev: Event) => any;
          onstorage: (ev: StorageEvent) => any;
          onsubmit: (ev: Event) => any;
          onsuspend: (ev: Event) => any;
          ontimeupdate: (ev: Event) => any;
          ontouchcancel: any;
          ontouchend: any;
          ontouchmove: any;
          ontouchstart: any;
          onunload: (ev: Event) => any;
          onvolumechange: (ev: Event) => any;
          onwaiting: (ev: Event) => any;
          opener: Window;
          orientation: string;
          outerHeight: number;
          outerWidth: number;
          pageXOffset: number;
          pageYOffset: number;
          parent: Window;
          performance: Performance;
          personalbar: BarProp;
          screen: Screen;
          screenLeft: number;
          screenTop: number;
          screenX: number;
          screenY: number;
          scrollX: number;
          scrollY: number;
          scrollbars: BarProp;
          self: Window;
          status: string;
          statusbar: BarProp;
          styleMedia: StyleMedia;
          toolbar: BarProp;
          top: Window;
          window: Window;
          alert(message?: any): void;
          blur(): void;
          cancelAnimationFrame(handle: number): void;
          captureEvents(): void;
          close(): void;
          confirm(message?: string): boolean;
          focus(): void;
          getComputedStyle(elt: Element, pseudoElt?: string): CSSStyleDeclaration;
          getMatchedCSSRules(elt: Element, pseudoElt?: string): CSSRuleList;
          getSelection(): Selection;
          matchMedia(mediaQuery: string): MediaQueryList;
          moveBy(x?: number, y?: number): void;
          moveTo(x?: number, y?: number): void;
          msCancelRequestAnimationFrame(handle: number): void;
          msMatchMedia(mediaQuery: string): MediaQueryList;
          msRequestAnimationFrame(callback: FrameRequestCallback): number;
          msWriteProfilerMark(profilerMarkName: string): void;
          open(url?: string, target?: string, features?: string, replace?: boolean): any;
          postMessage(message: any, targetOrigin: string, ports?: any): void;
          print(): void;
          prompt(message?: string, _default?: string): string;
          releaseEvents(): void;
          requestAnimationFrame(callback: FrameRequestCallback): number;
          resizeBy(x?: number, y?: number): void;
          resizeTo(x?: number, y?: number): void;
          scroll(x?: number, y?: number): void;
          scrollBy(x?: number, y?: number): void;
          scrollTo(x?: number, y?: number): void;
          webkitConvertPointFromNodeToPage(node: Node, pt: WebKitPoint): WebKitPoint;
          webkitConvertPointFromPageToNode(node: Node, pt: WebKitPoint): WebKitPoint;
          addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureHold", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSGestureTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSInertiaStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerCancel", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerDown", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerEnter", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerLeave", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerMove", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerOut", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerOver", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "MSPointerUp", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "afterprint", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "beforeprint", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "beforeunload", listener: (ev: BeforeUnloadEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "blur", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "canplay", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "canplaythrough", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "change", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "click", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "compassneedscalibration", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "contextmenu", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "dblclick", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "devicemotion", listener: (ev: DeviceMotionEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "deviceorientation", listener: (ev: DeviceOrientationEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "drag", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "dragend", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "dragenter", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "dragleave", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "dragover", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "dragstart", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "drop", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "durationchange", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "emptied", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "ended", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "focus", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "hashchange", listener: (ev: HashChangeEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "input", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "keydown", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "keypress", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "keyup", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "loadeddata", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "loadedmetadata", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "message", listener: (ev: MessageEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mousedown", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mouseenter", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mouseleave", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mousemove", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mouseout", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mouseover", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mouseup", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "mousewheel", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "offline", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "online", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "orientationchange", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "pagehide", listener: (ev: PageTransitionEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pageshow", listener: (ev: PageTransitionEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "play", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "playing", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "pointercancel", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerdown", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerenter", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerleave", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointermove", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerout", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerover", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerup", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "popstate", listener: (ev: PopStateEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "ratechange", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "readystatechange", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "reset", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "resize", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "scroll", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "seeked", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "seeking", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "select", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "stalled", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "storage", listener: (ev: StorageEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "submit", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "suspend", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "timeupdate", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "unload", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "volumechange", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "waiting", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
          [index: number]: Window;
      }
      
      declare var Window: {
          prototype: Window;
          new(): Window;
      }
      
      interface Worker extends EventTarget, AbstractWorker {
          onmessage: (ev: MessageEvent) => any;
          postMessage(message: any, ports?: any): void;
          terminate(): void;
          addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "message", listener: (ev: MessageEvent) => any, useCapture?: boolean): void;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var Worker: {
          prototype: Worker;
          new(stringUrl: string): Worker;
      }
      
      interface XMLDocument extends Document {
      }
      
      declare var XMLDocument: {
          prototype: XMLDocument;
          new(): XMLDocument;
      }
      
      interface XMLHttpRequest extends EventTarget, XMLHttpRequestEventTarget {
          msCaching: string;
          onreadystatechange: (ev: ProgressEvent) => any;
          readyState: number;
          response: any;
          responseBody: any;
          responseText: string;
          responseType: string;
          responseXML: any;
          status: number;
          statusText: string;
          timeout: number;
          upload: XMLHttpRequestUpload;
          withCredentials: boolean;
          abort(): void;
          getAllResponseHeaders(): string;
          getResponseHeader(header: string): string;
          msCachingEnabled(): boolean;
          open(method: string, url: string, async?: boolean, user?: string, password?: string): void;
          overrideMimeType(mime: string): void;
          send(data?: Document): void;
          send(data?: string): void;
          send(data?: any): void;
          setRequestHeader(header: string, value: string): void;
          DONE: number;
          HEADERS_RECEIVED: number;
          LOADING: number;
          OPENED: number;
          UNSENT: number;
          addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "loadend", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "readystatechange", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "timeout", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var XMLHttpRequest: {
          prototype: XMLHttpRequest;
          new(): XMLHttpRequest;
          DONE: number;
          HEADERS_RECEIVED: number;
          LOADING: number;
          OPENED: number;
          UNSENT: number;
          create(): XMLHttpRequest;
      }
      
      interface XMLHttpRequestUpload extends EventTarget, XMLHttpRequestEventTarget {
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      declare var XMLHttpRequestUpload: {
          prototype: XMLHttpRequestUpload;
          new(): XMLHttpRequestUpload;
      }
      
      interface XMLSerializer {
          serializeToString(target: Node): string;
      }
      
      declare var XMLSerializer: {
          prototype: XMLSerializer;
          new(): XMLSerializer;
      }
      
      interface XPathEvaluator {
          createExpression(expression: string, resolver: XPathNSResolver): XPathExpression;
          createNSResolver(nodeResolver?: Node): XPathNSResolver;
          evaluate(expression: string, contextNode: Node, resolver: XPathNSResolver, type: number, result: XPathResult): XPathResult;
      }
      
      declare var XPathEvaluator: {
          prototype: XPathEvaluator;
          new(): XPathEvaluator;
      }
      
      interface XPathExpression {
          evaluate(contextNode: Node, type: number, result: XPathResult): XPathExpression;
      }
      
      declare var XPathExpression: {
          prototype: XPathExpression;
          new(): XPathExpression;
      }
      
      interface XPathNSResolver {
          lookupNamespaceURI(prefix: string): string;
      }
      
      declare var XPathNSResolver: {
          prototype: XPathNSResolver;
          new(): XPathNSResolver;
      }
      
      interface XPathResult {
          booleanValue: boolean;
          invalidIteratorState: boolean;
          numberValue: number;
          resultType: number;
          singleNodeValue: Node;
          snapshotLength: number;
          stringValue: string;
          iterateNext(): Node;
          snapshotItem(index: number): Node;
          ANY_TYPE: number;
          ANY_UNORDERED_NODE_TYPE: number;
          BOOLEAN_TYPE: number;
          FIRST_ORDERED_NODE_TYPE: number;
          NUMBER_TYPE: number;
          ORDERED_NODE_ITERATOR_TYPE: number;
          ORDERED_NODE_SNAPSHOT_TYPE: number;
          STRING_TYPE: number;
          UNORDERED_NODE_ITERATOR_TYPE: number;
          UNORDERED_NODE_SNAPSHOT_TYPE: number;
      }
      
      declare var XPathResult: {
          prototype: XPathResult;
          new(): XPathResult;
          ANY_TYPE: number;
          ANY_UNORDERED_NODE_TYPE: number;
          BOOLEAN_TYPE: number;
          FIRST_ORDERED_NODE_TYPE: number;
          NUMBER_TYPE: number;
          ORDERED_NODE_ITERATOR_TYPE: number;
          ORDERED_NODE_SNAPSHOT_TYPE: number;
          STRING_TYPE: number;
          UNORDERED_NODE_ITERATOR_TYPE: number;
          UNORDERED_NODE_SNAPSHOT_TYPE: number;
      }
      
      interface XSLTProcessor {
          clearParameters(): void;
          getParameter(namespaceURI: string, localName: string): any;
          importStylesheet(style: Node): void;
          removeParameter(namespaceURI: string, localName: string): void;
          reset(): void;
          setParameter(namespaceURI: string, localName: string, value: any): void;
          transformToDocument(source: Node): Document;
          transformToFragment(source: Node, document: Document): DocumentFragment;
      }
      
      declare var XSLTProcessor: {
          prototype: XSLTProcessor;
          new(): XSLTProcessor;
      }
      
      interface AbstractWorker {
          onerror: (ev: Event) => any;
          addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      interface ChildNode {
          remove(): void;
      }
      
      interface DOML2DeprecatedColorProperty {
          color: string;
      }
      
      interface DOML2DeprecatedSizeProperty {
          size: number;
      }
      
      interface DocumentEvent {
          createEvent(eventInterface:"AnimationEvent"): AnimationEvent;
          createEvent(eventInterface:"AriaRequestEvent"): AriaRequestEvent;
          createEvent(eventInterface:"AudioProcessingEvent"): AudioProcessingEvent;
          createEvent(eventInterface:"BeforeUnloadEvent"): BeforeUnloadEvent;
          createEvent(eventInterface:"CloseEvent"): CloseEvent;
          createEvent(eventInterface:"CommandEvent"): CommandEvent;
          createEvent(eventInterface:"CompositionEvent"): CompositionEvent;
          createEvent(eventInterface: "CustomEvent"): CustomEvent;
          createEvent(eventInterface:"DeviceMotionEvent"): DeviceMotionEvent;
          createEvent(eventInterface:"DeviceOrientationEvent"): DeviceOrientationEvent;
          createEvent(eventInterface:"DragEvent"): DragEvent;
          createEvent(eventInterface:"ErrorEvent"): ErrorEvent;
          createEvent(eventInterface:"Event"): Event;
          createEvent(eventInterface:"Events"): Event;
          createEvent(eventInterface:"FocusEvent"): FocusEvent;
          createEvent(eventInterface:"GamepadEvent"): GamepadEvent;
          createEvent(eventInterface:"HashChangeEvent"): HashChangeEvent;
          createEvent(eventInterface:"IDBVersionChangeEvent"): IDBVersionChangeEvent;
          createEvent(eventInterface:"KeyboardEvent"): KeyboardEvent;
          createEvent(eventInterface:"LongRunningScriptDetectedEvent"): LongRunningScriptDetectedEvent;
          createEvent(eventInterface:"MSGestureEvent"): MSGestureEvent;
          createEvent(eventInterface:"MSManipulationEvent"): MSManipulationEvent;
          createEvent(eventInterface:"MSMediaKeyMessageEvent"): MSMediaKeyMessageEvent;
          createEvent(eventInterface:"MSMediaKeyNeededEvent"): MSMediaKeyNeededEvent;
          createEvent(eventInterface:"MSPointerEvent"): MSPointerEvent;
          createEvent(eventInterface:"MSSiteModeEvent"): MSSiteModeEvent;
          createEvent(eventInterface:"MessageEvent"): MessageEvent;
          createEvent(eventInterface:"MouseEvent"): MouseEvent;
          createEvent(eventInterface:"MouseEvents"): MouseEvent;
          createEvent(eventInterface:"MouseWheelEvent"): MouseWheelEvent;
          createEvent(eventInterface:"MSGestureEvent"): MSGestureEvent;
          createEvent(eventInterface:"MSPointerEvent"): MSPointerEvent;
          createEvent(eventInterface:"MutationEvent"): MutationEvent;
          createEvent(eventInterface:"MutationEvents"): MutationEvent;
          createEvent(eventInterface:"NavigationCompletedEvent"): NavigationCompletedEvent;
          createEvent(eventInterface:"NavigationEvent"): NavigationEvent;
          createEvent(eventInterface:"NavigationEventWithReferrer"): NavigationEventWithReferrer;
          createEvent(eventInterface:"OfflineAudioCompletionEvent"): OfflineAudioCompletionEvent;
          createEvent(eventInterface:"PageTransitionEvent"): PageTransitionEvent;
          createEvent(eventInterface:"PermissionRequestedEvent"): PermissionRequestedEvent;
          createEvent(eventInterface:"PointerEvent"): PointerEvent;
          createEvent(eventInterface:"PopStateEvent"): PopStateEvent;
          createEvent(eventInterface:"ProgressEvent"): ProgressEvent;
          createEvent(eventInterface:"SVGZoomEvent"): SVGZoomEvent;
          createEvent(eventInterface:"SVGZoomEvents"): SVGZoomEvent;
          createEvent(eventInterface:"ScriptNotifyEvent"): ScriptNotifyEvent;
          createEvent(eventInterface:"StorageEvent"): StorageEvent;
          createEvent(eventInterface:"TextEvent"): TextEvent;
          createEvent(eventInterface:"TouchEvent"): TouchEvent;
          createEvent(eventInterface:"TrackEvent"): TrackEvent;
          createEvent(eventInterface:"TransitionEvent"): TransitionEvent;
          createEvent(eventInterface:"UIEvent"): UIEvent;
          createEvent(eventInterface:"UIEvents"): UIEvent;
          createEvent(eventInterface:"UnviewableContentIdentifiedEvent"): UnviewableContentIdentifiedEvent;
          createEvent(eventInterface:"WebGLContextEvent"): WebGLContextEvent;
          createEvent(eventInterface:"WheelEvent"): WheelEvent;
          createEvent(eventInterface: string): Event;
      }
      
      interface ElementTraversal {
          childElementCount: number;
          firstElementChild: Element;
          lastElementChild: Element;
          nextElementSibling: Element;
          previousElementSibling: Element;
      }
      
      interface GetSVGDocument {
          getSVGDocument(): Document;
      }
      
      interface GlobalEventHandlers {
          onpointercancel: (ev: PointerEvent) => any;
          onpointerdown: (ev: PointerEvent) => any;
          onpointerenter: (ev: PointerEvent) => any;
          onpointerleave: (ev: PointerEvent) => any;
          onpointermove: (ev: PointerEvent) => any;
          onpointerout: (ev: PointerEvent) => any;
          onpointerover: (ev: PointerEvent) => any;
          onpointerup: (ev: PointerEvent) => any;
          onwheel: (ev: WheelEvent) => any;
          addEventListener(type: "pointercancel", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerdown", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerenter", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerleave", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointermove", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerout", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerover", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "pointerup", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      interface HTMLTableAlignment {
          /**
            * Sets or retrieves a value that you can use to implement your own ch functionality for the object.
            */
          ch: string;
          /**
            * Sets or retrieves a value that you can use to implement your own chOff functionality for the object.
            */
          chOff: string;
          /**
            * Sets or retrieves how text and other content are vertically aligned within the object that contains them.
            */
          vAlign: string;
      }
      
      interface IDBEnvironment {
          indexedDB: IDBFactory;
          msIndexedDB: IDBFactory;
      }
      
      interface LinkStyle {
          sheet: StyleSheet;
      }
      
      interface MSBaseReader {
          onabort: (ev: Event) => any;
          onerror: (ev: Event) => any;
          onload: (ev: Event) => any;
          onloadend: (ev: ProgressEvent) => any;
          onloadstart: (ev: Event) => any;
          onprogress: (ev: ProgressEvent) => any;
          readyState: number;
          result: any;
          abort(): void;
          DONE: number;
          EMPTY: number;
          LOADING: number;
          addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "loadend", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      interface MSFileSaver {
          msSaveBlob(blob: any, defaultName?: string): boolean;
          msSaveOrOpenBlob(blob: any, defaultName?: string): boolean;
      }
      
      interface MSNavigatorDoNotTrack {
          confirmSiteSpecificTrackingException(args: ConfirmSiteSpecificExceptionsInformation): boolean;
          confirmWebWideTrackingException(args: ExceptionInformation): boolean;
          removeSiteSpecificTrackingException(args: ExceptionInformation): void;
          removeWebWideTrackingException(args: ExceptionInformation): void;
          storeSiteSpecificTrackingException(args: StoreSiteSpecificExceptionsInformation): void;
          storeWebWideTrackingException(args: StoreExceptionsInformation): void;
      }
      
      interface NavigatorContentUtils {
      }
      
      interface NavigatorGeolocation {
          geolocation: Geolocation;
      }
      
      interface NavigatorID {
          appName: string;
          appVersion: string;
          platform: string;
          product: string;
          productSub: string;
          userAgent: string;
          vendor: string;
          vendorSub: string;
      }
      
      interface NavigatorOnLine {
          onLine: boolean;
      }
      
      interface NavigatorStorageUtils {
      }
      
      interface NodeSelector {
          querySelector(selectors: string): Element;
          querySelectorAll(selectors: string): NodeList;
      }
      
      interface RandomSource {
          getRandomValues(array: ArrayBufferView): ArrayBufferView;
      }
      
      interface SVGAnimatedPathData {
          pathSegList: SVGPathSegList;
      }
      
      interface SVGAnimatedPoints {
          animatedPoints: SVGPointList;
          points: SVGPointList;
      }
      
      interface SVGExternalResourcesRequired {
          externalResourcesRequired: SVGAnimatedBoolean;
      }
      
      interface SVGFilterPrimitiveStandardAttributes extends SVGStylable {
          height: SVGAnimatedLength;
          result: SVGAnimatedString;
          width: SVGAnimatedLength;
          x: SVGAnimatedLength;
          y: SVGAnimatedLength;
      }
      
      interface SVGFitToViewBox {
          preserveAspectRatio: SVGAnimatedPreserveAspectRatio;
          viewBox: SVGAnimatedRect;
      }
      
      interface SVGLangSpace {
          xmllang: string;
          xmlspace: string;
      }
      
      interface SVGLocatable {
          farthestViewportElement: SVGElement;
          nearestViewportElement: SVGElement;
          getBBox(): SVGRect;
          getCTM(): SVGMatrix;
          getScreenCTM(): SVGMatrix;
          getTransformToElement(element: SVGElement): SVGMatrix;
      }
      
      interface SVGStylable {
          className: SVGAnimatedString;
          style: CSSStyleDeclaration;
      }
      
      interface SVGTests {
          requiredExtensions: SVGStringList;
          requiredFeatures: SVGStringList;
          systemLanguage: SVGStringList;
          hasExtension(extension: string): boolean;
      }
      
      interface SVGTransformable extends SVGLocatable {
          transform: SVGAnimatedTransformList;
      }
      
      interface SVGURIReference {
          href: SVGAnimatedString;
      }
      
      interface WindowBase64 {
          atob(encodedString: string): string;
          btoa(rawString: string): string;
      }
      
      interface WindowConsole {
          console: Console;
      }
      
      interface WindowLocalStorage {
          localStorage: Storage;
      }
      
      interface WindowSessionStorage {
          sessionStorage: Storage;
      }
      
      interface WindowTimers extends Object, WindowTimersExtension {
          clearInterval(handle: number): void;
          clearTimeout(handle: number): void;
          setInterval(handler: any, timeout?: any, ...args: any[]): number;
          setTimeout(handler: any, timeout?: any, ...args: any[]): number;
      }
      
      interface WindowTimersExtension {
          clearImmediate(handle: number): void;
          msClearImmediate(handle: number): void;
          msSetImmediate(expression: any, ...args: any[]): number;
          setImmediate(expression: any, ...args: any[]): number;
      }
      
      interface XMLHttpRequestEventTarget {
          onabort: (ev: Event) => any;
          onerror: (ev: Event) => any;
          onload: (ev: Event) => any;
          onloadend: (ev: ProgressEvent) => any;
          onloadstart: (ev: Event) => any;
          onprogress: (ev: ProgressEvent) => any;
          ontimeout: (ev: ProgressEvent) => any;
          addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "loadend", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void;
          addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
          addEventListener(type: "timeout", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
          addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      }
      
      
      interface NodeListOf<TNode extends Node> extends NodeList {
          length: number;
          item(index: number): TNode;
          [index: number]: TNode;
      }
      
      interface BlobPropertyBag {
          type?: string;
          endings?: string;
      }
      
      interface EventListenerObject {
          handleEvent(evt: Event): void;
      }
      
      declare type EventListenerOrEventListenerObject = EventListener | EventListenerObject;
      
      interface ErrorEventHandler {
          (event: Event, source?: string, fileno?: number, columnNumber?: number): void;
          (event: string, source?: string, fileno?: number, columnNumber?: number): void;
      }
      interface PositionCallback {
          (position: Position): void;
      }
      interface PositionErrorCallback {
          (error: PositionError): void;
      }
      interface MediaQueryListListener {
          (mql: MediaQueryList): void;
      }
      interface MSLaunchUriCallback {
          (): void;
      }
      interface FrameRequestCallback {
          (time: number): void;
      }
      interface MSUnsafeFunctionCallback {
          (): any;
      }
      interface MSExecAtPriorityFunctionCallback {
          (...args: any[]): any;
      }
      interface MutationCallback {
          (mutations: MutationRecord[], observer: MutationObserver): void;
      }
      interface DecodeSuccessCallback {
          (decodedData: AudioBuffer): void;
      }
      interface DecodeErrorCallback {
          (): void;
      }
      interface FunctionStringCallback {
          (data: string): void;
      }
      declare var Audio: {new(src?: string): HTMLAudioElement; };
      declare var Image: {new(width?: number, height?: number): HTMLImageElement; };
      declare var Option: {new(text?: string, value?: string, defaultSelected?: boolean, selected?: boolean): HTMLOptionElement; };
      declare var animationStartTime: number;
      declare var applicationCache: ApplicationCache;
      declare var clientInformation: Navigator;
      declare var closed: boolean;
      declare var crypto: Crypto;
      declare var defaultStatus: string;
      declare var devicePixelRatio: number;
      declare var doNotTrack: string;
      declare var document: Document;
      declare var event: Event;
      declare var external: External;
      declare var frameElement: Element;
      declare var frames: Window;
      declare var history: History;
      declare var innerHeight: number;
      declare var innerWidth: number;
      declare var length: number;
      declare var location: Location;
      declare var locationbar: BarProp;
      declare var menubar: BarProp;
      declare var msAnimationStartTime: number;
      declare var msTemplatePrinter: MSTemplatePrinter;
      declare var name: string;
      declare var navigator: Navigator;
      declare var offscreenBuffering: string | boolean;
      declare var onabort: (ev: Event) => any;
      declare var onafterprint: (ev: Event) => any;
      declare var onbeforeprint: (ev: Event) => any;
      declare var onbeforeunload: (ev: BeforeUnloadEvent) => any;
      declare var onblur: (ev: FocusEvent) => any;
      declare var oncanplay: (ev: Event) => any;
      declare var oncanplaythrough: (ev: Event) => any;
      declare var onchange: (ev: Event) => any;
      declare var onclick: (ev: MouseEvent) => any;
      declare var oncompassneedscalibration: (ev: Event) => any;
      declare var oncontextmenu: (ev: PointerEvent) => any;
      declare var ondblclick: (ev: MouseEvent) => any;
      declare var ondevicemotion: (ev: DeviceMotionEvent) => any;
      declare var ondeviceorientation: (ev: DeviceOrientationEvent) => any;
      declare var ondrag: (ev: DragEvent) => any;
      declare var ondragend: (ev: DragEvent) => any;
      declare var ondragenter: (ev: DragEvent) => any;
      declare var ondragleave: (ev: DragEvent) => any;
      declare var ondragover: (ev: DragEvent) => any;
      declare var ondragstart: (ev: DragEvent) => any;
      declare var ondrop: (ev: DragEvent) => any;
      declare var ondurationchange: (ev: Event) => any;
      declare var onemptied: (ev: Event) => any;
      declare var onended: (ev: Event) => any;
      declare var onerror: ErrorEventHandler;
      declare var onfocus: (ev: FocusEvent) => any;
      declare var onhashchange: (ev: HashChangeEvent) => any;
      declare var oninput: (ev: Event) => any;
      declare var onkeydown: (ev: KeyboardEvent) => any;
      declare var onkeypress: (ev: KeyboardEvent) => any;
      declare var onkeyup: (ev: KeyboardEvent) => any;
      declare var onload: (ev: Event) => any;
      declare var onloadeddata: (ev: Event) => any;
      declare var onloadedmetadata: (ev: Event) => any;
      declare var onloadstart: (ev: Event) => any;
      declare var onmessage: (ev: MessageEvent) => any;
      declare var onmousedown: (ev: MouseEvent) => any;
      declare var onmouseenter: (ev: MouseEvent) => any;
      declare var onmouseleave: (ev: MouseEvent) => any;
      declare var onmousemove: (ev: MouseEvent) => any;
      declare var onmouseout: (ev: MouseEvent) => any;
      declare var onmouseover: (ev: MouseEvent) => any;
      declare var onmouseup: (ev: MouseEvent) => any;
      declare var onmousewheel: (ev: MouseWheelEvent) => any;
      declare var onmsgesturechange: (ev: MSGestureEvent) => any;
      declare var onmsgesturedoubletap: (ev: MSGestureEvent) => any;
      declare var onmsgestureend: (ev: MSGestureEvent) => any;
      declare var onmsgesturehold: (ev: MSGestureEvent) => any;
      declare var onmsgesturestart: (ev: MSGestureEvent) => any;
      declare var onmsgesturetap: (ev: MSGestureEvent) => any;
      declare var onmsinertiastart: (ev: MSGestureEvent) => any;
      declare var onmspointercancel: (ev: MSPointerEvent) => any;
      declare var onmspointerdown: (ev: MSPointerEvent) => any;
      declare var onmspointerenter: (ev: MSPointerEvent) => any;
      declare var onmspointerleave: (ev: MSPointerEvent) => any;
      declare var onmspointermove: (ev: MSPointerEvent) => any;
      declare var onmspointerout: (ev: MSPointerEvent) => any;
      declare var onmspointerover: (ev: MSPointerEvent) => any;
      declare var onmspointerup: (ev: MSPointerEvent) => any;
      declare var onoffline: (ev: Event) => any;
      declare var ononline: (ev: Event) => any;
      declare var onorientationchange: (ev: Event) => any;
      declare var onpagehide: (ev: PageTransitionEvent) => any;
      declare var onpageshow: (ev: PageTransitionEvent) => any;
      declare var onpause: (ev: Event) => any;
      declare var onplay: (ev: Event) => any;
      declare var onplaying: (ev: Event) => any;
      declare var onpopstate: (ev: PopStateEvent) => any;
      declare var onprogress: (ev: ProgressEvent) => any;
      declare var onratechange: (ev: Event) => any;
      declare var onreadystatechange: (ev: ProgressEvent) => any;
      declare var onreset: (ev: Event) => any;
      declare var onresize: (ev: UIEvent) => any;
      declare var onscroll: (ev: UIEvent) => any;
      declare var onseeked: (ev: Event) => any;
      declare var onseeking: (ev: Event) => any;
      declare var onselect: (ev: UIEvent) => any;
      declare var onstalled: (ev: Event) => any;
      declare var onstorage: (ev: StorageEvent) => any;
      declare var onsubmit: (ev: Event) => any;
      declare var onsuspend: (ev: Event) => any;
      declare var ontimeupdate: (ev: Event) => any;
      declare var ontouchcancel: any;
      declare var ontouchend: any;
      declare var ontouchmove: any;
      declare var ontouchstart: any;
      declare var onunload: (ev: Event) => any;
      declare var onvolumechange: (ev: Event) => any;
      declare var onwaiting: (ev: Event) => any;
      declare var opener: Window;
      declare var orientation: string;
      declare var outerHeight: number;
      declare var outerWidth: number;
      declare var pageXOffset: number;
      declare var pageYOffset: number;
      declare var parent: Window;
      declare var performance: Performance;
      declare var personalbar: BarProp;
      declare var screen: Screen;
      declare var screenLeft: number;
      declare var screenTop: number;
      declare var screenX: number;
      declare var screenY: number;
      declare var scrollX: number;
      declare var scrollY: number;
      declare var scrollbars: BarProp;
      declare var self: Window;
      declare var status: string;
      declare var statusbar: BarProp;
      declare var styleMedia: StyleMedia;
      declare var toolbar: BarProp;
      declare var top: Window;
      declare var window: Window;
      declare function alert(message?: any): void;
      declare function blur(): void;
      declare function cancelAnimationFrame(handle: number): void;
      declare function captureEvents(): void;
      declare function close(): void;
      declare function confirm(message?: string): boolean;
      declare function focus(): void;
      declare function getComputedStyle(elt: Element, pseudoElt?: string): CSSStyleDeclaration;
      declare function getMatchedCSSRules(elt: Element, pseudoElt?: string): CSSRuleList;
      declare function getSelection(): Selection;
      declare function matchMedia(mediaQuery: string): MediaQueryList;
      declare function moveBy(x?: number, y?: number): void;
      declare function moveTo(x?: number, y?: number): void;
      declare function msCancelRequestAnimationFrame(handle: number): void;
      declare function msMatchMedia(mediaQuery: string): MediaQueryList;
      declare function msRequestAnimationFrame(callback: FrameRequestCallback): number;
      declare function msWriteProfilerMark(profilerMarkName: string): void;
      declare function open(url?: string, target?: string, features?: string, replace?: boolean): any;
      declare function postMessage(message: any, targetOrigin: string, ports?: any): void;
      declare function print(): void;
      declare function prompt(message?: string, _default?: string): string;
      declare function releaseEvents(): void;
      declare function requestAnimationFrame(callback: FrameRequestCallback): number;
      declare function resizeBy(x?: number, y?: number): void;
      declare function resizeTo(x?: number, y?: number): void;
      declare function scroll(x?: number, y?: number): void;
      declare function scrollBy(x?: number, y?: number): void;
      declare function scrollTo(x?: number, y?: number): void;
      declare function webkitConvertPointFromNodeToPage(node: Node, pt: WebKitPoint): WebKitPoint;
      declare function webkitConvertPointFromPageToNode(node: Node, pt: WebKitPoint): WebKitPoint;
      declare function toString(): string;
      declare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      declare function dispatchEvent(evt: Event): boolean;
      declare function removeEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      declare function clearInterval(handle: number): void;
      declare function clearTimeout(handle: number): void;
      declare function setInterval(handler: any, timeout?: any, ...args: any[]): number;
      declare function setTimeout(handler: any, timeout?: any, ...args: any[]): number;
      declare function clearImmediate(handle: number): void;
      declare function msClearImmediate(handle: number): void;
      declare function msSetImmediate(expression: any, ...args: any[]): number;
      declare function setImmediate(expression: any, ...args: any[]): number;
      declare var sessionStorage: Storage;
      declare var localStorage: Storage;
      declare var console: Console;
      declare var onpointercancel: (ev: PointerEvent) => any;
      declare var onpointerdown: (ev: PointerEvent) => any;
      declare var onpointerenter: (ev: PointerEvent) => any;
      declare var onpointerleave: (ev: PointerEvent) => any;
      declare var onpointermove: (ev: PointerEvent) => any;
      declare var onpointerout: (ev: PointerEvent) => any;
      declare var onpointerover: (ev: PointerEvent) => any;
      declare var onpointerup: (ev: PointerEvent) => any;
      declare var onwheel: (ev: WheelEvent) => any;
      declare var indexedDB: IDBFactory;
      declare var msIndexedDB: IDBFactory;
      declare function atob(encodedString: string): string;
      declare function btoa(rawString: string): string;
      declare function addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "MSGestureHold", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "MSGestureStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "MSGestureTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "MSInertiaStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "MSPointerCancel", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "MSPointerDown", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "MSPointerEnter", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "MSPointerLeave", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "MSPointerMove", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "MSPointerOut", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "MSPointerOver", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "MSPointerUp", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "afterprint", listener: (ev: Event) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "beforeprint", listener: (ev: Event) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "beforeunload", listener: (ev: BeforeUnloadEvent) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "blur", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "canplay", listener: (ev: Event) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "canplaythrough", listener: (ev: Event) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "change", listener: (ev: Event) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "click", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "compassneedscalibration", listener: (ev: Event) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "contextmenu", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "dblclick", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "devicemotion", listener: (ev: DeviceMotionEvent) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "deviceorientation", listener: (ev: DeviceOrientationEvent) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "drag", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "dragend", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "dragenter", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "dragleave", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "dragover", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "dragstart", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "drop", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "durationchange", listener: (ev: Event) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "emptied", listener: (ev: Event) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "ended", listener: (ev: Event) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "focus", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "hashchange", listener: (ev: HashChangeEvent) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "input", listener: (ev: Event) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "keydown", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "keypress", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "keyup", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "loadeddata", listener: (ev: Event) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "loadedmetadata", listener: (ev: Event) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "message", listener: (ev: MessageEvent) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "mousedown", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "mouseenter", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "mouseleave", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "mousemove", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "mouseout", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "mouseover", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "mouseup", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "mousewheel", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "offline", listener: (ev: Event) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "online", listener: (ev: Event) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "orientationchange", listener: (ev: Event) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "pagehide", listener: (ev: PageTransitionEvent) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "pageshow", listener: (ev: PageTransitionEvent) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "play", listener: (ev: Event) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "playing", listener: (ev: Event) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "pointercancel", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "pointerdown", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "pointerenter", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "pointerleave", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "pointermove", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "pointerout", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "pointerover", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "pointerup", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "popstate", listener: (ev: PopStateEvent) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "ratechange", listener: (ev: Event) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "readystatechange", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "reset", listener: (ev: Event) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "resize", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "scroll", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "seeked", listener: (ev: Event) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "seeking", listener: (ev: Event) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "select", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "stalled", listener: (ev: Event) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "storage", listener: (ev: StorageEvent) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "submit", listener: (ev: Event) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "suspend", listener: (ev: Event) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "timeupdate", listener: (ev: Event) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "unload", listener: (ev: Event) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "volumechange", listener: (ev: Event) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "waiting", listener: (ev: Event) => any, useCapture?: boolean): void;
      declare function addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;
      declare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
      /////////////////////////////
      /// WorkerGlobalScope APIs 
      /////////////////////////////
      // These are only available in a Web Worker 
      declare function importScripts(...urls: string[]): void;
      
      
      /////////////////////////////
      /// Windows Script Host APIS
      /////////////////////////////
      
      
      interface ActiveXObject {
          new (s: string): any;
      }
      declare var ActiveXObject: ActiveXObject;
      
      interface ITextWriter {
          Write(s: string): void;
          WriteLine(s: string): void;
          Close(): void;
      }
      
      interface TextStreamBase {
          /**
           * The column number of the current character position in an input stream.
           */
          Column: number;
      
          /**
           * The current line number in an input stream.
           */
          Line: number;
      
          /**
           * Closes a text stream.
           * It is not necessary to close standard streams; they close automatically when the process ends. If 
           * you close a standard stream, be aware that any other pointers to that standard stream become invalid.
           */
          Close(): void;
      }
      
      interface TextStreamWriter extends TextStreamBase {
          /**
           * Sends a string to an output stream.
           */
          Write(s: string): void;
      
          /**
           * Sends a specified number of blank lines (newline characters) to an output stream.
           */
          WriteBlankLines(intLines: number): void;
      
          /**
           * Sends a string followed by a newline character to an output stream.
           */
          WriteLine(s: string): void;
      }
      
      interface TextStreamReader extends TextStreamBase {
          /**
           * Returns a specified number of characters from an input stream, starting at the current pointer position.
           * Does not return until the ENTER key is pressed.
           * Can only be used on a stream in reading mode; causes an error in writing or appending mode.
           */
          Read(characters: number): string;
      
          /**
           * Returns all characters from an input stream.
           * Can only be used on a stream in reading mode; causes an error in writing or appending mode.
           */
          ReadAll(): string;
      
          /**
           * Returns an entire line from an input stream.
           * Although this method extracts the newline character, it does not add it to the returned string.
           * Can only be used on a stream in reading mode; causes an error in writing or appending mode.
           */
          ReadLine(): string;
      
          /**
           * Skips a specified number of characters when reading from an input text stream.
           * Can only be used on a stream in reading mode; causes an error in writing or appending mode.
           * @param characters Positive number of characters to skip forward. (Backward skipping is not supported.)
           */
          Skip(characters: number): void;
      
          /**
           * Skips the next line when reading from an input text stream.
           * Can only be used on a stream in reading mode, not writing or appending mode.
           */
          SkipLine(): void;
      
          /**
           * Indicates whether the stream pointer position is at the end of a line.
           */
          AtEndOfLine: boolean;
      
          /**
           * Indicates whether the stream pointer position is at the end of a stream.
           */
          AtEndOfStream: boolean;
      }
      
      declare var WScript: {
          /**
          * Outputs text to either a message box (under WScript.exe) or the command console window followed by
          * a newline (under CScript.exe).
          */
          Echo(s: any): void;
      
          /**
           * Exposes the write-only error output stream for the current script.
           * Can be accessed only while using CScript.exe.
           */
          StdErr: TextStreamWriter;
      
          /**
           * Exposes the write-only output stream for the current script.
           * Can be accessed only while using CScript.exe.
           */
          StdOut: TextStreamWriter;
          Arguments: { length: number; Item(n: number): string; };
      
          /**
           *  The full path of the currently running script.
           */
          ScriptFullName: string;
      
          /**
           * Forces the script to stop immediately, with an optional exit code.
           */
          Quit(exitCode?: number): number;
      
          /**
           * The Windows Script Host build version number.
           */
          BuildVersion: number;
      
          /**
           * Fully qualified path of the host executable.
           */
          FullName: string;
      
          /**
           * Gets/sets the script mode - interactive(true) or batch(false).
           */
          Interactive: boolean;
      
          /**
           * The name of the host executable (WScript.exe or CScript.exe).
           */
          Name: string;
      
          /**
           * Path of the directory containing the host executable.
           */
          Path: string;
      
          /**
           * The filename of the currently running script.
           */
          ScriptName: string;
      
          /**
           * Exposes the read-only input stream for the current script.
           * Can be accessed only while using CScript.exe.
           */
          StdIn: TextStreamReader;
      
          /**
           * Windows Script Host version
           */
          Version: string;
      
          /**
           * Connects a COM object's event sources to functions named with a given prefix, in the form prefix_event.
           */
          ConnectObject(objEventSource: any, strPrefix: string): void;
      
          /**
           * Creates a COM object.
           * @param strProgiID
           * @param strPrefix Function names in the form prefix_event will be bound to this object's COM events.
           */
          CreateObject(strProgID: string, strPrefix?: string): any;
      
          /**
           * Disconnects a COM object from its event sources.
           */
          DisconnectObject(obj: any): void;
      
          /**
           * Retrieves an existing object with the specified ProgID from memory, or creates a new one from a file.
           * @param strPathname Fully qualified path to the file containing the object persisted to disk.
           *                       For objects in memory, pass a zero-length string.
           * @param strProgID
           * @param strPrefix Function names in the form prefix_event will be bound to this object's COM events.
           */
          GetObject(strPathname: string, strProgID?: string, strPrefix?: string): any;
      
          /**
           * Suspends script execution for a specified length of time, then continues execution.
           * @param intTime Interval (in milliseconds) to suspend script execution.
           */
          Sleep(intTime: number): void;
      };
      
      /**
       * Allows enumerating over a COM collection, which may not have indexed item access.
       */
      interface Enumerator<T> {
          /**
           * Returns true if the current item is the last one in the collection, or the collection is empty,
           * or the current item is undefined.
           */
          atEnd(): boolean;
      
          /**
           * Returns the current item in the collection
           */
          item(): T;
      
          /**
           * Resets the current item in the collection to the first item. If there are no items in the collection,
           * the current item is set to undefined.
           */
          moveFirst(): void;
      
          /**
           * Moves the current item to the next item in the collection. If the enumerator is at the end of
           * the collection or the collection is empty, the current item is set to undefined.
           */
          moveNext(): void;
      }
      
      interface EnumeratorConstructor {
          new <T>(collection: any): Enumerator<T>;
          new (collection: any): Enumerator<any>;
      }
      
      declare var Enumerator: EnumeratorConstructor;
      
      /**
       * Enables reading from a COM safe array, which might have an alternate lower bound, or multiple dimensions.
       */
      interface VBArray<T> {
          /**
           * Returns the number of dimensions (1-based).
           */
          dimensions(): number;
      
          /**
           * Takes an index for each dimension in the array, and returns the item at the corresponding location.
           */
          getItem(dimension1Index: number, ...dimensionNIndexes: number[]): T;
      
          /**
           * Returns the smallest available index for a given dimension.
           * @param dimension 1-based dimension (defaults to 1)
           */
          lbound(dimension?: number): number;
      
          /**
           * Returns the largest available index for a given dimension.
           * @param dimension 1-based dimension (defaults to 1)
           */
          ubound(dimension?: number): number;
      
          /**
           * Returns a Javascript array with all the elements in the VBArray. If there are multiple dimensions,
           * each successive dimension is appended to the end of the array.
           * Example: [[1,2,3],[4,5,6]] becomes [1,2,3,4,5,6]
           */
          toArray(): T[];
      }
      
      interface VBArrayConstructor {
          new <T>(safeArray: any): VBArray<T>;
          new (safeArray: any): VBArray<any>;
      }
      
      declare var VBArray: VBArrayConstructor;
      
    • tsc.js
      /*! *****************************************************************************
      Copyright (c) Microsoft Corporation. All rights reserved. 
      Licensed under the Apache License, Version 2.0 (the "License"); you may not use
      this file except in compliance with the License. You may obtain a copy of the
      License at http://www.apache.org/licenses/LICENSE-2.0  
       
      THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
      KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
      WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, 
      MERCHANTABLITY OR NON-INFRINGEMENT. 
       
      See the Apache Version 2.0 License for specific language governing permissions
      and limitations under the License.
      ***************************************************************************** */
      
      var ts;
      (function (ts) {
          (function (ExitStatus) {
              ExitStatus[ExitStatus["Success"] = 0] = "Success";
              ExitStatus[ExitStatus["DiagnosticsPresent_OutputsSkipped"] = 1] = "DiagnosticsPresent_OutputsSkipped";
              ExitStatus[ExitStatus["DiagnosticsPresent_OutputsGenerated"] = 2] = "DiagnosticsPresent_OutputsGenerated";
          })(ts.ExitStatus || (ts.ExitStatus = {}));
          var ExitStatus = ts.ExitStatus;
          (function (DiagnosticCategory) {
              DiagnosticCategory[DiagnosticCategory["Warning"] = 0] = "Warning";
              DiagnosticCategory[DiagnosticCategory["Error"] = 1] = "Error";
              DiagnosticCategory[DiagnosticCategory["Message"] = 2] = "Message";
          })(ts.DiagnosticCategory || (ts.DiagnosticCategory = {}));
          var DiagnosticCategory = ts.DiagnosticCategory;
      })(ts || (ts = {}));
      /// <reference path="types.ts"/>
      var ts;
      (function (ts) {
          function forEach(array, callback) {
              if (array) {
                  for (var i = 0, len = array.length; i < len; i++) {
                      var result = callback(array[i], i);
                      if (result) {
                          return result;
                      }
                  }
              }
              return undefined;
          }
          ts.forEach = forEach;
          function contains(array, value) {
              if (array) {
                  for (var _i = 0; _i < array.length; _i++) {
                      var v = array[_i];
                      if (v === value) {
                          return true;
                      }
                  }
              }
              return false;
          }
          ts.contains = contains;
          function indexOf(array, value) {
              if (array) {
                  for (var i = 0, len = array.length; i < len; i++) {
                      if (array[i] === value) {
                          return i;
                      }
                  }
              }
              return -1;
          }
          ts.indexOf = indexOf;
          function countWhere(array, predicate) {
              var count = 0;
              if (array) {
                  for (var _i = 0; _i < array.length; _i++) {
                      var v = array[_i];
                      if (predicate(v)) {
                          count++;
                      }
                  }
              }
              return count;
          }
          ts.countWhere = countWhere;
          function filter(array, f) {
              var result;
              if (array) {
                  result = [];
                  for (var _i = 0; _i < array.length; _i++) {
                      var item = array[_i];
                      if (f(item)) {
                          result.push(item);
                      }
                  }
              }
              return result;
          }
          ts.filter = filter;
          function map(array, f) {
              var result;
              if (array) {
                  result = [];
                  for (var _i = 0; _i < array.length; _i++) {
                      var v = array[_i];
                      result.push(f(v));
                  }
              }
              return result;
          }
          ts.map = map;
          function concatenate(array1, array2) {
              if (!array2 || !array2.length)
                  return array1;
              if (!array1 || !array1.length)
                  return array2;
              return array1.concat(array2);
          }
          ts.concatenate = concatenate;
          function deduplicate(array) {
              var result;
              if (array) {
                  result = [];
                  for (var _i = 0; _i < array.length; _i++) {
                      var item = array[_i];
                      if (!contains(result, item)) {
                          result.push(item);
                      }
                  }
              }
              return result;
          }
          ts.deduplicate = deduplicate;
          function sum(array, prop) {
              var result = 0;
              for (var _i = 0; _i < array.length; _i++) {
                  var v = array[_i];
                  result += v[prop];
              }
              return result;
          }
          ts.sum = sum;
          function addRange(to, from) {
              if (to && from) {
                  for (var _i = 0; _i < from.length; _i++) {
                      var v = from[_i];
                      to.push(v);
                  }
              }
          }
          ts.addRange = addRange;
          function lastOrUndefined(array) {
              if (array.length === 0) {
                  return undefined;
              }
              return array[array.length - 1];
          }
          ts.lastOrUndefined = lastOrUndefined;
          function binarySearch(array, value) {
              var low = 0;
              var high = array.length - 1;
              while (low <= high) {
                  var middle = low + ((high - low) >> 1);
                  var midValue = array[middle];
                  if (midValue === value) {
                      return middle;
                  }
                  else if (midValue > value) {
                      high = middle - 1;
                  }
                  else {
                      low = middle + 1;
                  }
              }
              return ~low;
          }
          ts.binarySearch = binarySearch;
          function reduceLeft(array, f, initial) {
              if (array) {
                  var count = array.length;
                  if (count > 0) {
                      var pos = 0;
                      var result = arguments.length <= 2 ? array[pos++] : initial;
                      while (pos < count) {
                          result = f(result, array[pos++]);
                      }
                      return result;
                  }
              }
              return initial;
          }
          ts.reduceLeft = reduceLeft;
          function reduceRight(array, f, initial) {
              if (array) {
                  var pos = array.length - 1;
                  if (pos >= 0) {
                      var result = arguments.length <= 2 ? array[pos--] : initial;
                      while (pos >= 0) {
                          result = f(result, array[pos--]);
                      }
                      return result;
                  }
              }
              return initial;
          }
          ts.reduceRight = reduceRight;
          var hasOwnProperty = Object.prototype.hasOwnProperty;
          function hasProperty(map, key) {
              return hasOwnProperty.call(map, key);
          }
          ts.hasProperty = hasProperty;
          function getProperty(map, key) {
              return hasOwnProperty.call(map, key) ? map[key] : undefined;
          }
          ts.getProperty = getProperty;
          function isEmpty(map) {
              for (var id in map) {
                  if (hasProperty(map, id)) {
                      return false;
                  }
              }
              return true;
          }
          ts.isEmpty = isEmpty;
          function clone(object) {
              var result = {};
              for (var id in object) {
                  result[id] = object[id];
              }
              return result;
          }
          ts.clone = clone;
          function extend(first, second) {
              var result = {};
              for (var id in first) {
                  result[id] = first[id];
              }
              for (var id in second) {
                  if (!hasProperty(result, id)) {
                      result[id] = second[id];
                  }
              }
              return result;
          }
          ts.extend = extend;
          function forEachValue(map, callback) {
              var result;
              for (var id in map) {
                  if (result = callback(map[id]))
                      break;
              }
              return result;
          }
          ts.forEachValue = forEachValue;
          function forEachKey(map, callback) {
              var result;
              for (var id in map) {
                  if (result = callback(id))
                      break;
              }
              return result;
          }
          ts.forEachKey = forEachKey;
          function lookUp(map, key) {
              return hasProperty(map, key) ? map[key] : undefined;
          }
          ts.lookUp = lookUp;
          function copyMap(source, target) {
              for (var p in source) {
                  target[p] = source[p];
              }
          }
          ts.copyMap = copyMap;
          function arrayToMap(array, makeKey) {
              var result = {};
              forEach(array, function (value) {
                  result[makeKey(value)] = value;
              });
              return result;
          }
          ts.arrayToMap = arrayToMap;
          function memoize(callback) {
              var value;
              return function () {
                  if (callback) {
                      value = callback();
                      callback = undefined;
                  }
                  return value;
              };
          }
          ts.memoize = memoize;
          function formatStringFromArgs(text, args, baseIndex) {
              baseIndex = baseIndex || 0;
              return text.replace(/{(\d+)}/g, function (match, index) { return args[+index + baseIndex]; });
          }
          ts.localizedDiagnosticMessages = undefined;
          function getLocaleSpecificMessage(message) {
              return ts.localizedDiagnosticMessages && ts.localizedDiagnosticMessages[message]
                  ? ts.localizedDiagnosticMessages[message]
                  : message;
          }
          ts.getLocaleSpecificMessage = getLocaleSpecificMessage;
          function createFileDiagnostic(file, start, length, message) {
              var end = start + length;
              Debug.assert(start >= 0, "start must be non-negative, is " + start);
              Debug.assert(length >= 0, "length must be non-negative, is " + length);
              Debug.assert(start <= file.text.length, "start must be within the bounds of the file. " + start + " > " + file.text.length);
              Debug.assert(end <= file.text.length, "end must be the bounds of the file. " + end + " > " + file.text.length);
              var text = getLocaleSpecificMessage(message.key);
              if (arguments.length > 4) {
                  text = formatStringFromArgs(text, arguments, 4);
              }
              return {
                  file: file,
                  start: start,
                  length: length,
                  messageText: text,
                  category: message.category,
                  code: message.code
              };
          }
          ts.createFileDiagnostic = createFileDiagnostic;
          function createCompilerDiagnostic(message) {
              var text = getLocaleSpecificMessage(message.key);
              if (arguments.length > 1) {
                  text = formatStringFromArgs(text, arguments, 1);
              }
              return {
                  file: undefined,
                  start: undefined,
                  length: undefined,
                  messageText: text,
                  category: message.category,
                  code: message.code
              };
          }
          ts.createCompilerDiagnostic = createCompilerDiagnostic;
          function chainDiagnosticMessages(details, message) {
              var text = getLocaleSpecificMessage(message.key);
              if (arguments.length > 2) {
                  text = formatStringFromArgs(text, arguments, 2);
              }
              return {
                  messageText: text,
                  category: message.category,
                  code: message.code,
                  next: details
              };
          }
          ts.chainDiagnosticMessages = chainDiagnosticMessages;
          function concatenateDiagnosticMessageChains(headChain, tailChain) {
              Debug.assert(!headChain.next);
              headChain.next = tailChain;
              return headChain;
          }
          ts.concatenateDiagnosticMessageChains = concatenateDiagnosticMessageChains;
          function compareValues(a, b) {
              if (a === b)
                  return 0;
              if (a === undefined)
                  return -1;
              if (b === undefined)
                  return 1;
              return a < b ? -1 : 1;
          }
          ts.compareValues = compareValues;
          function getDiagnosticFileName(diagnostic) {
              return diagnostic.file ? diagnostic.file.fileName : undefined;
          }
          function compareDiagnostics(d1, d2) {
              return compareValues(getDiagnosticFileName(d1), getDiagnosticFileName(d2)) ||
                  compareValues(d1.start, d2.start) ||
                  compareValues(d1.length, d2.length) ||
                  compareValues(d1.code, d2.code) ||
                  compareMessageText(d1.messageText, d2.messageText) ||
                  0;
          }
          ts.compareDiagnostics = compareDiagnostics;
          function compareMessageText(text1, text2) {
              while (text1 && text2) {
                  var string1 = typeof text1 === "string" ? text1 : text1.messageText;
                  var string2 = typeof text2 === "string" ? text2 : text2.messageText;
                  var res = compareValues(string1, string2);
                  if (res) {
                      return res;
                  }
                  text1 = typeof text1 === "string" ? undefined : text1.next;
                  text2 = typeof text2 === "string" ? undefined : text2.next;
              }
              if (!text1 && !text2) {
                  return 0;
              }
              return text1 ? 1 : -1;
          }
          function sortAndDeduplicateDiagnostics(diagnostics) {
              return deduplicateSortedDiagnostics(diagnostics.sort(compareDiagnostics));
          }
          ts.sortAndDeduplicateDiagnostics = sortAndDeduplicateDiagnostics;
          function deduplicateSortedDiagnostics(diagnostics) {
              if (diagnostics.length < 2) {
                  return diagnostics;
              }
              var newDiagnostics = [diagnostics[0]];
              var previousDiagnostic = diagnostics[0];
              for (var i = 1; i < diagnostics.length; i++) {
                  var currentDiagnostic = diagnostics[i];
                  var isDupe = compareDiagnostics(currentDiagnostic, previousDiagnostic) === 0;
                  if (!isDupe) {
                      newDiagnostics.push(currentDiagnostic);
                      previousDiagnostic = currentDiagnostic;
                  }
              }
              return newDiagnostics;
          }
          ts.deduplicateSortedDiagnostics = deduplicateSortedDiagnostics;
          function normalizeSlashes(path) {
              return path.replace(/\\/g, "/");
          }
          ts.normalizeSlashes = normalizeSlashes;
          function getRootLength(path) {
              if (path.charCodeAt(0) === 47) {
                  if (path.charCodeAt(1) !== 47)
                      return 1;
                  var p1 = path.indexOf("/", 2);
                  if (p1 < 0)
                      return 2;
                  var p2 = path.indexOf("/", p1 + 1);
                  if (p2 < 0)
                      return p1 + 1;
                  return p2 + 1;
              }
              if (path.charCodeAt(1) === 58) {
                  if (path.charCodeAt(2) === 47)
                      return 3;
                  return 2;
              }
              if (path.lastIndexOf("file:///", 0) === 0) {
                  return "file:///".length;
              }
              var idx = path.indexOf('://');
              if (idx !== -1) {
                  return idx + "://".length;
              }
              return 0;
          }
          ts.getRootLength = getRootLength;
          ts.directorySeparator = "/";
          function getNormalizedParts(normalizedSlashedPath, rootLength) {
              var parts = normalizedSlashedPath.substr(rootLength).split(ts.directorySeparator);
              var normalized = [];
              for (var _i = 0; _i < parts.length; _i++) {
                  var part = parts[_i];
                  if (part !== ".") {
                      if (part === ".." && normalized.length > 0 && lastOrUndefined(normalized) !== "..") {
                          normalized.pop();
                      }
                      else {
                          if (part) {
                              normalized.push(part);
                          }
                      }
                  }
              }
              return normalized;
          }
          function normalizePath(path) {
              path = normalizeSlashes(path);
              var rootLength = getRootLength(path);
              var normalized = getNormalizedParts(path, rootLength);
              return path.substr(0, rootLength) + normalized.join(ts.directorySeparator);
          }
          ts.normalizePath = normalizePath;
          function getDirectoryPath(path) {
              return path.substr(0, Math.max(getRootLength(path), path.lastIndexOf(ts.directorySeparator)));
          }
          ts.getDirectoryPath = getDirectoryPath;
          function isUrl(path) {
              return path && !isRootedDiskPath(path) && path.indexOf("://") !== -1;
          }
          ts.isUrl = isUrl;
          function isRootedDiskPath(path) {
              return getRootLength(path) !== 0;
          }
          ts.isRootedDiskPath = isRootedDiskPath;
          function normalizedPathComponents(path, rootLength) {
              var normalizedParts = getNormalizedParts(path, rootLength);
              return [path.substr(0, rootLength)].concat(normalizedParts);
          }
          function getNormalizedPathComponents(path, currentDirectory) {
              path = normalizeSlashes(path);
              var rootLength = getRootLength(path);
              if (rootLength == 0) {
                  path = combinePaths(normalizeSlashes(currentDirectory), path);
                  rootLength = getRootLength(path);
              }
              return normalizedPathComponents(path, rootLength);
          }
          ts.getNormalizedPathComponents = getNormalizedPathComponents;
          function getNormalizedAbsolutePath(fileName, currentDirectory) {
              return getNormalizedPathFromPathComponents(getNormalizedPathComponents(fileName, currentDirectory));
          }
          ts.getNormalizedAbsolutePath = getNormalizedAbsolutePath;
          function getNormalizedPathFromPathComponents(pathComponents) {
              if (pathComponents && pathComponents.length) {
                  return pathComponents[0] + pathComponents.slice(1).join(ts.directorySeparator);
              }
          }
          ts.getNormalizedPathFromPathComponents = getNormalizedPathFromPathComponents;
          function getNormalizedPathComponentsOfUrl(url) {
              // Get root length of http://www.website.com/folder1/foler2/
              // In this example the root is:  http://www.website.com/ 
              // normalized path components should be ["http://www.website.com/", "folder1", "folder2"]
              var urlLength = url.length;
              var rootLength = url.indexOf("://") + "://".length;
              while (rootLength < urlLength) {
                  if (url.charCodeAt(rootLength) === 47) {
                      rootLength++;
                  }
                  else {
                      break;
                  }
              }
              if (rootLength === urlLength) {
                  return [url];
              }
              var indexOfNextSlash = url.indexOf(ts.directorySeparator, rootLength);
              if (indexOfNextSlash !== -1) {
                  rootLength = indexOfNextSlash + 1;
                  return normalizedPathComponents(url, rootLength);
              }
              else {
                  return [url + ts.directorySeparator];
              }
          }
          function getNormalizedPathOrUrlComponents(pathOrUrl, currentDirectory) {
              if (isUrl(pathOrUrl)) {
                  return getNormalizedPathComponentsOfUrl(pathOrUrl);
              }
              else {
                  return getNormalizedPathComponents(pathOrUrl, currentDirectory);
              }
          }
          function getRelativePathToDirectoryOrUrl(directoryPathOrUrl, relativeOrAbsolutePath, currentDirectory, getCanonicalFileName, isAbsolutePathAnUrl) {
              var pathComponents = getNormalizedPathOrUrlComponents(relativeOrAbsolutePath, currentDirectory);
              var directoryComponents = getNormalizedPathOrUrlComponents(directoryPathOrUrl, currentDirectory);
              if (directoryComponents.length > 1 && lastOrUndefined(directoryComponents) === "") {
                  directoryComponents.length--;
              }
              for (var joinStartIndex = 0; joinStartIndex < pathComponents.length && joinStartIndex < directoryComponents.length; joinStartIndex++) {
                  if (getCanonicalFileName(directoryComponents[joinStartIndex]) !== getCanonicalFileName(pathComponents[joinStartIndex])) {
                      break;
                  }
              }
              if (joinStartIndex) {
                  var relativePath = "";
                  var relativePathComponents = pathComponents.slice(joinStartIndex, pathComponents.length);
                  for (; joinStartIndex < directoryComponents.length; joinStartIndex++) {
                      if (directoryComponents[joinStartIndex] !== "") {
                          relativePath = relativePath + ".." + ts.directorySeparator;
                      }
                  }
                  return relativePath + relativePathComponents.join(ts.directorySeparator);
              }
              var absolutePath = getNormalizedPathFromPathComponents(pathComponents);
              if (isAbsolutePathAnUrl && isRootedDiskPath(absolutePath)) {
                  absolutePath = "file:///" + absolutePath;
              }
              return absolutePath;
          }
          ts.getRelativePathToDirectoryOrUrl = getRelativePathToDirectoryOrUrl;
          function getBaseFileName(path) {
              var i = path.lastIndexOf(ts.directorySeparator);
              return i < 0 ? path : path.substring(i + 1);
          }
          ts.getBaseFileName = getBaseFileName;
          function combinePaths(path1, path2) {
              if (!(path1 && path1.length))
                  return path2;
              if (!(path2 && path2.length))
                  return path1;
              if (getRootLength(path2) !== 0)
                  return path2;
              if (path1.charAt(path1.length - 1) === ts.directorySeparator)
                  return path1 + path2;
              return path1 + ts.directorySeparator + path2;
          }
          ts.combinePaths = combinePaths;
          function fileExtensionIs(path, extension) {
              var pathLen = path.length;
              var extLen = extension.length;
              return pathLen > extLen && path.substr(pathLen - extLen, extLen) === extension;
          }
          ts.fileExtensionIs = fileExtensionIs;
          ts.supportedExtensions = [".ts", ".d.ts"];
          var extensionsToRemove = [".d.ts", ".ts", ".js"];
          function removeFileExtension(path) {
              for (var _i = 0; _i < extensionsToRemove.length; _i++) {
                  var ext = extensionsToRemove[_i];
                  if (fileExtensionIs(path, ext)) {
                      return path.substr(0, path.length - ext.length);
                  }
              }
              return path;
          }
          ts.removeFileExtension = removeFileExtension;
          var backslashOrDoubleQuote = /[\"\\]/g;
          var escapedCharsRegExp = /[\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g;
          var escapedCharsMap = {
              "\0": "\\0",
              "\t": "\\t",
              "\v": "\\v",
              "\f": "\\f",
              "\b": "\\b",
              "\r": "\\r",
              "\n": "\\n",
              "\\": "\\\\",
              "\"": "\\\"",
              "\u2028": "\\u2028",
              "\u2029": "\\u2029",
              "\u0085": "\\u0085"
          };
          function Symbol(flags, name) {
              this.flags = flags;
              this.name = name;
              this.declarations = undefined;
          }
          function Type(checker, flags) {
              this.flags = flags;
          }
          function Signature(checker) {
          }
          ts.objectAllocator = {
              getNodeConstructor: function (kind) {
                  function Node() {
                  }
                  Node.prototype = {
                      kind: kind,
                      pos: 0,
                      end: 0,
                      flags: 0,
                      parent: undefined
                  };
                  return Node;
              },
              getSymbolConstructor: function () { return Symbol; },
              getTypeConstructor: function () { return Type; },
              getSignatureConstructor: function () { return Signature; }
          };
          var Debug;
          (function (Debug) {
              var currentAssertionLevel = 0;
              function shouldAssert(level) {
                  return currentAssertionLevel >= level;
              }
              Debug.shouldAssert = shouldAssert;
              function assert(expression, message, verboseDebugInfo) {
                  if (!expression) {
                      var verboseDebugString = "";
                      if (verboseDebugInfo) {
                          verboseDebugString = "\r\nVerbose Debug Information: " + verboseDebugInfo();
                      }
                      throw new Error("Debug Failure. False expression: " + (message || "") + verboseDebugString);
                  }
              }
              Debug.assert = assert;
              function fail(message) {
                  Debug.assert(false, message);
              }
              Debug.fail = fail;
          })(Debug = ts.Debug || (ts.Debug = {}));
      })(ts || (ts = {}));
      /// <reference path="core.ts"/>
      var ts;
      (function (ts) {
          ts.sys = (function () {
              function getWScriptSystem() {
                  var fso = new ActiveXObject("Scripting.FileSystemObject");
                  var fileStream = new ActiveXObject("ADODB.Stream");
                  fileStream.Type = 2;
                  var binaryStream = new ActiveXObject("ADODB.Stream");
                  binaryStream.Type = 1;
                  var args = [];
                  for (var i = 0; i < WScript.Arguments.length; i++) {
                      args[i] = WScript.Arguments.Item(i);
                  }
                  function readFile(fileName, encoding) {
                      if (!fso.FileExists(fileName)) {
                          return undefined;
                      }
                      fileStream.Open();
                      try {
                          if (encoding) {
                              fileStream.Charset = encoding;
                              fileStream.LoadFromFile(fileName);
                          }
                          else {
                              fileStream.Charset = "x-ansi";
                              fileStream.LoadFromFile(fileName);
                              var bom = fileStream.ReadText(2) || "";
                              fileStream.Position = 0;
                              fileStream.Charset = bom.length >= 2 && (bom.charCodeAt(0) === 0xFF && bom.charCodeAt(1) === 0xFE || bom.charCodeAt(0) === 0xFE && bom.charCodeAt(1) === 0xFF) ? "unicode" : "utf-8";
                          }
                          return fileStream.ReadText();
                      }
                      catch (e) {
                          throw e;
                      }
                      finally {
                          fileStream.Close();
                      }
                  }
                  function writeFile(fileName, data, writeByteOrderMark) {
                      fileStream.Open();
                      binaryStream.Open();
                      try {
                          fileStream.Charset = "utf-8";
                          fileStream.WriteText(data);
                          if (writeByteOrderMark) {
                              fileStream.Position = 0;
                          }
                          else {
                              fileStream.Position = 3;
                          }
                          fileStream.CopyTo(binaryStream);
                          binaryStream.SaveToFile(fileName, 2);
                      }
                      finally {
                          binaryStream.Close();
                          fileStream.Close();
                      }
                  }
                  function getNames(collection) {
                      var result = [];
                      for (var e = new Enumerator(collection); !e.atEnd(); e.moveNext()) {
                          result.push(e.item().Name);
                      }
                      return result.sort();
                  }
                  function readDirectory(path, extension) {
                      var result = [];
                      visitDirectory(path);
                      return result;
                      function visitDirectory(path) {
                          var folder = fso.GetFolder(path || ".");
                          var files = getNames(folder.files);
                          for (var _i = 0; _i < files.length; _i++) {
                              var name_1 = files[_i];
                              if (!extension || ts.fileExtensionIs(name_1, extension)) {
                                  result.push(ts.combinePaths(path, name_1));
                              }
                          }
                          var subfolders = getNames(folder.subfolders);
                          for (var _a = 0; _a < subfolders.length; _a++) {
                              var current = subfolders[_a];
                              visitDirectory(ts.combinePaths(path, current));
                          }
                      }
                  }
                  return {
                      args: args,
                      newLine: "\r\n",
                      useCaseSensitiveFileNames: false,
                      write: function (s) {
                          WScript.StdOut.Write(s);
                      },
                      readFile: readFile,
                      writeFile: writeFile,
                      resolvePath: function (path) {
                          return fso.GetAbsolutePathName(path);
                      },
                      fileExists: function (path) {
                          return fso.FileExists(path);
                      },
                      directoryExists: function (path) {
                          return fso.FolderExists(path);
                      },
                      createDirectory: function (directoryName) {
                          if (!this.directoryExists(directoryName)) {
                              fso.CreateFolder(directoryName);
                          }
                      },
                      getExecutingFilePath: function () {
                          return WScript.ScriptFullName;
                      },
                      getCurrentDirectory: function () {
                          return new ActiveXObject("WScript.Shell").CurrentDirectory;
                      },
                      readDirectory: readDirectory,
                      exit: function (exitCode) {
                          try {
                              WScript.Quit(exitCode);
                          }
                          catch (e) {
                          }
                      }
                  };
              }
              function getNodeSystem() {
                  var _fs = require("fs");
                  var _path = require("path");
                  var _os = require('os');
                  var platform = _os.platform();
                  var useCaseSensitiveFileNames = platform !== "win32" && platform !== "win64" && platform !== "darwin";
                  function readFile(fileName, encoding) {
                      if (!_fs.existsSync(fileName)) {
                          return undefined;
                      }
                      var buffer = _fs.readFileSync(fileName);
                      var len = buffer.length;
                      if (len >= 2 && buffer[0] === 0xFE && buffer[1] === 0xFF) {
                          len &= ~1;
                          for (var i = 0; i < len; i += 2) {
                              var temp = buffer[i];
                              buffer[i] = buffer[i + 1];
                              buffer[i + 1] = temp;
                          }
                          return buffer.toString("utf16le", 2);
                      }
                      if (len >= 2 && buffer[0] === 0xFF && buffer[1] === 0xFE) {
                          return buffer.toString("utf16le", 2);
                      }
                      if (len >= 3 && buffer[0] === 0xEF && buffer[1] === 0xBB && buffer[2] === 0xBF) {
                          return buffer.toString("utf8", 3);
                      }
                      return buffer.toString("utf8");
                  }
                  function writeFile(fileName, data, writeByteOrderMark) {
                      if (writeByteOrderMark) {
                          data = '\uFEFF' + data;
                      }
                      _fs.writeFileSync(fileName, data, "utf8");
                  }
                  function readDirectory(path, extension) {
                      var result = [];
                      visitDirectory(path);
                      return result;
                      function visitDirectory(path) {
                          var files = _fs.readdirSync(path || ".").sort();
                          var directories = [];
                          for (var _i = 0; _i < files.length; _i++) {
                              var current = files[_i];
                              var name = ts.combinePaths(path, current);
                              var stat = _fs.lstatSync(name);
                              if (stat.isFile()) {
                                  if (!extension || ts.fileExtensionIs(name, extension)) {
                                      result.push(name);
                                  }
                              }
                              else if (stat.isDirectory()) {
                                  directories.push(name);
                              }
                          }
                          for (var _a = 0; _a < directories.length; _a++) {
                              var current = directories[_a];
                              visitDirectory(current);
                          }
                      }
                  }
                  return {
                      args: process.argv.slice(2),
                      newLine: _os.EOL,
                      useCaseSensitiveFileNames: useCaseSensitiveFileNames,
                      write: function (s) {
                          _fs.writeSync(1, s);
                      },
                      readFile: readFile,
                      writeFile: writeFile,
                      watchFile: function (fileName, callback) {
                          _fs.watchFile(fileName, { persistent: true, interval: 250 }, fileChanged);
                          return {
                              close: function () { _fs.unwatchFile(fileName, fileChanged); }
                          };
                          function fileChanged(curr, prev) {
                              if (+curr.mtime <= +prev.mtime) {
                                  return;
                              }
                              callback(fileName);
                          }
                          ;
                      },
                      resolvePath: function (path) {
                          return _path.resolve(path);
                      },
                      fileExists: function (path) {
                          return _fs.existsSync(path);
                      },
                      directoryExists: function (path) {
                          return _fs.existsSync(path) && _fs.statSync(path).isDirectory();
                      },
                      createDirectory: function (directoryName) {
                          if (!this.directoryExists(directoryName)) {
                              _fs.mkdirSync(directoryName);
                          }
                      },
                      getExecutingFilePath: function () {
                          return __filename;
                      },
                      getCurrentDirectory: function () {
                          return process.cwd();
                      },
                      readDirectory: readDirectory,
                      getMemoryUsage: function () {
                          if (global.gc) {
                              global.gc();
                          }
                          return process.memoryUsage().heapUsed;
                      },
                      exit: function (exitCode) {
                          process.exit(exitCode);
                      }
                  };
              }
              if (typeof WScript !== "undefined" && typeof ActiveXObject === "function") {
                  return getWScriptSystem();
              }
              else if (typeof module !== "undefined" && module.exports) {
                  return getNodeSystem();
              }
              else {
                  return undefined;
              }
          })();
      })(ts || (ts = {}));
      /// <reference path="types.ts" />
      var ts;
      (function (ts) {
          ts.Diagnostics = {
              Unterminated_string_literal: { code: 1002, category: ts.DiagnosticCategory.Error, key: "Unterminated string literal." },
              Identifier_expected: { code: 1003, category: ts.DiagnosticCategory.Error, key: "Identifier expected." },
              _0_expected: { code: 1005, category: ts.DiagnosticCategory.Error, key: "'{0}' expected." },
              A_file_cannot_have_a_reference_to_itself: { code: 1006, category: ts.DiagnosticCategory.Error, key: "A file cannot have a reference to itself." },
              Trailing_comma_not_allowed: { code: 1009, category: ts.DiagnosticCategory.Error, key: "Trailing comma not allowed." },
              Asterisk_Slash_expected: { code: 1010, category: ts.DiagnosticCategory.Error, key: "'*/' expected." },
              Unexpected_token: { code: 1012, category: ts.DiagnosticCategory.Error, key: "Unexpected token." },
              A_rest_parameter_must_be_last_in_a_parameter_list: { code: 1014, category: ts.DiagnosticCategory.Error, key: "A rest parameter must be last in a parameter list." },
              Parameter_cannot_have_question_mark_and_initializer: { code: 1015, category: ts.DiagnosticCategory.Error, key: "Parameter cannot have question mark and initializer." },
              A_required_parameter_cannot_follow_an_optional_parameter: { code: 1016, category: ts.DiagnosticCategory.Error, key: "A required parameter cannot follow an optional parameter." },
              An_index_signature_cannot_have_a_rest_parameter: { code: 1017, category: ts.DiagnosticCategory.Error, key: "An index signature cannot have a rest parameter." },
              An_index_signature_parameter_cannot_have_an_accessibility_modifier: { code: 1018, category: ts.DiagnosticCategory.Error, key: "An index signature parameter cannot have an accessibility modifier." },
              An_index_signature_parameter_cannot_have_a_question_mark: { code: 1019, category: ts.DiagnosticCategory.Error, key: "An index signature parameter cannot have a question mark." },
              An_index_signature_parameter_cannot_have_an_initializer: { code: 1020, category: ts.DiagnosticCategory.Error, key: "An index signature parameter cannot have an initializer." },
              An_index_signature_must_have_a_type_annotation: { code: 1021, category: ts.DiagnosticCategory.Error, key: "An index signature must have a type annotation." },
              An_index_signature_parameter_must_have_a_type_annotation: { code: 1022, category: ts.DiagnosticCategory.Error, key: "An index signature parameter must have a type annotation." },
              An_index_signature_parameter_type_must_be_string_or_number: { code: 1023, category: ts.DiagnosticCategory.Error, key: "An index signature parameter type must be 'string' or 'number'." },
              A_class_or_interface_declaration_can_only_have_one_extends_clause: { code: 1024, category: ts.DiagnosticCategory.Error, key: "A class or interface declaration can only have one 'extends' clause." },
              An_extends_clause_must_precede_an_implements_clause: { code: 1025, category: ts.DiagnosticCategory.Error, key: "An 'extends' clause must precede an 'implements' clause." },
              A_class_can_only_extend_a_single_class: { code: 1026, category: ts.DiagnosticCategory.Error, key: "A class can only extend a single class." },
              A_class_declaration_can_only_have_one_implements_clause: { code: 1027, category: ts.DiagnosticCategory.Error, key: "A class declaration can only have one 'implements' clause." },
              Accessibility_modifier_already_seen: { code: 1028, category: ts.DiagnosticCategory.Error, key: "Accessibility modifier already seen." },
              _0_modifier_must_precede_1_modifier: { code: 1029, category: ts.DiagnosticCategory.Error, key: "'{0}' modifier must precede '{1}' modifier." },
              _0_modifier_already_seen: { code: 1030, category: ts.DiagnosticCategory.Error, key: "'{0}' modifier already seen." },
              _0_modifier_cannot_appear_on_a_class_element: { code: 1031, category: ts.DiagnosticCategory.Error, key: "'{0}' modifier cannot appear on a class element." },
              An_interface_declaration_cannot_have_an_implements_clause: { code: 1032, category: ts.DiagnosticCategory.Error, key: "An interface declaration cannot have an 'implements' clause." },
              super_must_be_followed_by_an_argument_list_or_member_access: { code: 1034, category: ts.DiagnosticCategory.Error, key: "'super' must be followed by an argument list or member access." },
              Only_ambient_modules_can_use_quoted_names: { code: 1035, category: ts.DiagnosticCategory.Error, key: "Only ambient modules can use quoted names." },
              Statements_are_not_allowed_in_ambient_contexts: { code: 1036, category: ts.DiagnosticCategory.Error, key: "Statements are not allowed in ambient contexts." },
              A_declare_modifier_cannot_be_used_in_an_already_ambient_context: { code: 1038, category: ts.DiagnosticCategory.Error, key: "A 'declare' modifier cannot be used in an already ambient context." },
              Initializers_are_not_allowed_in_ambient_contexts: { code: 1039, category: ts.DiagnosticCategory.Error, key: "Initializers are not allowed in ambient contexts." },
              _0_modifier_cannot_appear_on_a_module_element: { code: 1044, category: ts.DiagnosticCategory.Error, key: "'{0}' modifier cannot appear on a module element." },
              A_declare_modifier_cannot_be_used_with_an_interface_declaration: { code: 1045, category: ts.DiagnosticCategory.Error, key: "A 'declare' modifier cannot be used with an interface declaration." },
              A_declare_modifier_is_required_for_a_top_level_declaration_in_a_d_ts_file: { code: 1046, category: ts.DiagnosticCategory.Error, key: "A 'declare' modifier is required for a top level declaration in a .d.ts file." },
              A_rest_parameter_cannot_be_optional: { code: 1047, category: ts.DiagnosticCategory.Error, key: "A rest parameter cannot be optional." },
              A_rest_parameter_cannot_have_an_initializer: { code: 1048, category: ts.DiagnosticCategory.Error, key: "A rest parameter cannot have an initializer." },
              A_set_accessor_must_have_exactly_one_parameter: { code: 1049, category: ts.DiagnosticCategory.Error, key: "A 'set' accessor must have exactly one parameter." },
              A_set_accessor_cannot_have_an_optional_parameter: { code: 1051, category: ts.DiagnosticCategory.Error, key: "A 'set' accessor cannot have an optional parameter." },
              A_set_accessor_parameter_cannot_have_an_initializer: { code: 1052, category: ts.DiagnosticCategory.Error, key: "A 'set' accessor parameter cannot have an initializer." },
              A_set_accessor_cannot_have_rest_parameter: { code: 1053, category: ts.DiagnosticCategory.Error, key: "A 'set' accessor cannot have rest parameter." },
              A_get_accessor_cannot_have_parameters: { code: 1054, category: ts.DiagnosticCategory.Error, key: "A 'get' accessor cannot have parameters." },
              Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher: { code: 1056, category: ts.DiagnosticCategory.Error, key: "Accessors are only available when targeting ECMAScript 5 and higher." },
              Enum_member_must_have_initializer: { code: 1061, category: ts.DiagnosticCategory.Error, key: "Enum member must have initializer." },
              An_export_assignment_cannot_be_used_in_a_namespace: { code: 1063, category: ts.DiagnosticCategory.Error, key: "An export assignment cannot be used in a namespace." },
              Ambient_enum_elements_can_only_have_integer_literal_initializers: { code: 1066, category: ts.DiagnosticCategory.Error, key: "Ambient enum elements can only have integer literal initializers." },
              Unexpected_token_A_constructor_method_accessor_or_property_was_expected: { code: 1068, category: ts.DiagnosticCategory.Error, key: "Unexpected token. A constructor, method, accessor, or property was expected." },
              A_declare_modifier_cannot_be_used_with_an_import_declaration: { code: 1079, category: ts.DiagnosticCategory.Error, key: "A 'declare' modifier cannot be used with an import declaration." },
              Invalid_reference_directive_syntax: { code: 1084, category: ts.DiagnosticCategory.Error, key: "Invalid 'reference' directive syntax." },
              Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher: { code: 1085, category: ts.DiagnosticCategory.Error, key: "Octal literals are not available when targeting ECMAScript 5 and higher." },
              An_accessor_cannot_be_declared_in_an_ambient_context: { code: 1086, category: ts.DiagnosticCategory.Error, key: "An accessor cannot be declared in an ambient context." },
              _0_modifier_cannot_appear_on_a_constructor_declaration: { code: 1089, category: ts.DiagnosticCategory.Error, key: "'{0}' modifier cannot appear on a constructor declaration." },
              _0_modifier_cannot_appear_on_a_parameter: { code: 1090, category: ts.DiagnosticCategory.Error, key: "'{0}' modifier cannot appear on a parameter." },
              Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement: { code: 1091, category: ts.DiagnosticCategory.Error, key: "Only a single variable declaration is allowed in a 'for...in' statement." },
              Type_parameters_cannot_appear_on_a_constructor_declaration: { code: 1092, category: ts.DiagnosticCategory.Error, key: "Type parameters cannot appear on a constructor declaration." },
              Type_annotation_cannot_appear_on_a_constructor_declaration: { code: 1093, category: ts.DiagnosticCategory.Error, key: "Type annotation cannot appear on a constructor declaration." },
              An_accessor_cannot_have_type_parameters: { code: 1094, category: ts.DiagnosticCategory.Error, key: "An accessor cannot have type parameters." },
              A_set_accessor_cannot_have_a_return_type_annotation: { code: 1095, category: ts.DiagnosticCategory.Error, key: "A 'set' accessor cannot have a return type annotation." },
              An_index_signature_must_have_exactly_one_parameter: { code: 1096, category: ts.DiagnosticCategory.Error, key: "An index signature must have exactly one parameter." },
              _0_list_cannot_be_empty: { code: 1097, category: ts.DiagnosticCategory.Error, key: "'{0}' list cannot be empty." },
              Type_parameter_list_cannot_be_empty: { code: 1098, category: ts.DiagnosticCategory.Error, key: "Type parameter list cannot be empty." },
              Type_argument_list_cannot_be_empty: { code: 1099, category: ts.DiagnosticCategory.Error, key: "Type argument list cannot be empty." },
              Invalid_use_of_0_in_strict_mode: { code: 1100, category: ts.DiagnosticCategory.Error, key: "Invalid use of '{0}' in strict mode." },
              with_statements_are_not_allowed_in_strict_mode: { code: 1101, category: ts.DiagnosticCategory.Error, key: "'with' statements are not allowed in strict mode." },
              delete_cannot_be_called_on_an_identifier_in_strict_mode: { code: 1102, category: ts.DiagnosticCategory.Error, key: "'delete' cannot be called on an identifier in strict mode." },
              A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement: { code: 1104, category: ts.DiagnosticCategory.Error, key: "A 'continue' statement can only be used within an enclosing iteration statement." },
              A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement: { code: 1105, category: ts.DiagnosticCategory.Error, key: "A 'break' statement can only be used within an enclosing iteration or switch statement." },
              Jump_target_cannot_cross_function_boundary: { code: 1107, category: ts.DiagnosticCategory.Error, key: "Jump target cannot cross function boundary." },
              A_return_statement_can_only_be_used_within_a_function_body: { code: 1108, category: ts.DiagnosticCategory.Error, key: "A 'return' statement can only be used within a function body." },
              Expression_expected: { code: 1109, category: ts.DiagnosticCategory.Error, key: "Expression expected." },
              Type_expected: { code: 1110, category: ts.DiagnosticCategory.Error, key: "Type expected." },
              A_class_member_cannot_be_declared_optional: { code: 1112, category: ts.DiagnosticCategory.Error, key: "A class member cannot be declared optional." },
              A_default_clause_cannot_appear_more_than_once_in_a_switch_statement: { code: 1113, category: ts.DiagnosticCategory.Error, key: "A 'default' clause cannot appear more than once in a 'switch' statement." },
              Duplicate_label_0: { code: 1114, category: ts.DiagnosticCategory.Error, key: "Duplicate label '{0}'" },
              A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement: { code: 1115, category: ts.DiagnosticCategory.Error, key: "A 'continue' statement can only jump to a label of an enclosing iteration statement." },
              A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement: { code: 1116, category: ts.DiagnosticCategory.Error, key: "A 'break' statement can only jump to a label of an enclosing statement." },
              An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode: { code: 1117, category: ts.DiagnosticCategory.Error, key: "An object literal cannot have multiple properties with the same name in strict mode." },
              An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name: { code: 1118, category: ts.DiagnosticCategory.Error, key: "An object literal cannot have multiple get/set accessors with the same name." },
              An_object_literal_cannot_have_property_and_accessor_with_the_same_name: { code: 1119, category: ts.DiagnosticCategory.Error, key: "An object literal cannot have property and accessor with the same name." },
              An_export_assignment_cannot_have_modifiers: { code: 1120, category: ts.DiagnosticCategory.Error, key: "An export assignment cannot have modifiers." },
              Octal_literals_are_not_allowed_in_strict_mode: { code: 1121, category: ts.DiagnosticCategory.Error, key: "Octal literals are not allowed in strict mode." },
              A_tuple_type_element_list_cannot_be_empty: { code: 1122, category: ts.DiagnosticCategory.Error, key: "A tuple type element list cannot be empty." },
              Variable_declaration_list_cannot_be_empty: { code: 1123, category: ts.DiagnosticCategory.Error, key: "Variable declaration list cannot be empty." },
              Digit_expected: { code: 1124, category: ts.DiagnosticCategory.Error, key: "Digit expected." },
              Hexadecimal_digit_expected: { code: 1125, category: ts.DiagnosticCategory.Error, key: "Hexadecimal digit expected." },
              Unexpected_end_of_text: { code: 1126, category: ts.DiagnosticCategory.Error, key: "Unexpected end of text." },
              Invalid_character: { code: 1127, category: ts.DiagnosticCategory.Error, key: "Invalid character." },
              Declaration_or_statement_expected: { code: 1128, category: ts.DiagnosticCategory.Error, key: "Declaration or statement expected." },
              Statement_expected: { code: 1129, category: ts.DiagnosticCategory.Error, key: "Statement expected." },
              case_or_default_expected: { code: 1130, category: ts.DiagnosticCategory.Error, key: "'case' or 'default' expected." },
              Property_or_signature_expected: { code: 1131, category: ts.DiagnosticCategory.Error, key: "Property or signature expected." },
              Enum_member_expected: { code: 1132, category: ts.DiagnosticCategory.Error, key: "Enum member expected." },
              Type_reference_expected: { code: 1133, category: ts.DiagnosticCategory.Error, key: "Type reference expected." },
              Variable_declaration_expected: { code: 1134, category: ts.DiagnosticCategory.Error, key: "Variable declaration expected." },
              Argument_expression_expected: { code: 1135, category: ts.DiagnosticCategory.Error, key: "Argument expression expected." },
              Property_assignment_expected: { code: 1136, category: ts.DiagnosticCategory.Error, key: "Property assignment expected." },
              Expression_or_comma_expected: { code: 1137, category: ts.DiagnosticCategory.Error, key: "Expression or comma expected." },
              Parameter_declaration_expected: { code: 1138, category: ts.DiagnosticCategory.Error, key: "Parameter declaration expected." },
              Type_parameter_declaration_expected: { code: 1139, category: ts.DiagnosticCategory.Error, key: "Type parameter declaration expected." },
              Type_argument_expected: { code: 1140, category: ts.DiagnosticCategory.Error, key: "Type argument expected." },
              String_literal_expected: { code: 1141, category: ts.DiagnosticCategory.Error, key: "String literal expected." },
              Line_break_not_permitted_here: { code: 1142, category: ts.DiagnosticCategory.Error, key: "Line break not permitted here." },
              or_expected: { code: 1144, category: ts.DiagnosticCategory.Error, key: "'{' or ';' expected." },
              Modifiers_not_permitted_on_index_signature_members: { code: 1145, category: ts.DiagnosticCategory.Error, key: "Modifiers not permitted on index signature members." },
              Declaration_expected: { code: 1146, category: ts.DiagnosticCategory.Error, key: "Declaration expected." },
              Import_declarations_in_a_namespace_cannot_reference_a_module: { code: 1147, category: ts.DiagnosticCategory.Error, key: "Import declarations in a namespace cannot reference a module." },
              Cannot_compile_modules_unless_the_module_flag_is_provided: { code: 1148, category: ts.DiagnosticCategory.Error, key: "Cannot compile modules unless the '--module' flag is provided." },
              File_name_0_differs_from_already_included_file_name_1_only_in_casing: { code: 1149, category: ts.DiagnosticCategory.Error, key: "File name '{0}' differs from already included file name '{1}' only in casing" },
              new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead: { code: 1150, category: ts.DiagnosticCategory.Error, key: "'new T[]' cannot be used to create an array. Use 'new Array<T>()' instead." },
              var_let_or_const_expected: { code: 1152, category: ts.DiagnosticCategory.Error, key: "'var', 'let' or 'const' expected." },
              let_declarations_are_only_available_when_targeting_ECMAScript_6_and_higher: { code: 1153, category: ts.DiagnosticCategory.Error, key: "'let' declarations are only available when targeting ECMAScript 6 and higher." },
              const_declarations_are_only_available_when_targeting_ECMAScript_6_and_higher: { code: 1154, category: ts.DiagnosticCategory.Error, key: "'const' declarations are only available when targeting ECMAScript 6 and higher." },
              const_declarations_must_be_initialized: { code: 1155, category: ts.DiagnosticCategory.Error, key: "'const' declarations must be initialized" },
              const_declarations_can_only_be_declared_inside_a_block: { code: 1156, category: ts.DiagnosticCategory.Error, key: "'const' declarations can only be declared inside a block." },
              let_declarations_can_only_be_declared_inside_a_block: { code: 1157, category: ts.DiagnosticCategory.Error, key: "'let' declarations can only be declared inside a block." },
              Unterminated_template_literal: { code: 1160, category: ts.DiagnosticCategory.Error, key: "Unterminated template literal." },
              Unterminated_regular_expression_literal: { code: 1161, category: ts.DiagnosticCategory.Error, key: "Unterminated regular expression literal." },
              An_object_member_cannot_be_declared_optional: { code: 1162, category: ts.DiagnosticCategory.Error, key: "An object member cannot be declared optional." },
              yield_expression_must_be_contained_within_a_generator_declaration: { code: 1163, category: ts.DiagnosticCategory.Error, key: "'yield' expression must be contained_within a generator declaration." },
              Computed_property_names_are_not_allowed_in_enums: { code: 1164, category: ts.DiagnosticCategory.Error, key: "Computed property names are not allowed in enums." },
              A_computed_property_name_in_an_ambient_context_must_directly_refer_to_a_built_in_symbol: { code: 1165, category: ts.DiagnosticCategory.Error, key: "A computed property name in an ambient context must directly refer to a built-in symbol." },
              A_computed_property_name_in_a_class_property_declaration_must_directly_refer_to_a_built_in_symbol: { code: 1166, category: ts.DiagnosticCategory.Error, key: "A computed property name in a class property declaration must directly refer to a built-in symbol." },
              Computed_property_names_are_only_available_when_targeting_ECMAScript_6_and_higher: { code: 1167, category: ts.DiagnosticCategory.Error, key: "Computed property names are only available when targeting ECMAScript 6 and higher." },
              A_computed_property_name_in_a_method_overload_must_directly_refer_to_a_built_in_symbol: { code: 1168, category: ts.DiagnosticCategory.Error, key: "A computed property name in a method overload must directly refer to a built-in symbol." },
              A_computed_property_name_in_an_interface_must_directly_refer_to_a_built_in_symbol: { code: 1169, category: ts.DiagnosticCategory.Error, key: "A computed property name in an interface must directly refer to a built-in symbol." },
              A_computed_property_name_in_a_type_literal_must_directly_refer_to_a_built_in_symbol: { code: 1170, category: ts.DiagnosticCategory.Error, key: "A computed property name in a type literal must directly refer to a built-in symbol." },
              A_comma_expression_is_not_allowed_in_a_computed_property_name: { code: 1171, category: ts.DiagnosticCategory.Error, key: "A comma expression is not allowed in a computed property name." },
              extends_clause_already_seen: { code: 1172, category: ts.DiagnosticCategory.Error, key: "'extends' clause already seen." },
              extends_clause_must_precede_implements_clause: { code: 1173, category: ts.DiagnosticCategory.Error, key: "'extends' clause must precede 'implements' clause." },
              Classes_can_only_extend_a_single_class: { code: 1174, category: ts.DiagnosticCategory.Error, key: "Classes can only extend a single class." },
              implements_clause_already_seen: { code: 1175, category: ts.DiagnosticCategory.Error, key: "'implements' clause already seen." },
              Interface_declaration_cannot_have_implements_clause: { code: 1176, category: ts.DiagnosticCategory.Error, key: "Interface declaration cannot have 'implements' clause." },
              Binary_digit_expected: { code: 1177, category: ts.DiagnosticCategory.Error, key: "Binary digit expected." },
              Octal_digit_expected: { code: 1178, category: ts.DiagnosticCategory.Error, key: "Octal digit expected." },
              Unexpected_token_expected: { code: 1179, category: ts.DiagnosticCategory.Error, key: "Unexpected token. '{' expected." },
              Property_destructuring_pattern_expected: { code: 1180, category: ts.DiagnosticCategory.Error, key: "Property destructuring pattern expected." },
              Array_element_destructuring_pattern_expected: { code: 1181, category: ts.DiagnosticCategory.Error, key: "Array element destructuring pattern expected." },
              A_destructuring_declaration_must_have_an_initializer: { code: 1182, category: ts.DiagnosticCategory.Error, key: "A destructuring declaration must have an initializer." },
              Destructuring_declarations_are_not_allowed_in_ambient_contexts: { code: 1183, category: ts.DiagnosticCategory.Error, key: "Destructuring declarations are not allowed in ambient contexts." },
              An_implementation_cannot_be_declared_in_ambient_contexts: { code: 1184, category: ts.DiagnosticCategory.Error, key: "An implementation cannot be declared in ambient contexts." },
              Modifiers_cannot_appear_here: { code: 1184, category: ts.DiagnosticCategory.Error, key: "Modifiers cannot appear here." },
              Merge_conflict_marker_encountered: { code: 1185, category: ts.DiagnosticCategory.Error, key: "Merge conflict marker encountered." },
              A_rest_element_cannot_have_an_initializer: { code: 1186, category: ts.DiagnosticCategory.Error, key: "A rest element cannot have an initializer." },
              A_parameter_property_may_not_be_a_binding_pattern: { code: 1187, category: ts.DiagnosticCategory.Error, key: "A parameter property may not be a binding pattern." },
              Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement: { code: 1188, category: ts.DiagnosticCategory.Error, key: "Only a single variable declaration is allowed in a 'for...of' statement." },
              The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer: { code: 1189, category: ts.DiagnosticCategory.Error, key: "The variable declaration of a 'for...in' statement cannot have an initializer." },
              The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer: { code: 1190, category: ts.DiagnosticCategory.Error, key: "The variable declaration of a 'for...of' statement cannot have an initializer." },
              An_import_declaration_cannot_have_modifiers: { code: 1191, category: ts.DiagnosticCategory.Error, key: "An import declaration cannot have modifiers." },
              Module_0_has_no_default_export: { code: 1192, category: ts.DiagnosticCategory.Error, key: "Module '{0}' has no default export." },
              An_export_declaration_cannot_have_modifiers: { code: 1193, category: ts.DiagnosticCategory.Error, key: "An export declaration cannot have modifiers." },
              Export_declarations_are_not_permitted_in_a_namespace: { code: 1194, category: ts.DiagnosticCategory.Error, key: "Export declarations are not permitted in a namespace." },
              Catch_clause_variable_name_must_be_an_identifier: { code: 1195, category: ts.DiagnosticCategory.Error, key: "Catch clause variable name must be an identifier." },
              Catch_clause_variable_cannot_have_a_type_annotation: { code: 1196, category: ts.DiagnosticCategory.Error, key: "Catch clause variable cannot have a type annotation." },
              Catch_clause_variable_cannot_have_an_initializer: { code: 1197, category: ts.DiagnosticCategory.Error, key: "Catch clause variable cannot have an initializer." },
              An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive: { code: 1198, category: ts.DiagnosticCategory.Error, key: "An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive." },
              Unterminated_Unicode_escape_sequence: { code: 1199, category: ts.DiagnosticCategory.Error, key: "Unterminated Unicode escape sequence." },
              Line_terminator_not_permitted_before_arrow: { code: 1200, category: ts.DiagnosticCategory.Error, key: "Line terminator not permitted before arrow." },
              Import_assignment_cannot_be_used_when_targeting_ECMAScript_6_or_higher_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_or_import_d_from_mod_instead: { code: 1202, category: ts.DiagnosticCategory.Error, key: "Import assignment cannot be used when targeting ECMAScript 6 or higher. Consider using 'import * as ns from \"mod\"', 'import {a} from \"mod\"' or 'import d from \"mod\"' instead." },
              Export_assignment_cannot_be_used_when_targeting_ECMAScript_6_or_higher_Consider_using_export_default_instead: { code: 1203, category: ts.DiagnosticCategory.Error, key: "Export assignment cannot be used when targeting ECMAScript 6 or higher. Consider using 'export default' instead." },
              Cannot_compile_modules_into_commonjs_amd_system_or_umd_when_targeting_ES6_or_higher: { code: 1204, category: ts.DiagnosticCategory.Error, key: "Cannot compile modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher." },
              Decorators_are_only_available_when_targeting_ECMAScript_5_and_higher: { code: 1205, category: ts.DiagnosticCategory.Error, key: "Decorators are only available when targeting ECMAScript 5 and higher." },
              Decorators_are_not_valid_here: { code: 1206, category: ts.DiagnosticCategory.Error, key: "Decorators are not valid here." },
              Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name: { code: 1207, category: ts.DiagnosticCategory.Error, key: "Decorators cannot be applied to multiple get/set accessors of the same name." },
              Cannot_compile_namespaces_when_the_separateCompilation_flag_is_provided: { code: 1208, category: ts.DiagnosticCategory.Error, key: "Cannot compile namespaces when the '--separateCompilation' flag is provided." },
              Ambient_const_enums_are_not_allowed_when_the_separateCompilation_flag_is_provided: { code: 1209, category: ts.DiagnosticCategory.Error, key: "Ambient const enums are not allowed when the '--separateCompilation' flag is provided." },
              Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode: { code: 1210, category: ts.DiagnosticCategory.Error, key: "Invalid use of '{0}'. Class definitions are automatically in strict mode." },
              A_class_declaration_without_the_default_modifier_must_have_a_name: { code: 1211, category: ts.DiagnosticCategory.Error, key: "A class declaration without the 'default' modifier must have a name" },
              Identifier_expected_0_is_a_reserved_word_in_strict_mode: { code: 1212, category: ts.DiagnosticCategory.Error, key: "Identifier expected. '{0}' is a reserved word in strict mode" },
              Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode: { code: 1213, category: ts.DiagnosticCategory.Error, key: "Identifier expected. '{0}' is a reserved word in strict mode. Class definitions are automatically in strict mode." },
              Type_expected_0_is_a_reserved_word_in_strict_mode: { code: 1215, category: ts.DiagnosticCategory.Error, key: "Type expected. '{0}' is a reserved word in strict mode" },
              Type_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode: { code: 1216, category: ts.DiagnosticCategory.Error, key: "Type expected. '{0}' is a reserved word in strict mode. Class definitions are automatically in strict mode." },
              Export_assignment_is_not_supported_when_module_flag_is_system: { code: 1218, category: ts.DiagnosticCategory.Error, key: "Export assignment is not supported when '--module' flag is 'system'." },
              Duplicate_identifier_0: { code: 2300, category: ts.DiagnosticCategory.Error, key: "Duplicate identifier '{0}'." },
              Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: { code: 2301, category: ts.DiagnosticCategory.Error, key: "Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor." },
              Static_members_cannot_reference_class_type_parameters: { code: 2302, category: ts.DiagnosticCategory.Error, key: "Static members cannot reference class type parameters." },
              Circular_definition_of_import_alias_0: { code: 2303, category: ts.DiagnosticCategory.Error, key: "Circular definition of import alias '{0}'." },
              Cannot_find_name_0: { code: 2304, category: ts.DiagnosticCategory.Error, key: "Cannot find name '{0}'." },
              Module_0_has_no_exported_member_1: { code: 2305, category: ts.DiagnosticCategory.Error, key: "Module '{0}' has no exported member '{1}'." },
              File_0_is_not_a_module: { code: 2306, category: ts.DiagnosticCategory.Error, key: "File '{0}' is not a module." },
              Cannot_find_module_0: { code: 2307, category: ts.DiagnosticCategory.Error, key: "Cannot find module '{0}'." },
              A_module_cannot_have_more_than_one_export_assignment: { code: 2308, category: ts.DiagnosticCategory.Error, key: "A module cannot have more than one export assignment." },
              An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements: { code: 2309, category: ts.DiagnosticCategory.Error, key: "An export assignment cannot be used in a module with other exported elements." },
              Type_0_recursively_references_itself_as_a_base_type: { code: 2310, category: ts.DiagnosticCategory.Error, key: "Type '{0}' recursively references itself as a base type." },
              A_class_may_only_extend_another_class: { code: 2311, category: ts.DiagnosticCategory.Error, key: "A class may only extend another class." },
              An_interface_may_only_extend_a_class_or_another_interface: { code: 2312, category: ts.DiagnosticCategory.Error, key: "An interface may only extend a class or another interface." },
              Constraint_of_a_type_parameter_cannot_reference_any_type_parameter_from_the_same_type_parameter_list: { code: 2313, category: ts.DiagnosticCategory.Error, key: "Constraint of a type parameter cannot reference any type parameter from the same type parameter list." },
              Generic_type_0_requires_1_type_argument_s: { code: 2314, category: ts.DiagnosticCategory.Error, key: "Generic type '{0}' requires {1} type argument(s)." },
              Type_0_is_not_generic: { code: 2315, category: ts.DiagnosticCategory.Error, key: "Type '{0}' is not generic." },
              Global_type_0_must_be_a_class_or_interface_type: { code: 2316, category: ts.DiagnosticCategory.Error, key: "Global type '{0}' must be a class or interface type." },
              Global_type_0_must_have_1_type_parameter_s: { code: 2317, category: ts.DiagnosticCategory.Error, key: "Global type '{0}' must have {1} type parameter(s)." },
              Cannot_find_global_type_0: { code: 2318, category: ts.DiagnosticCategory.Error, key: "Cannot find global type '{0}'." },
              Named_property_0_of_types_1_and_2_are_not_identical: { code: 2319, category: ts.DiagnosticCategory.Error, key: "Named property '{0}' of types '{1}' and '{2}' are not identical." },
              Interface_0_cannot_simultaneously_extend_types_1_and_2: { code: 2320, category: ts.DiagnosticCategory.Error, key: "Interface '{0}' cannot simultaneously extend types '{1}' and '{2}'." },
              Excessive_stack_depth_comparing_types_0_and_1: { code: 2321, category: ts.DiagnosticCategory.Error, key: "Excessive stack depth comparing types '{0}' and '{1}'." },
              Type_0_is_not_assignable_to_type_1: { code: 2322, category: ts.DiagnosticCategory.Error, key: "Type '{0}' is not assignable to type '{1}'." },
              Property_0_is_missing_in_type_1: { code: 2324, category: ts.DiagnosticCategory.Error, key: "Property '{0}' is missing in type '{1}'." },
              Property_0_is_private_in_type_1_but_not_in_type_2: { code: 2325, category: ts.DiagnosticCategory.Error, key: "Property '{0}' is private in type '{1}' but not in type '{2}'." },
              Types_of_property_0_are_incompatible: { code: 2326, category: ts.DiagnosticCategory.Error, key: "Types of property '{0}' are incompatible." },
              Property_0_is_optional_in_type_1_but_required_in_type_2: { code: 2327, category: ts.DiagnosticCategory.Error, key: "Property '{0}' is optional in type '{1}' but required in type '{2}'." },
              Types_of_parameters_0_and_1_are_incompatible: { code: 2328, category: ts.DiagnosticCategory.Error, key: "Types of parameters '{0}' and '{1}' are incompatible." },
              Index_signature_is_missing_in_type_0: { code: 2329, category: ts.DiagnosticCategory.Error, key: "Index signature is missing in type '{0}'." },
              Index_signatures_are_incompatible: { code: 2330, category: ts.DiagnosticCategory.Error, key: "Index signatures are incompatible." },
              this_cannot_be_referenced_in_a_module_or_namespace_body: { code: 2331, category: ts.DiagnosticCategory.Error, key: "'this' cannot be referenced in a module or namespace body." },
              this_cannot_be_referenced_in_current_location: { code: 2332, category: ts.DiagnosticCategory.Error, key: "'this' cannot be referenced in current location." },
              this_cannot_be_referenced_in_constructor_arguments: { code: 2333, category: ts.DiagnosticCategory.Error, key: "'this' cannot be referenced in constructor arguments." },
              this_cannot_be_referenced_in_a_static_property_initializer: { code: 2334, category: ts.DiagnosticCategory.Error, key: "'this' cannot be referenced in a static property initializer." },
              super_can_only_be_referenced_in_a_derived_class: { code: 2335, category: ts.DiagnosticCategory.Error, key: "'super' can only be referenced in a derived class." },
              super_cannot_be_referenced_in_constructor_arguments: { code: 2336, category: ts.DiagnosticCategory.Error, key: "'super' cannot be referenced in constructor arguments." },
              Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors: { code: 2337, category: ts.DiagnosticCategory.Error, key: "Super calls are not permitted outside constructors or in nested functions inside constructors" },
              super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class: { code: 2338, category: ts.DiagnosticCategory.Error, key: "'super' property access is permitted only in a constructor, member function, or member accessor of a derived class" },
              Property_0_does_not_exist_on_type_1: { code: 2339, category: ts.DiagnosticCategory.Error, key: "Property '{0}' does not exist on type '{1}'." },
              Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword: { code: 2340, category: ts.DiagnosticCategory.Error, key: "Only public and protected methods of the base class are accessible via the 'super' keyword" },
              Property_0_is_private_and_only_accessible_within_class_1: { code: 2341, category: ts.DiagnosticCategory.Error, key: "Property '{0}' is private and only accessible within class '{1}'." },
              An_index_expression_argument_must_be_of_type_string_number_symbol_or_any: { code: 2342, category: ts.DiagnosticCategory.Error, key: "An index expression argument must be of type 'string', 'number', 'symbol, or 'any'." },
              Type_0_does_not_satisfy_the_constraint_1: { code: 2344, category: ts.DiagnosticCategory.Error, key: "Type '{0}' does not satisfy the constraint '{1}'." },
              Argument_of_type_0_is_not_assignable_to_parameter_of_type_1: { code: 2345, category: ts.DiagnosticCategory.Error, key: "Argument of type '{0}' is not assignable to parameter of type '{1}'." },
              Supplied_parameters_do_not_match_any_signature_of_call_target: { code: 2346, category: ts.DiagnosticCategory.Error, key: "Supplied parameters do not match any signature of call target." },
              Untyped_function_calls_may_not_accept_type_arguments: { code: 2347, category: ts.DiagnosticCategory.Error, key: "Untyped function calls may not accept type arguments." },
              Value_of_type_0_is_not_callable_Did_you_mean_to_include_new: { code: 2348, category: ts.DiagnosticCategory.Error, key: "Value of type '{0}' is not callable. Did you mean to include 'new'?" },
              Cannot_invoke_an_expression_whose_type_lacks_a_call_signature: { code: 2349, category: ts.DiagnosticCategory.Error, key: "Cannot invoke an expression whose type lacks a call signature." },
              Only_a_void_function_can_be_called_with_the_new_keyword: { code: 2350, category: ts.DiagnosticCategory.Error, key: "Only a void function can be called with the 'new' keyword." },
              Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature: { code: 2351, category: ts.DiagnosticCategory.Error, key: "Cannot use 'new' with an expression whose type lacks a call or construct signature." },
              Neither_type_0_nor_type_1_is_assignable_to_the_other: { code: 2352, category: ts.DiagnosticCategory.Error, key: "Neither type '{0}' nor type '{1}' is assignable to the other." },
              No_best_common_type_exists_among_return_expressions: { code: 2354, category: ts.DiagnosticCategory.Error, key: "No best common type exists among return expressions." },
              A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value_or_consist_of_a_single_throw_statement: { code: 2355, category: ts.DiagnosticCategory.Error, key: "A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement." },
              An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type: { code: 2356, category: ts.DiagnosticCategory.Error, key: "An arithmetic operand must be of type 'any', 'number' or an enum type." },
              The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_property_or_indexer: { code: 2357, category: ts.DiagnosticCategory.Error, key: "The operand of an increment or decrement operator must be a variable, property or indexer." },
              The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter: { code: 2358, category: ts.DiagnosticCategory.Error, key: "The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter." },
              The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type: { code: 2359, category: ts.DiagnosticCategory.Error, key: "The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type." },
              The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol: { code: 2360, category: ts.DiagnosticCategory.Error, key: "The left-hand side of an 'in' expression must be of type 'any', 'string', 'number', or 'symbol'." },
              The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter: { code: 2361, category: ts.DiagnosticCategory.Error, key: "The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter" },
              The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type: { code: 2362, category: ts.DiagnosticCategory.Error, key: "The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type." },
              The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type: { code: 2363, category: ts.DiagnosticCategory.Error, key: "The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type." },
              Invalid_left_hand_side_of_assignment_expression: { code: 2364, category: ts.DiagnosticCategory.Error, key: "Invalid left-hand side of assignment expression." },
              Operator_0_cannot_be_applied_to_types_1_and_2: { code: 2365, category: ts.DiagnosticCategory.Error, key: "Operator '{0}' cannot be applied to types '{1}' and '{2}'." },
              Type_parameter_name_cannot_be_0: { code: 2368, category: ts.DiagnosticCategory.Error, key: "Type parameter name cannot be '{0}'" },
              A_parameter_property_is_only_allowed_in_a_constructor_implementation: { code: 2369, category: ts.DiagnosticCategory.Error, key: "A parameter property is only allowed in a constructor implementation." },
              A_rest_parameter_must_be_of_an_array_type: { code: 2370, category: ts.DiagnosticCategory.Error, key: "A rest parameter must be of an array type." },
              A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation: { code: 2371, category: ts.DiagnosticCategory.Error, key: "A parameter initializer is only allowed in a function or constructor implementation." },
              Parameter_0_cannot_be_referenced_in_its_initializer: { code: 2372, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' cannot be referenced in its initializer." },
              Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it: { code: 2373, category: ts.DiagnosticCategory.Error, key: "Initializer of parameter '{0}' cannot reference identifier '{1}' declared after it." },
              Duplicate_string_index_signature: { code: 2374, category: ts.DiagnosticCategory.Error, key: "Duplicate string index signature." },
              Duplicate_number_index_signature: { code: 2375, category: ts.DiagnosticCategory.Error, key: "Duplicate number index signature." },
              A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_properties_or_has_parameter_properties: { code: 2376, category: ts.DiagnosticCategory.Error, key: "A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties." },
              Constructors_for_derived_classes_must_contain_a_super_call: { code: 2377, category: ts.DiagnosticCategory.Error, key: "Constructors for derived classes must contain a 'super' call." },
              A_get_accessor_must_return_a_value_or_consist_of_a_single_throw_statement: { code: 2378, category: ts.DiagnosticCategory.Error, key: "A 'get' accessor must return a value or consist of a single 'throw' statement." },
              Getter_and_setter_accessors_do_not_agree_in_visibility: { code: 2379, category: ts.DiagnosticCategory.Error, key: "Getter and setter accessors do not agree in visibility." },
              get_and_set_accessor_must_have_the_same_type: { code: 2380, category: ts.DiagnosticCategory.Error, key: "'get' and 'set' accessor must have the same type." },
              A_signature_with_an_implementation_cannot_use_a_string_literal_type: { code: 2381, category: ts.DiagnosticCategory.Error, key: "A signature with an implementation cannot use a string literal type." },
              Specialized_overload_signature_is_not_assignable_to_any_non_specialized_signature: { code: 2382, category: ts.DiagnosticCategory.Error, key: "Specialized overload signature is not assignable to any non-specialized signature." },
              Overload_signatures_must_all_be_exported_or_not_exported: { code: 2383, category: ts.DiagnosticCategory.Error, key: "Overload signatures must all be exported or not exported." },
              Overload_signatures_must_all_be_ambient_or_non_ambient: { code: 2384, category: ts.DiagnosticCategory.Error, key: "Overload signatures must all be ambient or non-ambient." },
              Overload_signatures_must_all_be_public_private_or_protected: { code: 2385, category: ts.DiagnosticCategory.Error, key: "Overload signatures must all be public, private or protected." },
              Overload_signatures_must_all_be_optional_or_required: { code: 2386, category: ts.DiagnosticCategory.Error, key: "Overload signatures must all be optional or required." },
              Function_overload_must_be_static: { code: 2387, category: ts.DiagnosticCategory.Error, key: "Function overload must be static." },
              Function_overload_must_not_be_static: { code: 2388, category: ts.DiagnosticCategory.Error, key: "Function overload must not be static." },
              Function_implementation_name_must_be_0: { code: 2389, category: ts.DiagnosticCategory.Error, key: "Function implementation name must be '{0}'." },
              Constructor_implementation_is_missing: { code: 2390, category: ts.DiagnosticCategory.Error, key: "Constructor implementation is missing." },
              Function_implementation_is_missing_or_not_immediately_following_the_declaration: { code: 2391, category: ts.DiagnosticCategory.Error, key: "Function implementation is missing or not immediately following the declaration." },
              Multiple_constructor_implementations_are_not_allowed: { code: 2392, category: ts.DiagnosticCategory.Error, key: "Multiple constructor implementations are not allowed." },
              Duplicate_function_implementation: { code: 2393, category: ts.DiagnosticCategory.Error, key: "Duplicate function implementation." },
              Overload_signature_is_not_compatible_with_function_implementation: { code: 2394, category: ts.DiagnosticCategory.Error, key: "Overload signature is not compatible with function implementation." },
              Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local: { code: 2395, category: ts.DiagnosticCategory.Error, key: "Individual declarations in merged declaration {0} must be all exported or all local." },
              Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters: { code: 2396, category: ts.DiagnosticCategory.Error, key: "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters." },
              Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference: { code: 2399, category: ts.DiagnosticCategory.Error, key: "Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference." },
              Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference: { code: 2400, category: ts.DiagnosticCategory.Error, key: "Expression resolves to variable declaration '_this' that compiler uses to capture 'this' reference." },
              Duplicate_identifier_super_Compiler_uses_super_to_capture_base_class_reference: { code: 2401, category: ts.DiagnosticCategory.Error, key: "Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference." },
              Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference: { code: 2402, category: ts.DiagnosticCategory.Error, key: "Expression resolves to '_super' that compiler uses to capture base class reference." },
              Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2: { code: 2403, category: ts.DiagnosticCategory.Error, key: "Subsequent variable declarations must have the same type.  Variable '{0}' must be of type '{1}', but here has type '{2}'." },
              The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation: { code: 2404, category: ts.DiagnosticCategory.Error, key: "The left-hand side of a 'for...in' statement cannot use a type annotation." },
              The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any: { code: 2405, category: ts.DiagnosticCategory.Error, key: "The left-hand side of a 'for...in' statement must be of type 'string' or 'any'." },
              Invalid_left_hand_side_in_for_in_statement: { code: 2406, category: ts.DiagnosticCategory.Error, key: "Invalid left-hand side in 'for...in' statement." },
              The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter: { code: 2407, category: ts.DiagnosticCategory.Error, key: "The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter." },
              Setters_cannot_return_a_value: { code: 2408, category: ts.DiagnosticCategory.Error, key: "Setters cannot return a value." },
              Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class: { code: 2409, category: ts.DiagnosticCategory.Error, key: "Return type of constructor signature must be assignable to the instance type of the class" },
              All_symbols_within_a_with_block_will_be_resolved_to_any: { code: 2410, category: ts.DiagnosticCategory.Error, key: "All symbols within a 'with' block will be resolved to 'any'." },
              Property_0_of_type_1_is_not_assignable_to_string_index_type_2: { code: 2411, category: ts.DiagnosticCategory.Error, key: "Property '{0}' of type '{1}' is not assignable to string index type '{2}'." },
              Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2: { code: 2412, category: ts.DiagnosticCategory.Error, key: "Property '{0}' of type '{1}' is not assignable to numeric index type '{2}'." },
              Numeric_index_type_0_is_not_assignable_to_string_index_type_1: { code: 2413, category: ts.DiagnosticCategory.Error, key: "Numeric index type '{0}' is not assignable to string index type '{1}'." },
              Class_name_cannot_be_0: { code: 2414, category: ts.DiagnosticCategory.Error, key: "Class name cannot be '{0}'" },
              Class_0_incorrectly_extends_base_class_1: { code: 2415, category: ts.DiagnosticCategory.Error, key: "Class '{0}' incorrectly extends base class '{1}'." },
              Class_static_side_0_incorrectly_extends_base_class_static_side_1: { code: 2417, category: ts.DiagnosticCategory.Error, key: "Class static side '{0}' incorrectly extends base class static side '{1}'." },
              Type_name_0_in_extends_clause_does_not_reference_constructor_function_for_0: { code: 2419, category: ts.DiagnosticCategory.Error, key: "Type name '{0}' in extends clause does not reference constructor function for '{0}'." },
              Class_0_incorrectly_implements_interface_1: { code: 2420, category: ts.DiagnosticCategory.Error, key: "Class '{0}' incorrectly implements interface '{1}'." },
              A_class_may_only_implement_another_class_or_interface: { code: 2422, category: ts.DiagnosticCategory.Error, key: "A class may only implement another class or interface." },
              Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor: { code: 2423, category: ts.DiagnosticCategory.Error, key: "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member accessor." },
              Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_property: { code: 2424, category: ts.DiagnosticCategory.Error, key: "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member property." },
              Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function: { code: 2425, category: ts.DiagnosticCategory.Error, key: "Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member function." },
              Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function: { code: 2426, category: ts.DiagnosticCategory.Error, key: "Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member function." },
              Interface_name_cannot_be_0: { code: 2427, category: ts.DiagnosticCategory.Error, key: "Interface name cannot be '{0}'" },
              All_declarations_of_an_interface_must_have_identical_type_parameters: { code: 2428, category: ts.DiagnosticCategory.Error, key: "All declarations of an interface must have identical type parameters." },
              Interface_0_incorrectly_extends_interface_1: { code: 2430, category: ts.DiagnosticCategory.Error, key: "Interface '{0}' incorrectly extends interface '{1}'." },
              Enum_name_cannot_be_0: { code: 2431, category: ts.DiagnosticCategory.Error, key: "Enum name cannot be '{0}'" },
              In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element: { code: 2432, category: ts.DiagnosticCategory.Error, key: "In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element." },
              A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged: { code: 2433, category: ts.DiagnosticCategory.Error, key: "A namespace declaration cannot be in a different file from a class or function with which it is merged" },
              A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged: { code: 2434, category: ts.DiagnosticCategory.Error, key: "A namespace declaration cannot be located prior to a class or function with which it is merged" },
              Ambient_modules_cannot_be_nested_in_other_modules: { code: 2435, category: ts.DiagnosticCategory.Error, key: "Ambient modules cannot be nested in other modules." },
              Ambient_module_declaration_cannot_specify_relative_module_name: { code: 2436, category: ts.DiagnosticCategory.Error, key: "Ambient module declaration cannot specify relative module name." },
              Module_0_is_hidden_by_a_local_declaration_with_the_same_name: { code: 2437, category: ts.DiagnosticCategory.Error, key: "Module '{0}' is hidden by a local declaration with the same name" },
              Import_name_cannot_be_0: { code: 2438, category: ts.DiagnosticCategory.Error, key: "Import name cannot be '{0}'" },
              Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name: { code: 2439, category: ts.DiagnosticCategory.Error, key: "Import or export declaration in an ambient module declaration cannot reference module through relative module name." },
              Import_declaration_conflicts_with_local_declaration_of_0: { code: 2440, category: ts.DiagnosticCategory.Error, key: "Import declaration conflicts with local declaration of '{0}'" },
              Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module: { code: 2441, category: ts.DiagnosticCategory.Error, key: "Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module." },
              Types_have_separate_declarations_of_a_private_property_0: { code: 2442, category: ts.DiagnosticCategory.Error, key: "Types have separate declarations of a private property '{0}'." },
              Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2: { code: 2443, category: ts.DiagnosticCategory.Error, key: "Property '{0}' is protected but type '{1}' is not a class derived from '{2}'." },
              Property_0_is_protected_in_type_1_but_public_in_type_2: { code: 2444, category: ts.DiagnosticCategory.Error, key: "Property '{0}' is protected in type '{1}' but public in type '{2}'." },
              Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses: { code: 2445, category: ts.DiagnosticCategory.Error, key: "Property '{0}' is protected and only accessible within class '{1}' and its subclasses." },
              Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1: { code: 2446, category: ts.DiagnosticCategory.Error, key: "Property '{0}' is protected and only accessible through an instance of class '{1}'." },
              The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead: { code: 2447, category: ts.DiagnosticCategory.Error, key: "The '{0}' operator is not allowed for boolean types. Consider using '{1}' instead." },
              Block_scoped_variable_0_used_before_its_declaration: { code: 2448, category: ts.DiagnosticCategory.Error, key: "Block-scoped variable '{0}' used before its declaration." },
              The_operand_of_an_increment_or_decrement_operator_cannot_be_a_constant: { code: 2449, category: ts.DiagnosticCategory.Error, key: "The operand of an increment or decrement operator cannot be a constant." },
              Left_hand_side_of_assignment_expression_cannot_be_a_constant: { code: 2450, category: ts.DiagnosticCategory.Error, key: "Left-hand side of assignment expression cannot be a constant." },
              Cannot_redeclare_block_scoped_variable_0: { code: 2451, category: ts.DiagnosticCategory.Error, key: "Cannot redeclare block-scoped variable '{0}'." },
              An_enum_member_cannot_have_a_numeric_name: { code: 2452, category: ts.DiagnosticCategory.Error, key: "An enum member cannot have a numeric name." },
              The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_type_arguments_explicitly: { code: 2453, category: ts.DiagnosticCategory.Error, key: "The type argument for type parameter '{0}' cannot be inferred from the usage. Consider specifying the type arguments explicitly." },
              Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0: { code: 2455, category: ts.DiagnosticCategory.Error, key: "Type argument candidate '{1}' is not a valid type argument because it is not a supertype of candidate '{0}'." },
              Type_alias_0_circularly_references_itself: { code: 2456, category: ts.DiagnosticCategory.Error, key: "Type alias '{0}' circularly references itself." },
              Type_alias_name_cannot_be_0: { code: 2457, category: ts.DiagnosticCategory.Error, key: "Type alias name cannot be '{0}'" },
              An_AMD_module_cannot_have_multiple_name_assignments: { code: 2458, category: ts.DiagnosticCategory.Error, key: "An AMD module cannot have multiple name assignments." },
              Type_0_has_no_property_1_and_no_string_index_signature: { code: 2459, category: ts.DiagnosticCategory.Error, key: "Type '{0}' has no property '{1}' and no string index signature." },
              Type_0_has_no_property_1: { code: 2460, category: ts.DiagnosticCategory.Error, key: "Type '{0}' has no property '{1}'." },
              Type_0_is_not_an_array_type: { code: 2461, category: ts.DiagnosticCategory.Error, key: "Type '{0}' is not an array type." },
              A_rest_element_must_be_last_in_an_array_destructuring_pattern: { code: 2462, category: ts.DiagnosticCategory.Error, key: "A rest element must be last in an array destructuring pattern" },
              A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature: { code: 2463, category: ts.DiagnosticCategory.Error, key: "A binding pattern parameter cannot be optional in an implementation signature." },
              A_computed_property_name_must_be_of_type_string_number_symbol_or_any: { code: 2464, category: ts.DiagnosticCategory.Error, key: "A computed property name must be of type 'string', 'number', 'symbol', or 'any'." },
              this_cannot_be_referenced_in_a_computed_property_name: { code: 2465, category: ts.DiagnosticCategory.Error, key: "'this' cannot be referenced in a computed property name." },
              super_cannot_be_referenced_in_a_computed_property_name: { code: 2466, category: ts.DiagnosticCategory.Error, key: "'super' cannot be referenced in a computed property name." },
              A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type: { code: 2467, category: ts.DiagnosticCategory.Error, key: "A computed property name cannot reference a type parameter from its containing type." },
              Cannot_find_global_value_0: { code: 2468, category: ts.DiagnosticCategory.Error, key: "Cannot find global value '{0}'." },
              The_0_operator_cannot_be_applied_to_type_symbol: { code: 2469, category: ts.DiagnosticCategory.Error, key: "The '{0}' operator cannot be applied to type 'symbol'." },
              Symbol_reference_does_not_refer_to_the_global_Symbol_constructor_object: { code: 2470, category: ts.DiagnosticCategory.Error, key: "'Symbol' reference does not refer to the global Symbol constructor object." },
              A_computed_property_name_of_the_form_0_must_be_of_type_symbol: { code: 2471, category: ts.DiagnosticCategory.Error, key: "A computed property name of the form '{0}' must be of type 'symbol'." },
              Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_6_and_higher: { code: 2472, category: ts.DiagnosticCategory.Error, key: "Spread operator in 'new' expressions is only available when targeting ECMAScript 6 and higher." },
              Enum_declarations_must_all_be_const_or_non_const: { code: 2473, category: ts.DiagnosticCategory.Error, key: "Enum declarations must all be const or non-const." },
              In_const_enum_declarations_member_initializer_must_be_constant_expression: { code: 2474, category: ts.DiagnosticCategory.Error, key: "In 'const' enum declarations member initializer must be constant expression." },
              const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment: { code: 2475, category: ts.DiagnosticCategory.Error, key: "'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment." },
              A_const_enum_member_can_only_be_accessed_using_a_string_literal: { code: 2476, category: ts.DiagnosticCategory.Error, key: "A const enum member can only be accessed using a string literal." },
              const_enum_member_initializer_was_evaluated_to_a_non_finite_value: { code: 2477, category: ts.DiagnosticCategory.Error, key: "'const' enum member initializer was evaluated to a non-finite value." },
              const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN: { code: 2478, category: ts.DiagnosticCategory.Error, key: "'const' enum member initializer was evaluated to disallowed value 'NaN'." },
              Property_0_does_not_exist_on_const_enum_1: { code: 2479, category: ts.DiagnosticCategory.Error, key: "Property '{0}' does not exist on 'const' enum '{1}'." },
              let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations: { code: 2480, category: ts.DiagnosticCategory.Error, key: "'let' is not allowed to be used as a name in 'let' or 'const' declarations." },
              Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1: { code: 2481, category: ts.DiagnosticCategory.Error, key: "Cannot initialize outer scoped variable '{0}' in the same scope as block scoped declaration '{1}'." },
              The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation: { code: 2483, category: ts.DiagnosticCategory.Error, key: "The left-hand side of a 'for...of' statement cannot use a type annotation." },
              Export_declaration_conflicts_with_exported_declaration_of_0: { code: 2484, category: ts.DiagnosticCategory.Error, key: "Export declaration conflicts with exported declaration of '{0}'" },
              The_left_hand_side_of_a_for_of_statement_cannot_be_a_previously_defined_constant: { code: 2485, category: ts.DiagnosticCategory.Error, key: "The left-hand side of a 'for...of' statement cannot be a previously defined constant." },
              The_left_hand_side_of_a_for_in_statement_cannot_be_a_previously_defined_constant: { code: 2486, category: ts.DiagnosticCategory.Error, key: "The left-hand side of a 'for...in' statement cannot be a previously defined constant." },
              Invalid_left_hand_side_in_for_of_statement: { code: 2487, category: ts.DiagnosticCategory.Error, key: "Invalid left-hand side in 'for...of' statement." },
              Type_must_have_a_Symbol_iterator_method_that_returns_an_iterator: { code: 2488, category: ts.DiagnosticCategory.Error, key: "Type must have a '[Symbol.iterator]()' method that returns an iterator." },
              An_iterator_must_have_a_next_method: { code: 2489, category: ts.DiagnosticCategory.Error, key: "An iterator must have a 'next()' method." },
              The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property: { code: 2490, category: ts.DiagnosticCategory.Error, key: "The type returned by the 'next()' method of an iterator must have a 'value' property." },
              The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern: { code: 2491, category: ts.DiagnosticCategory.Error, key: "The left-hand side of a 'for...in' statement cannot be a destructuring pattern." },
              Cannot_redeclare_identifier_0_in_catch_clause: { code: 2492, category: ts.DiagnosticCategory.Error, key: "Cannot redeclare identifier '{0}' in catch clause" },
              Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2: { code: 2493, category: ts.DiagnosticCategory.Error, key: "Tuple type '{0}' with length '{1}' cannot be assigned to tuple with length '{2}'." },
              Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher: { code: 2494, category: ts.DiagnosticCategory.Error, key: "Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher." },
              Type_0_is_not_an_array_type_or_a_string_type: { code: 2495, category: ts.DiagnosticCategory.Error, key: "Type '{0}' is not an array type or a string type." },
              The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression: { code: 2496, category: ts.DiagnosticCategory.Error, key: "The 'arguments' object cannot be referenced in an arrow function in ES3 and ES5. Consider using a standard function expression." },
              Module_0_resolves_to_a_non_module_entity_and_cannot_be_imported_using_this_construct: { code: 2497, category: ts.DiagnosticCategory.Error, key: "Module '{0}' resolves to a non-module entity and cannot be imported using this construct." },
              Module_0_uses_export_and_cannot_be_used_with_export_Asterisk: { code: 2498, category: ts.DiagnosticCategory.Error, key: "Module '{0}' uses 'export =' and cannot be used with 'export *'." },
              An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments: { code: 2499, category: ts.DiagnosticCategory.Error, key: "An interface can only extend an identifier/qualified-name with optional type arguments." },
              A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments: { code: 2500, category: ts.DiagnosticCategory.Error, key: "A class can only implement an identifier/qualified-name with optional type arguments." },
              A_rest_element_cannot_contain_a_binding_pattern: { code: 2501, category: ts.DiagnosticCategory.Error, key: "A rest element cannot contain a binding pattern." },
              _0_is_referenced_directly_or_indirectly_in_its_own_type_annotation: { code: 2502, category: ts.DiagnosticCategory.Error, key: "'{0}' is referenced directly or indirectly in its own type annotation." },
              Cannot_find_namespace_0: { code: 2503, category: ts.DiagnosticCategory.Error, key: "Cannot find namespace '{0}'." },
              Import_declaration_0_is_using_private_name_1: { code: 4000, category: ts.DiagnosticCategory.Error, key: "Import declaration '{0}' is using private name '{1}'." },
              Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: { code: 4002, category: ts.DiagnosticCategory.Error, key: "Type parameter '{0}' of exported class has or is using private name '{1}'." },
              Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: { code: 4004, category: ts.DiagnosticCategory.Error, key: "Type parameter '{0}' of exported interface has or is using private name '{1}'." },
              Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1: { code: 4006, category: ts.DiagnosticCategory.Error, key: "Type parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'." },
              Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1: { code: 4008, category: ts.DiagnosticCategory.Error, key: "Type parameter '{0}' of call signature from exported interface has or is using private name '{1}'." },
              Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1: { code: 4010, category: ts.DiagnosticCategory.Error, key: "Type parameter '{0}' of public static method from exported class has or is using private name '{1}'." },
              Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1: { code: 4012, category: ts.DiagnosticCategory.Error, key: "Type parameter '{0}' of public method from exported class has or is using private name '{1}'." },
              Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1: { code: 4014, category: ts.DiagnosticCategory.Error, key: "Type parameter '{0}' of method from exported interface has or is using private name '{1}'." },
              Type_parameter_0_of_exported_function_has_or_is_using_private_name_1: { code: 4016, category: ts.DiagnosticCategory.Error, key: "Type parameter '{0}' of exported function has or is using private name '{1}'." },
              Implements_clause_of_exported_class_0_has_or_is_using_private_name_1: { code: 4019, category: ts.DiagnosticCategory.Error, key: "Implements clause of exported class '{0}' has or is using private name '{1}'." },
              Extends_clause_of_exported_class_0_has_or_is_using_private_name_1: { code: 4020, category: ts.DiagnosticCategory.Error, key: "Extends clause of exported class '{0}' has or is using private name '{1}'." },
              Extends_clause_of_exported_interface_0_has_or_is_using_private_name_1: { code: 4022, category: ts.DiagnosticCategory.Error, key: "Extends clause of exported interface '{0}' has or is using private name '{1}'." },
              Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4023, category: ts.DiagnosticCategory.Error, key: "Exported variable '{0}' has or is using name '{1}' from external module {2} but cannot be named." },
              Exported_variable_0_has_or_is_using_name_1_from_private_module_2: { code: 4024, category: ts.DiagnosticCategory.Error, key: "Exported variable '{0}' has or is using name '{1}' from private module '{2}'." },
              Exported_variable_0_has_or_is_using_private_name_1: { code: 4025, category: ts.DiagnosticCategory.Error, key: "Exported variable '{0}' has or is using private name '{1}'." },
              Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4026, category: ts.DiagnosticCategory.Error, key: "Public static property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named." },
              Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4027, category: ts.DiagnosticCategory.Error, key: "Public static property '{0}' of exported class has or is using name '{1}' from private module '{2}'." },
              Public_static_property_0_of_exported_class_has_or_is_using_private_name_1: { code: 4028, category: ts.DiagnosticCategory.Error, key: "Public static property '{0}' of exported class has or is using private name '{1}'." },
              Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4029, category: ts.DiagnosticCategory.Error, key: "Public property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named." },
              Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4030, category: ts.DiagnosticCategory.Error, key: "Public property '{0}' of exported class has or is using name '{1}' from private module '{2}'." },
              Public_property_0_of_exported_class_has_or_is_using_private_name_1: { code: 4031, category: ts.DiagnosticCategory.Error, key: "Public property '{0}' of exported class has or is using private name '{1}'." },
              Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 4032, category: ts.DiagnosticCategory.Error, key: "Property '{0}' of exported interface has or is using name '{1}' from private module '{2}'." },
              Property_0_of_exported_interface_has_or_is_using_private_name_1: { code: 4033, category: ts.DiagnosticCategory.Error, key: "Property '{0}' of exported interface has or is using private name '{1}'." },
              Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4034, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of public static property setter from exported class has or is using name '{1}' from private module '{2}'." },
              Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_private_name_1: { code: 4035, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of public static property setter from exported class has or is using private name '{1}'." },
              Parameter_0_of_public_property_setter_from_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4036, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of public property setter from exported class has or is using name '{1}' from private module '{2}'." },
              Parameter_0_of_public_property_setter_from_exported_class_has_or_is_using_private_name_1: { code: 4037, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of public property setter from exported class has or is using private name '{1}'." },
              Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: { code: 4038, category: ts.DiagnosticCategory.Error, key: "Return type of public static property getter from exported class has or is using name '{0}' from external module {1} but cannot be named." },
              Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_name_0_from_private_module_1: { code: 4039, category: ts.DiagnosticCategory.Error, key: "Return type of public static property getter from exported class has or is using name '{0}' from private module '{1}'." },
              Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_private_name_0: { code: 4040, category: ts.DiagnosticCategory.Error, key: "Return type of public static property getter from exported class has or is using private name '{0}'." },
              Return_type_of_public_property_getter_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: { code: 4041, category: ts.DiagnosticCategory.Error, key: "Return type of public property getter from exported class has or is using name '{0}' from external module {1} but cannot be named." },
              Return_type_of_public_property_getter_from_exported_class_has_or_is_using_name_0_from_private_module_1: { code: 4042, category: ts.DiagnosticCategory.Error, key: "Return type of public property getter from exported class has or is using name '{0}' from private module '{1}'." },
              Return_type_of_public_property_getter_from_exported_class_has_or_is_using_private_name_0: { code: 4043, category: ts.DiagnosticCategory.Error, key: "Return type of public property getter from exported class has or is using private name '{0}'." },
              Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1: { code: 4044, category: ts.DiagnosticCategory.Error, key: "Return type of constructor signature from exported interface has or is using name '{0}' from private module '{1}'." },
              Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0: { code: 4045, category: ts.DiagnosticCategory.Error, key: "Return type of constructor signature from exported interface has or is using private name '{0}'." },
              Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1: { code: 4046, category: ts.DiagnosticCategory.Error, key: "Return type of call signature from exported interface has or is using name '{0}' from private module '{1}'." },
              Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0: { code: 4047, category: ts.DiagnosticCategory.Error, key: "Return type of call signature from exported interface has or is using private name '{0}'." },
              Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1: { code: 4048, category: ts.DiagnosticCategory.Error, key: "Return type of index signature from exported interface has or is using name '{0}' from private module '{1}'." },
              Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0: { code: 4049, category: ts.DiagnosticCategory.Error, key: "Return type of index signature from exported interface has or is using private name '{0}'." },
              Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: { code: 4050, category: ts.DiagnosticCategory.Error, key: "Return type of public static method from exported class has or is using name '{0}' from external module {1} but cannot be named." },
              Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1: { code: 4051, category: ts.DiagnosticCategory.Error, key: "Return type of public static method from exported class has or is using name '{0}' from private module '{1}'." },
              Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0: { code: 4052, category: ts.DiagnosticCategory.Error, key: "Return type of public static method from exported class has or is using private name '{0}'." },
              Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: { code: 4053, category: ts.DiagnosticCategory.Error, key: "Return type of public method from exported class has or is using name '{0}' from external module {1} but cannot be named." },
              Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1: { code: 4054, category: ts.DiagnosticCategory.Error, key: "Return type of public method from exported class has or is using name '{0}' from private module '{1}'." },
              Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0: { code: 4055, category: ts.DiagnosticCategory.Error, key: "Return type of public method from exported class has or is using private name '{0}'." },
              Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1: { code: 4056, category: ts.DiagnosticCategory.Error, key: "Return type of method from exported interface has or is using name '{0}' from private module '{1}'." },
              Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0: { code: 4057, category: ts.DiagnosticCategory.Error, key: "Return type of method from exported interface has or is using private name '{0}'." },
              Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: { code: 4058, category: ts.DiagnosticCategory.Error, key: "Return type of exported function has or is using name '{0}' from external module {1} but cannot be named." },
              Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1: { code: 4059, category: ts.DiagnosticCategory.Error, key: "Return type of exported function has or is using name '{0}' from private module '{1}'." },
              Return_type_of_exported_function_has_or_is_using_private_name_0: { code: 4060, category: ts.DiagnosticCategory.Error, key: "Return type of exported function has or is using private name '{0}'." },
              Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4061, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of constructor from exported class has or is using name '{1}' from external module {2} but cannot be named." },
              Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4062, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of constructor from exported class has or is using name '{1}' from private module '{2}'." },
              Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1: { code: 4063, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of constructor from exported class has or is using private name '{1}'." },
              Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 4064, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of constructor signature from exported interface has or is using name '{1}' from private module '{2}'." },
              Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1: { code: 4065, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'." },
              Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 4066, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of call signature from exported interface has or is using name '{1}' from private module '{2}'." },
              Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1: { code: 4067, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of call signature from exported interface has or is using private name '{1}'." },
              Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4068, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of public static method from exported class has or is using name '{1}' from external module {2} but cannot be named." },
              Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4069, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of public static method from exported class has or is using name '{1}' from private module '{2}'." },
              Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1: { code: 4070, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of public static method from exported class has or is using private name '{1}'." },
              Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4071, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of public method from exported class has or is using name '{1}' from external module {2} but cannot be named." },
              Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4072, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of public method from exported class has or is using name '{1}' from private module '{2}'." },
              Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1: { code: 4073, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of public method from exported class has or is using private name '{1}'." },
              Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 4074, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of method from exported interface has or is using name '{1}' from private module '{2}'." },
              Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1: { code: 4075, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of method from exported interface has or is using private name '{1}'." },
              Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4076, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of exported function has or is using name '{1}' from external module {2} but cannot be named." },
              Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2: { code: 4077, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of exported function has or is using name '{1}' from private module '{2}'." },
              Parameter_0_of_exported_function_has_or_is_using_private_name_1: { code: 4078, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of exported function has or is using private name '{1}'." },
              Exported_type_alias_0_has_or_is_using_private_name_1: { code: 4081, category: ts.DiagnosticCategory.Error, key: "Exported type alias '{0}' has or is using private name '{1}'." },
              Default_export_of_the_module_has_or_is_using_private_name_0: { code: 4082, category: ts.DiagnosticCategory.Error, key: "Default export of the module has or is using private name '{0}'." },
              Loop_contains_block_scoped_variable_0_referenced_by_a_function_in_the_loop_This_is_only_supported_in_ECMAScript_6_or_higher: { code: 4091, category: ts.DiagnosticCategory.Error, key: "Loop contains block-scoped variable '{0}' referenced by a function in the loop. This is only supported in ECMAScript 6 or higher." },
              The_current_host_does_not_support_the_0_option: { code: 5001, category: ts.DiagnosticCategory.Error, key: "The current host does not support the '{0}' option." },
              Cannot_find_the_common_subdirectory_path_for_the_input_files: { code: 5009, category: ts.DiagnosticCategory.Error, key: "Cannot find the common subdirectory path for the input files." },
              Cannot_read_file_0_Colon_1: { code: 5012, category: ts.DiagnosticCategory.Error, key: "Cannot read file '{0}': {1}" },
              Unsupported_file_encoding: { code: 5013, category: ts.DiagnosticCategory.Error, key: "Unsupported file encoding." },
              Failed_to_parse_file_0_Colon_1: { code: 5014, category: ts.DiagnosticCategory.Error, key: "Failed to parse file '{0}': {1}." },
              Unknown_compiler_option_0: { code: 5023, category: ts.DiagnosticCategory.Error, key: "Unknown compiler option '{0}'." },
              Compiler_option_0_requires_a_value_of_type_1: { code: 5024, category: ts.DiagnosticCategory.Error, key: "Compiler option '{0}' requires a value of type {1}." },
              Could_not_write_file_0_Colon_1: { code: 5033, category: ts.DiagnosticCategory.Error, key: "Could not write file '{0}': {1}" },
              Option_mapRoot_cannot_be_specified_without_specifying_sourceMap_option: { code: 5038, category: ts.DiagnosticCategory.Error, key: "Option 'mapRoot' cannot be specified without specifying 'sourceMap' option." },
              Option_sourceRoot_cannot_be_specified_without_specifying_sourceMap_option: { code: 5039, category: ts.DiagnosticCategory.Error, key: "Option 'sourceRoot' cannot be specified without specifying 'sourceMap' option." },
              Option_noEmit_cannot_be_specified_with_option_out_or_outDir: { code: 5040, category: ts.DiagnosticCategory.Error, key: "Option 'noEmit' cannot be specified with option 'out' or 'outDir'." },
              Option_noEmit_cannot_be_specified_with_option_declaration: { code: 5041, category: ts.DiagnosticCategory.Error, key: "Option 'noEmit' cannot be specified with option 'declaration'." },
              Option_project_cannot_be_mixed_with_source_files_on_a_command_line: { code: 5042, category: ts.DiagnosticCategory.Error, key: "Option 'project' cannot be mixed with source files on a command line." },
              Option_sourceMap_cannot_be_specified_with_option_separateCompilation: { code: 5043, category: ts.DiagnosticCategory.Error, key: "Option 'sourceMap' cannot be specified with option 'separateCompilation'." },
              Option_declaration_cannot_be_specified_with_option_separateCompilation: { code: 5044, category: ts.DiagnosticCategory.Error, key: "Option 'declaration' cannot be specified with option 'separateCompilation'." },
              Option_noEmitOnError_cannot_be_specified_with_option_separateCompilation: { code: 5045, category: ts.DiagnosticCategory.Error, key: "Option 'noEmitOnError' cannot be specified with option 'separateCompilation'." },
              Option_out_cannot_be_specified_with_option_separateCompilation: { code: 5046, category: ts.DiagnosticCategory.Error, key: "Option 'out' cannot be specified with option 'separateCompilation'." },
              Option_separateCompilation_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES6_or_higher: { code: 5047, category: ts.DiagnosticCategory.Error, key: "Option 'separateCompilation' can only be used when either option'--module' is provided or option 'target' is 'ES6' or higher." },
              Option_sourceMap_cannot_be_specified_with_option_inlineSourceMap: { code: 5048, category: ts.DiagnosticCategory.Error, key: "Option 'sourceMap' cannot be specified with option 'inlineSourceMap'." },
              Option_sourceRoot_cannot_be_specified_with_option_inlineSourceMap: { code: 5049, category: ts.DiagnosticCategory.Error, key: "Option 'sourceRoot' cannot be specified with option 'inlineSourceMap'." },
              Option_mapRoot_cannot_be_specified_with_option_inlineSourceMap: { code: 5050, category: ts.DiagnosticCategory.Error, key: "Option 'mapRoot' cannot be specified with option 'inlineSourceMap'." },
              Option_inlineSources_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided: { code: 5051, category: ts.DiagnosticCategory.Error, key: "Option 'inlineSources' can only be used when either option '--inlineSourceMap' or option '--sourceMap' is provided." },
              Concatenate_and_emit_output_to_single_file: { code: 6001, category: ts.DiagnosticCategory.Message, key: "Concatenate and emit output to single file." },
              Generates_corresponding_d_ts_file: { code: 6002, category: ts.DiagnosticCategory.Message, key: "Generates corresponding '.d.ts' file." },
              Specifies_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations: { code: 6003, category: ts.DiagnosticCategory.Message, key: "Specifies the location where debugger should locate map files instead of generated locations." },
              Specifies_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations: { code: 6004, category: ts.DiagnosticCategory.Message, key: "Specifies the location where debugger should locate TypeScript files instead of source locations." },
              Watch_input_files: { code: 6005, category: ts.DiagnosticCategory.Message, key: "Watch input files." },
              Redirect_output_structure_to_the_directory: { code: 6006, category: ts.DiagnosticCategory.Message, key: "Redirect output structure to the directory." },
              Do_not_erase_const_enum_declarations_in_generated_code: { code: 6007, category: ts.DiagnosticCategory.Message, key: "Do not erase const enum declarations in generated code." },
              Do_not_emit_outputs_if_any_errors_were_reported: { code: 6008, category: ts.DiagnosticCategory.Message, key: "Do not emit outputs if any errors were reported." },
              Do_not_emit_comments_to_output: { code: 6009, category: ts.DiagnosticCategory.Message, key: "Do not emit comments to output." },
              Do_not_emit_outputs: { code: 6010, category: ts.DiagnosticCategory.Message, key: "Do not emit outputs." },
              Specify_ECMAScript_target_version_Colon_ES3_default_ES5_or_ES6_experimental: { code: 6015, category: ts.DiagnosticCategory.Message, key: "Specify ECMAScript target version: 'ES3' (default), 'ES5', or 'ES6' (experimental)" },
              Specify_module_code_generation_Colon_commonjs_amd_system_or_umd: { code: 6016, category: ts.DiagnosticCategory.Message, key: "Specify module code generation: 'commonjs', 'amd', 'system' or 'umd'" },
              Print_this_message: { code: 6017, category: ts.DiagnosticCategory.Message, key: "Print this message." },
              Print_the_compiler_s_version: { code: 6019, category: ts.DiagnosticCategory.Message, key: "Print the compiler's version." },
              Compile_the_project_in_the_given_directory: { code: 6020, category: ts.DiagnosticCategory.Message, key: "Compile the project in the given directory." },
              Syntax_Colon_0: { code: 6023, category: ts.DiagnosticCategory.Message, key: "Syntax: {0}" },
              options: { code: 6024, category: ts.DiagnosticCategory.Message, key: "options" },
              file: { code: 6025, category: ts.DiagnosticCategory.Message, key: "file" },
              Examples_Colon_0: { code: 6026, category: ts.DiagnosticCategory.Message, key: "Examples: {0}" },
              Options_Colon: { code: 6027, category: ts.DiagnosticCategory.Message, key: "Options:" },
              Version_0: { code: 6029, category: ts.DiagnosticCategory.Message, key: "Version {0}" },
              Insert_command_line_options_and_files_from_a_file: { code: 6030, category: ts.DiagnosticCategory.Message, key: "Insert command line options and files from a file." },
              File_change_detected_Starting_incremental_compilation: { code: 6032, category: ts.DiagnosticCategory.Message, key: "File change detected. Starting incremental compilation..." },
              KIND: { code: 6034, category: ts.DiagnosticCategory.Message, key: "KIND" },
              FILE: { code: 6035, category: ts.DiagnosticCategory.Message, key: "FILE" },
              VERSION: { code: 6036, category: ts.DiagnosticCategory.Message, key: "VERSION" },
              LOCATION: { code: 6037, category: ts.DiagnosticCategory.Message, key: "LOCATION" },
              DIRECTORY: { code: 6038, category: ts.DiagnosticCategory.Message, key: "DIRECTORY" },
              Compilation_complete_Watching_for_file_changes: { code: 6042, category: ts.DiagnosticCategory.Message, key: "Compilation complete. Watching for file changes." },
              Generates_corresponding_map_file: { code: 6043, category: ts.DiagnosticCategory.Message, key: "Generates corresponding '.map' file." },
              Compiler_option_0_expects_an_argument: { code: 6044, category: ts.DiagnosticCategory.Error, key: "Compiler option '{0}' expects an argument." },
              Unterminated_quoted_string_in_response_file_0: { code: 6045, category: ts.DiagnosticCategory.Error, key: "Unterminated quoted string in response file '{0}'." },
              Argument_for_module_option_must_be_commonjs_amd_system_or_umd: { code: 6046, category: ts.DiagnosticCategory.Error, key: "Argument for '--module' option must be 'commonjs', 'amd', 'system' or 'umd'." },
              Argument_for_target_option_must_be_ES3_ES5_or_ES6: { code: 6047, category: ts.DiagnosticCategory.Error, key: "Argument for '--target' option must be 'ES3', 'ES5', or 'ES6'." },
              Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1: { code: 6048, category: ts.DiagnosticCategory.Error, key: "Locale must be of the form <language> or <language>-<territory>. For example '{0}' or '{1}'." },
              Unsupported_locale_0: { code: 6049, category: ts.DiagnosticCategory.Error, key: "Unsupported locale '{0}'." },
              Unable_to_open_file_0: { code: 6050, category: ts.DiagnosticCategory.Error, key: "Unable to open file '{0}'." },
              Corrupted_locale_file_0: { code: 6051, category: ts.DiagnosticCategory.Error, key: "Corrupted locale file {0}." },
              Raise_error_on_expressions_and_declarations_with_an_implied_any_type: { code: 6052, category: ts.DiagnosticCategory.Message, key: "Raise error on expressions and declarations with an implied 'any' type." },
              File_0_not_found: { code: 6053, category: ts.DiagnosticCategory.Error, key: "File '{0}' not found." },
              File_0_has_unsupported_extension_The_only_supported_extensions_are_1: { code: 6054, category: ts.DiagnosticCategory.Error, key: "File '{0}' has unsupported extension. The only supported extensions are {1}." },
              Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures: { code: 6055, category: ts.DiagnosticCategory.Message, key: "Suppress noImplicitAny errors for indexing objects lacking index signatures." },
              Do_not_emit_declarations_for_code_that_has_an_internal_annotation: { code: 6056, category: ts.DiagnosticCategory.Message, key: "Do not emit declarations for code that has an '@internal' annotation." },
              Preserve_new_lines_when_emitting_code: { code: 6057, category: ts.DiagnosticCategory.Message, key: "Preserve new-lines when emitting code." },
              Specifies_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir: { code: 6058, category: ts.DiagnosticCategory.Message, key: "Specifies the root directory of input files. Use to control the output directory structure with --outDir." },
              File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files: { code: 6059, category: ts.DiagnosticCategory.Error, key: "File '{0}' is not under 'rootDir' '{1}'. 'rootDir' is expected to contain all source files." },
              Specifies_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix: { code: 6060, category: ts.DiagnosticCategory.Message, key: "Specifies the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix)." },
              NEWLINE: { code: 6061, category: ts.DiagnosticCategory.Message, key: "NEWLINE" },
              Argument_for_newLine_option_must_be_CRLF_or_LF: { code: 6062, category: ts.DiagnosticCategory.Error, key: "Argument for '--newLine' option must be 'CRLF' or 'LF'." },
              Variable_0_implicitly_has_an_1_type: { code: 7005, category: ts.DiagnosticCategory.Error, key: "Variable '{0}' implicitly has an '{1}' type." },
              Parameter_0_implicitly_has_an_1_type: { code: 7006, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' implicitly has an '{1}' type." },
              Member_0_implicitly_has_an_1_type: { code: 7008, category: ts.DiagnosticCategory.Error, key: "Member '{0}' implicitly has an '{1}' type." },
              new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type: { code: 7009, category: ts.DiagnosticCategory.Error, key: "'new' expression, whose target lacks a construct signature, implicitly has an 'any' type." },
              _0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type: { code: 7010, category: ts.DiagnosticCategory.Error, key: "'{0}', which lacks return-type annotation, implicitly has an '{1}' return type." },
              Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type: { code: 7011, category: ts.DiagnosticCategory.Error, key: "Function expression, which lacks return-type annotation, implicitly has an '{0}' return type." },
              Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type: { code: 7013, category: ts.DiagnosticCategory.Error, key: "Construct signature, which lacks return-type annotation, implicitly has an 'any' return type." },
              Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_type_annotation: { code: 7016, category: ts.DiagnosticCategory.Error, key: "Property '{0}' implicitly has type 'any', because its 'set' accessor lacks a type annotation." },
              Index_signature_of_object_type_implicitly_has_an_any_type: { code: 7017, category: ts.DiagnosticCategory.Error, key: "Index signature of object type implicitly has an 'any' type." },
              Object_literal_s_property_0_implicitly_has_an_1_type: { code: 7018, category: ts.DiagnosticCategory.Error, key: "Object literal's property '{0}' implicitly has an '{1}' type." },
              Rest_parameter_0_implicitly_has_an_any_type: { code: 7019, category: ts.DiagnosticCategory.Error, key: "Rest parameter '{0}' implicitly has an 'any[]' type." },
              Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type: { code: 7020, category: ts.DiagnosticCategory.Error, key: "Call signature, which lacks return-type annotation, implicitly has an 'any' return type." },
              _0_implicitly_has_type_any_because_it_is_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer: { code: 7022, category: ts.DiagnosticCategory.Error, key: "'{0}' implicitly has type 'any' because it is does not have a type annotation and is referenced directly or indirectly in its own initializer." },
              _0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions: { code: 7023, category: ts.DiagnosticCategory.Error, key: "'{0}' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions." },
              Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions: { code: 7024, category: ts.DiagnosticCategory.Error, key: "Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions." },
              You_cannot_rename_this_element: { code: 8000, category: ts.DiagnosticCategory.Error, key: "You cannot rename this element." },
              You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library: { code: 8001, category: ts.DiagnosticCategory.Error, key: "You cannot rename elements that are defined in the standard TypeScript library." },
              import_can_only_be_used_in_a_ts_file: { code: 8002, category: ts.DiagnosticCategory.Error, key: "'import ... =' can only be used in a .ts file." },
              export_can_only_be_used_in_a_ts_file: { code: 8003, category: ts.DiagnosticCategory.Error, key: "'export=' can only be used in a .ts file." },
              type_parameter_declarations_can_only_be_used_in_a_ts_file: { code: 8004, category: ts.DiagnosticCategory.Error, key: "'type parameter declarations' can only be used in a .ts file." },
              implements_clauses_can_only_be_used_in_a_ts_file: { code: 8005, category: ts.DiagnosticCategory.Error, key: "'implements clauses' can only be used in a .ts file." },
              interface_declarations_can_only_be_used_in_a_ts_file: { code: 8006, category: ts.DiagnosticCategory.Error, key: "'interface declarations' can only be used in a .ts file." },
              module_declarations_can_only_be_used_in_a_ts_file: { code: 8007, category: ts.DiagnosticCategory.Error, key: "'module declarations' can only be used in a .ts file." },
              type_aliases_can_only_be_used_in_a_ts_file: { code: 8008, category: ts.DiagnosticCategory.Error, key: "'type aliases' can only be used in a .ts file." },
              _0_can_only_be_used_in_a_ts_file: { code: 8009, category: ts.DiagnosticCategory.Error, key: "'{0}' can only be used in a .ts file." },
              types_can_only_be_used_in_a_ts_file: { code: 8010, category: ts.DiagnosticCategory.Error, key: "'types' can only be used in a .ts file." },
              type_arguments_can_only_be_used_in_a_ts_file: { code: 8011, category: ts.DiagnosticCategory.Error, key: "'type arguments' can only be used in a .ts file." },
              parameter_modifiers_can_only_be_used_in_a_ts_file: { code: 8012, category: ts.DiagnosticCategory.Error, key: "'parameter modifiers' can only be used in a .ts file." },
              can_only_be_used_in_a_ts_file: { code: 8013, category: ts.DiagnosticCategory.Error, key: "'?' can only be used in a .ts file." },
              property_declarations_can_only_be_used_in_a_ts_file: { code: 8014, category: ts.DiagnosticCategory.Error, key: "'property declarations' can only be used in a .ts file." },
              enum_declarations_can_only_be_used_in_a_ts_file: { code: 8015, category: ts.DiagnosticCategory.Error, key: "'enum declarations' can only be used in a .ts file." },
              type_assertion_expressions_can_only_be_used_in_a_ts_file: { code: 8016, category: ts.DiagnosticCategory.Error, key: "'type assertion expressions' can only be used in a .ts file." },
              decorators_can_only_be_used_in_a_ts_file: { code: 8017, category: ts.DiagnosticCategory.Error, key: "'decorators' can only be used in a .ts file." },
              yield_expressions_are_not_currently_supported: { code: 9000, category: ts.DiagnosticCategory.Error, key: "'yield' expressions are not currently supported." },
              Generators_are_not_currently_supported: { code: 9001, category: ts.DiagnosticCategory.Error, key: "Generators are not currently supported." },
              Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_class_extends_clauses: { code: 9002, category: ts.DiagnosticCategory.Error, key: "Only identifiers/qualified-names with optional type arguments are currently supported in a class 'extends' clauses." },
              class_expressions_are_not_currently_supported: { code: 9003, category: ts.DiagnosticCategory.Error, key: "'class' expressions are not currently supported." },
              class_declarations_are_only_supported_directly_inside_a_module_or_as_a_top_level_declaration: { code: 9004, category: ts.DiagnosticCategory.Error, key: "'class' declarations are only supported directly inside a module or as a top level declaration." }
          };
      })(ts || (ts = {}));
      /// <reference path="core.ts"/>
      /// <reference path="diagnosticInformationMap.generated.ts"/>
      var ts;
      (function (ts) {
          var textToToken = {
              "any": 112,
              "as": 111,
              "boolean": 113,
              "break": 66,
              "case": 67,
              "catch": 68,
              "class": 69,
              "continue": 71,
              "const": 70,
              "constructor": 114,
              "debugger": 72,
              "declare": 115,
              "default": 73,
              "delete": 74,
              "do": 75,
              "else": 76,
              "enum": 77,
              "export": 78,
              "extends": 79,
              "false": 80,
              "finally": 81,
              "for": 82,
              "from": 125,
              "function": 83,
              "get": 116,
              "if": 84,
              "implements": 102,
              "import": 85,
              "in": 86,
              "instanceof": 87,
              "interface": 103,
              "let": 104,
              "module": 117,
              "namespace": 118,
              "new": 88,
              "null": 89,
              "number": 120,
              "package": 105,
              "private": 106,
              "protected": 107,
              "public": 108,
              "require": 119,
              "return": 90,
              "set": 121,
              "static": 109,
              "string": 122,
              "super": 91,
              "switch": 92,
              "symbol": 123,
              "this": 93,
              "throw": 94,
              "true": 95,
              "try": 96,
              "type": 124,
              "typeof": 97,
              "var": 98,
              "void": 99,
              "while": 100,
              "with": 101,
              "yield": 110,
              "of": 126,
              "{": 14,
              "}": 15,
              "(": 16,
              ")": 17,
              "[": 18,
              "]": 19,
              ".": 20,
              "...": 21,
              ";": 22,
              ",": 23,
              "<": 24,
              ">": 25,
              "<=": 26,
              ">=": 27,
              "==": 28,
              "!=": 29,
              "===": 30,
              "!==": 31,
              "=>": 32,
              "+": 33,
              "-": 34,
              "*": 35,
              "/": 36,
              "%": 37,
              "++": 38,
              "--": 39,
              "<<": 40,
              ">>": 41,
              ">>>": 42,
              "&": 43,
              "|": 44,
              "^": 45,
              "!": 46,
              "~": 47,
              "&&": 48,
              "||": 49,
              "?": 50,
              ":": 51,
              "=": 53,
              "+=": 54,
              "-=": 55,
              "*=": 56,
              "/=": 57,
              "%=": 58,
              "<<=": 59,
              ">>=": 60,
              ">>>=": 61,
              "&=": 62,
              "|=": 63,
              "^=": 64,
              "@": 52
          };
          var unicodeES3IdentifierStart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 543, 546, 563, 592, 685, 688, 696, 699, 705, 720, 721, 736, 740, 750, 750, 890, 890, 902, 902, 904, 906, 908, 908, 910, 929, 931, 974, 976, 983, 986, 1011, 1024, 1153, 1164, 1220, 1223, 1224, 1227, 1228, 1232, 1269, 1272, 1273, 1329, 1366, 1369, 1369, 1377, 1415, 1488, 1514, 1520, 1522, 1569, 1594, 1600, 1610, 1649, 1747, 1749, 1749, 1765, 1766, 1786, 1788, 1808, 1808, 1810, 1836, 1920, 1957, 2309, 2361, 2365, 2365, 2384, 2384, 2392, 2401, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2524, 2525, 2527, 2529, 2544, 2545, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2649, 2652, 2654, 2654, 2674, 2676, 2693, 2699, 2701, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2784, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2870, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 2997, 2999, 3001, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3168, 3169, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3294, 3294, 3296, 3297, 3333, 3340, 3342, 3344, 3346, 3368, 3370, 3385, 3424, 3425, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3585, 3632, 3634, 3635, 3648, 3654, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3760, 3762, 3763, 3773, 3773, 3776, 3780, 3782, 3782, 3804, 3805, 3840, 3840, 3904, 3911, 3913, 3946, 3976, 3979, 4096, 4129, 4131, 4135, 4137, 4138, 4176, 4181, 4256, 4293, 4304, 4342, 4352, 4441, 4447, 4514, 4520, 4601, 4608, 4614, 4616, 4678, 4680, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4742, 4744, 4744, 4746, 4749, 4752, 4782, 4784, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4814, 4816, 4822, 4824, 4846, 4848, 4878, 4880, 4880, 4882, 4885, 4888, 4894, 4896, 4934, 4936, 4954, 5024, 5108, 5121, 5740, 5743, 5750, 5761, 5786, 5792, 5866, 6016, 6067, 6176, 6263, 6272, 6312, 7680, 7835, 7840, 7929, 7936, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8319, 8319, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8497, 8499, 8505, 8544, 8579, 12293, 12295, 12321, 12329, 12337, 12341, 12344, 12346, 12353, 12436, 12445, 12446, 12449, 12538, 12540, 12542, 12549, 12588, 12593, 12686, 12704, 12727, 13312, 19893, 19968, 40869, 40960, 42124, 44032, 55203, 63744, 64045, 64256, 64262, 64275, 64279, 64285, 64285, 64287, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65136, 65138, 65140, 65140, 65142, 65276, 65313, 65338, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500,];
          var unicodeES3IdentifierPart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 543, 546, 563, 592, 685, 688, 696, 699, 705, 720, 721, 736, 740, 750, 750, 768, 846, 864, 866, 890, 890, 902, 902, 904, 906, 908, 908, 910, 929, 931, 974, 976, 983, 986, 1011, 1024, 1153, 1155, 1158, 1164, 1220, 1223, 1224, 1227, 1228, 1232, 1269, 1272, 1273, 1329, 1366, 1369, 1369, 1377, 1415, 1425, 1441, 1443, 1465, 1467, 1469, 1471, 1471, 1473, 1474, 1476, 1476, 1488, 1514, 1520, 1522, 1569, 1594, 1600, 1621, 1632, 1641, 1648, 1747, 1749, 1756, 1759, 1768, 1770, 1773, 1776, 1788, 1808, 1836, 1840, 1866, 1920, 1968, 2305, 2307, 2309, 2361, 2364, 2381, 2384, 2388, 2392, 2403, 2406, 2415, 2433, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2492, 2492, 2494, 2500, 2503, 2504, 2507, 2509, 2519, 2519, 2524, 2525, 2527, 2531, 2534, 2545, 2562, 2562, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2620, 2620, 2622, 2626, 2631, 2632, 2635, 2637, 2649, 2652, 2654, 2654, 2662, 2676, 2689, 2691, 2693, 2699, 2701, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2768, 2768, 2784, 2784, 2790, 2799, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2870, 2873, 2876, 2883, 2887, 2888, 2891, 2893, 2902, 2903, 2908, 2909, 2911, 2913, 2918, 2927, 2946, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 2997, 2999, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3031, 3031, 3047, 3055, 3073, 3075, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3134, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3168, 3169, 3174, 3183, 3202, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3262, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3294, 3294, 3296, 3297, 3302, 3311, 3330, 3331, 3333, 3340, 3342, 3344, 3346, 3368, 3370, 3385, 3390, 3395, 3398, 3400, 3402, 3405, 3415, 3415, 3424, 3425, 3430, 3439, 3458, 3459, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3530, 3530, 3535, 3540, 3542, 3542, 3544, 3551, 3570, 3571, 3585, 3642, 3648, 3662, 3664, 3673, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3769, 3771, 3773, 3776, 3780, 3782, 3782, 3784, 3789, 3792, 3801, 3804, 3805, 3840, 3840, 3864, 3865, 3872, 3881, 3893, 3893, 3895, 3895, 3897, 3897, 3902, 3911, 3913, 3946, 3953, 3972, 3974, 3979, 3984, 3991, 3993, 4028, 4038, 4038, 4096, 4129, 4131, 4135, 4137, 4138, 4140, 4146, 4150, 4153, 4160, 4169, 4176, 4185, 4256, 4293, 4304, 4342, 4352, 4441, 4447, 4514, 4520, 4601, 4608, 4614, 4616, 4678, 4680, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4742, 4744, 4744, 4746, 4749, 4752, 4782, 4784, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4814, 4816, 4822, 4824, 4846, 4848, 4878, 4880, 4880, 4882, 4885, 4888, 4894, 4896, 4934, 4936, 4954, 4969, 4977, 5024, 5108, 5121, 5740, 5743, 5750, 5761, 5786, 5792, 5866, 6016, 6099, 6112, 6121, 6160, 6169, 6176, 6263, 6272, 6313, 7680, 7835, 7840, 7929, 7936, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8255, 8256, 8319, 8319, 8400, 8412, 8417, 8417, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8497, 8499, 8505, 8544, 8579, 12293, 12295, 12321, 12335, 12337, 12341, 12344, 12346, 12353, 12436, 12441, 12442, 12445, 12446, 12449, 12542, 12549, 12588, 12593, 12686, 12704, 12727, 13312, 19893, 19968, 40869, 40960, 42124, 44032, 55203, 63744, 64045, 64256, 64262, 64275, 64279, 64285, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65056, 65059, 65075, 65076, 65101, 65103, 65136, 65138, 65140, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65343, 65343, 65345, 65370, 65381, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500,];
          var unicodeES5IdentifierStart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 880, 884, 886, 887, 890, 893, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1162, 1319, 1329, 1366, 1369, 1369, 1377, 1415, 1488, 1514, 1520, 1522, 1568, 1610, 1646, 1647, 1649, 1747, 1749, 1749, 1765, 1766, 1774, 1775, 1786, 1788, 1791, 1791, 1808, 1808, 1810, 1839, 1869, 1957, 1969, 1969, 1994, 2026, 2036, 2037, 2042, 2042, 2048, 2069, 2074, 2074, 2084, 2084, 2088, 2088, 2112, 2136, 2208, 2208, 2210, 2220, 2308, 2361, 2365, 2365, 2384, 2384, 2392, 2401, 2417, 2423, 2425, 2431, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2493, 2493, 2510, 2510, 2524, 2525, 2527, 2529, 2544, 2545, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2649, 2652, 2654, 2654, 2674, 2676, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2785, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2929, 2929, 2947, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3024, 3024, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3133, 3133, 3160, 3161, 3168, 3169, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3261, 3261, 3294, 3294, 3296, 3297, 3313, 3314, 3333, 3340, 3342, 3344, 3346, 3386, 3389, 3389, 3406, 3406, 3424, 3425, 3450, 3455, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3585, 3632, 3634, 3635, 3648, 3654, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3760, 3762, 3763, 3773, 3773, 3776, 3780, 3782, 3782, 3804, 3807, 3840, 3840, 3904, 3911, 3913, 3948, 3976, 3980, 4096, 4138, 4159, 4159, 4176, 4181, 4186, 4189, 4193, 4193, 4197, 4198, 4206, 4208, 4213, 4225, 4238, 4238, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4992, 5007, 5024, 5108, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5872, 5888, 5900, 5902, 5905, 5920, 5937, 5952, 5969, 5984, 5996, 5998, 6000, 6016, 6067, 6103, 6103, 6108, 6108, 6176, 6263, 6272, 6312, 6314, 6314, 6320, 6389, 6400, 6428, 6480, 6509, 6512, 6516, 6528, 6571, 6593, 6599, 6656, 6678, 6688, 6740, 6823, 6823, 6917, 6963, 6981, 6987, 7043, 7072, 7086, 7087, 7098, 7141, 7168, 7203, 7245, 7247, 7258, 7293, 7401, 7404, 7406, 7409, 7413, 7414, 7424, 7615, 7680, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8305, 8305, 8319, 8319, 8336, 8348, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11502, 11506, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11648, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11823, 11823, 12293, 12295, 12321, 12329, 12337, 12341, 12344, 12348, 12353, 12438, 12445, 12447, 12449, 12538, 12540, 12543, 12549, 12589, 12593, 12686, 12704, 12730, 12784, 12799, 13312, 19893, 19968, 40908, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42527, 42538, 42539, 42560, 42606, 42623, 42647, 42656, 42735, 42775, 42783, 42786, 42888, 42891, 42894, 42896, 42899, 42912, 42922, 43000, 43009, 43011, 43013, 43015, 43018, 43020, 43042, 43072, 43123, 43138, 43187, 43250, 43255, 43259, 43259, 43274, 43301, 43312, 43334, 43360, 43388, 43396, 43442, 43471, 43471, 43520, 43560, 43584, 43586, 43588, 43595, 43616, 43638, 43642, 43642, 43648, 43695, 43697, 43697, 43701, 43702, 43705, 43709, 43712, 43712, 43714, 43714, 43739, 43741, 43744, 43754, 43762, 43764, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43968, 44002, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64285, 64287, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65136, 65140, 65142, 65276, 65313, 65338, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500,];
          var unicodeES5IdentifierPart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 768, 884, 886, 887, 890, 893, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1155, 1159, 1162, 1319, 1329, 1366, 1369, 1369, 1377, 1415, 1425, 1469, 1471, 1471, 1473, 1474, 1476, 1477, 1479, 1479, 1488, 1514, 1520, 1522, 1552, 1562, 1568, 1641, 1646, 1747, 1749, 1756, 1759, 1768, 1770, 1788, 1791, 1791, 1808, 1866, 1869, 1969, 1984, 2037, 2042, 2042, 2048, 2093, 2112, 2139, 2208, 2208, 2210, 2220, 2276, 2302, 2304, 2403, 2406, 2415, 2417, 2423, 2425, 2431, 2433, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2492, 2500, 2503, 2504, 2507, 2510, 2519, 2519, 2524, 2525, 2527, 2531, 2534, 2545, 2561, 2563, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2620, 2620, 2622, 2626, 2631, 2632, 2635, 2637, 2641, 2641, 2649, 2652, 2654, 2654, 2662, 2677, 2689, 2691, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2768, 2768, 2784, 2787, 2790, 2799, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2876, 2884, 2887, 2888, 2891, 2893, 2902, 2903, 2908, 2909, 2911, 2915, 2918, 2927, 2929, 2929, 2946, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3024, 3024, 3031, 3031, 3046, 3055, 3073, 3075, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3133, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3160, 3161, 3168, 3171, 3174, 3183, 3202, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3260, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3294, 3294, 3296, 3299, 3302, 3311, 3313, 3314, 3330, 3331, 3333, 3340, 3342, 3344, 3346, 3386, 3389, 3396, 3398, 3400, 3402, 3406, 3415, 3415, 3424, 3427, 3430, 3439, 3450, 3455, 3458, 3459, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3530, 3530, 3535, 3540, 3542, 3542, 3544, 3551, 3570, 3571, 3585, 3642, 3648, 3662, 3664, 3673, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3769, 3771, 3773, 3776, 3780, 3782, 3782, 3784, 3789, 3792, 3801, 3804, 3807, 3840, 3840, 3864, 3865, 3872, 3881, 3893, 3893, 3895, 3895, 3897, 3897, 3902, 3911, 3913, 3948, 3953, 3972, 3974, 3991, 3993, 4028, 4038, 4038, 4096, 4169, 4176, 4253, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4957, 4959, 4992, 5007, 5024, 5108, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5872, 5888, 5900, 5902, 5908, 5920, 5940, 5952, 5971, 5984, 5996, 5998, 6000, 6002, 6003, 6016, 6099, 6103, 6103, 6108, 6109, 6112, 6121, 6155, 6157, 6160, 6169, 6176, 6263, 6272, 6314, 6320, 6389, 6400, 6428, 6432, 6443, 6448, 6459, 6470, 6509, 6512, 6516, 6528, 6571, 6576, 6601, 6608, 6617, 6656, 6683, 6688, 6750, 6752, 6780, 6783, 6793, 6800, 6809, 6823, 6823, 6912, 6987, 6992, 7001, 7019, 7027, 7040, 7155, 7168, 7223, 7232, 7241, 7245, 7293, 7376, 7378, 7380, 7414, 7424, 7654, 7676, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8204, 8205, 8255, 8256, 8276, 8276, 8305, 8305, 8319, 8319, 8336, 8348, 8400, 8412, 8417, 8417, 8421, 8432, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11647, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11744, 11775, 11823, 11823, 12293, 12295, 12321, 12335, 12337, 12341, 12344, 12348, 12353, 12438, 12441, 12442, 12445, 12447, 12449, 12538, 12540, 12543, 12549, 12589, 12593, 12686, 12704, 12730, 12784, 12799, 13312, 19893, 19968, 40908, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42539, 42560, 42607, 42612, 42621, 42623, 42647, 42655, 42737, 42775, 42783, 42786, 42888, 42891, 42894, 42896, 42899, 42912, 42922, 43000, 43047, 43072, 43123, 43136, 43204, 43216, 43225, 43232, 43255, 43259, 43259, 43264, 43309, 43312, 43347, 43360, 43388, 43392, 43456, 43471, 43481, 43520, 43574, 43584, 43597, 43600, 43609, 43616, 43638, 43642, 43643, 43648, 43714, 43739, 43741, 43744, 43759, 43762, 43766, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43968, 44010, 44012, 44013, 44016, 44025, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65024, 65039, 65056, 65062, 65075, 65076, 65101, 65103, 65136, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65343, 65343, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500,];
          function lookupInUnicodeMap(code, map) {
              if (code < map[0]) {
                  return false;
              }
              var lo = 0;
              var hi = map.length;
              var mid;
              while (lo + 1 < hi) {
                  mid = lo + (hi - lo) / 2;
                  mid -= mid % 2;
                  if (map[mid] <= code && code <= map[mid + 1]) {
                      return true;
                  }
                  if (code < map[mid]) {
                      hi = mid;
                  }
                  else {
                      lo = mid + 2;
                  }
              }
              return false;
          }
          function isUnicodeIdentifierStart(code, languageVersion) {
              return languageVersion >= 1 ?
                  lookupInUnicodeMap(code, unicodeES5IdentifierStart) :
                  lookupInUnicodeMap(code, unicodeES3IdentifierStart);
          }
          ts.isUnicodeIdentifierStart = isUnicodeIdentifierStart;
          function isUnicodeIdentifierPart(code, languageVersion) {
              return languageVersion >= 1 ?
                  lookupInUnicodeMap(code, unicodeES5IdentifierPart) :
                  lookupInUnicodeMap(code, unicodeES3IdentifierPart);
          }
          function makeReverseMap(source) {
              var result = [];
              for (var name_2 in source) {
                  if (source.hasOwnProperty(name_2)) {
                      result[source[name_2]] = name_2;
                  }
              }
              return result;
          }
          var tokenStrings = makeReverseMap(textToToken);
          function tokenToString(t) {
              return tokenStrings[t];
          }
          ts.tokenToString = tokenToString;
          function stringToToken(s) {
              return textToToken[s];
          }
          ts.stringToToken = stringToToken;
          function computeLineStarts(text) {
              var result = new Array();
              var pos = 0;
              var lineStart = 0;
              while (pos < text.length) {
                  var ch = text.charCodeAt(pos++);
                  switch (ch) {
                      case 13:
                          if (text.charCodeAt(pos) === 10) {
                              pos++;
                          }
                      case 10:
                          result.push(lineStart);
                          lineStart = pos;
                          break;
                      default:
                          if (ch > 127 && isLineBreak(ch)) {
                              result.push(lineStart);
                              lineStart = pos;
                          }
                          break;
                  }
              }
              result.push(lineStart);
              return result;
          }
          ts.computeLineStarts = computeLineStarts;
          function getPositionOfLineAndCharacter(sourceFile, line, character) {
              return computePositionOfLineAndCharacter(getLineStarts(sourceFile), line, character);
          }
          ts.getPositionOfLineAndCharacter = getPositionOfLineAndCharacter;
          function computePositionOfLineAndCharacter(lineStarts, line, character) {
              ts.Debug.assert(line >= 0 && line < lineStarts.length);
              return lineStarts[line] + character;
          }
          ts.computePositionOfLineAndCharacter = computePositionOfLineAndCharacter;
          function getLineStarts(sourceFile) {
              return sourceFile.lineMap || (sourceFile.lineMap = computeLineStarts(sourceFile.text));
          }
          ts.getLineStarts = getLineStarts;
          function computeLineAndCharacterOfPosition(lineStarts, position) {
              var lineNumber = ts.binarySearch(lineStarts, position);
              if (lineNumber < 0) {
                  lineNumber = ~lineNumber - 1;
              }
              return {
                  line: lineNumber,
                  character: position - lineStarts[lineNumber]
              };
          }
          ts.computeLineAndCharacterOfPosition = computeLineAndCharacterOfPosition;
          function getLineAndCharacterOfPosition(sourceFile, position) {
              return computeLineAndCharacterOfPosition(getLineStarts(sourceFile), position);
          }
          ts.getLineAndCharacterOfPosition = getLineAndCharacterOfPosition;
          var hasOwnProperty = Object.prototype.hasOwnProperty;
          function isWhiteSpace(ch) {
              return ch === 32 ||
                  ch === 9 ||
                  ch === 11 ||
                  ch === 12 ||
                  ch === 160 ||
                  ch === 133 ||
                  ch === 5760 ||
                  ch >= 8192 && ch <= 8203 ||
                  ch === 8239 ||
                  ch === 8287 ||
                  ch === 12288 ||
                  ch === 65279;
          }
          ts.isWhiteSpace = isWhiteSpace;
          function isLineBreak(ch) {
              // ES5 7.3:
              // The ECMAScript line terminator characters are listed in Table 3.
              //     Table 3: Line Terminator Characters
              //     Code Unit Value     Name                    Formal Name
              //     \u000A              Line Feed               <LF>
              //     \u000D              Carriage Return         <CR>
              //     \u2028              Line separator          <LS>
              //     \u2029              Paragraph separator     <PS>
              // Only the characters in Table 3 are treated as line terminators. Other new line or line 
              // breaking characters are treated as white space but not as line terminators. 
              return ch === 10 ||
                  ch === 13 ||
                  ch === 8232 ||
                  ch === 8233;
          }
          ts.isLineBreak = isLineBreak;
          function isDigit(ch) {
              return ch >= 48 && ch <= 57;
          }
          function isOctalDigit(ch) {
              return ch >= 48 && ch <= 55;
          }
          ts.isOctalDigit = isOctalDigit;
          function skipTrivia(text, pos, stopAfterLineBreak) {
              while (true) {
                  var ch = text.charCodeAt(pos);
                  switch (ch) {
                      case 13:
                          if (text.charCodeAt(pos + 1) === 10) {
                              pos++;
                          }
                      case 10:
                          pos++;
                          if (stopAfterLineBreak) {
                              return pos;
                          }
                          continue;
                      case 9:
                      case 11:
                      case 12:
                      case 32:
                          pos++;
                          continue;
                      case 47:
                          if (text.charCodeAt(pos + 1) === 47) {
                              pos += 2;
                              while (pos < text.length) {
                                  if (isLineBreak(text.charCodeAt(pos))) {
                                      break;
                                  }
                                  pos++;
                              }
                              continue;
                          }
                          if (text.charCodeAt(pos + 1) === 42) {
                              pos += 2;
                              while (pos < text.length) {
                                  if (text.charCodeAt(pos) === 42 && text.charCodeAt(pos + 1) === 47) {
                                      pos += 2;
                                      break;
                                  }
                                  pos++;
                              }
                              continue;
                          }
                          break;
                      case 60:
                      case 61:
                      case 62:
                          if (isConflictMarkerTrivia(text, pos)) {
                              pos = scanConflictMarkerTrivia(text, pos);
                              continue;
                          }
                          break;
                      default:
                          if (ch > 127 && (isWhiteSpace(ch) || isLineBreak(ch))) {
                              pos++;
                              continue;
                          }
                          break;
                  }
                  return pos;
              }
          }
          ts.skipTrivia = skipTrivia;
          var mergeConflictMarkerLength = "<<<<<<<".length;
          function isConflictMarkerTrivia(text, pos) {
              ts.Debug.assert(pos >= 0);
              if (pos === 0 || isLineBreak(text.charCodeAt(pos - 1))) {
                  var ch = text.charCodeAt(pos);
                  if ((pos + mergeConflictMarkerLength) < text.length) {
                      for (var i = 0, n = mergeConflictMarkerLength; i < n; i++) {
                          if (text.charCodeAt(pos + i) !== ch) {
                              return false;
                          }
                      }
                      return ch === 61 ||
                          text.charCodeAt(pos + mergeConflictMarkerLength) === 32;
                  }
              }
              return false;
          }
          function scanConflictMarkerTrivia(text, pos, error) {
              if (error) {
                  error(ts.Diagnostics.Merge_conflict_marker_encountered, mergeConflictMarkerLength);
              }
              var ch = text.charCodeAt(pos);
              var len = text.length;
              if (ch === 60 || ch === 62) {
                  while (pos < len && !isLineBreak(text.charCodeAt(pos))) {
                      pos++;
                  }
              }
              else {
                  ts.Debug.assert(ch === 61);
                  while (pos < len) {
                      var ch_1 = text.charCodeAt(pos);
                      if (ch_1 === 62 && isConflictMarkerTrivia(text, pos)) {
                          break;
                      }
                      pos++;
                  }
              }
              return pos;
          }
          function getCommentRanges(text, pos, trailing) {
              var result;
              var collecting = trailing || pos === 0;
              while (true) {
                  var ch = text.charCodeAt(pos);
                  switch (ch) {
                      case 13:
                          if (text.charCodeAt(pos + 1) === 10) {
                              pos++;
                          }
                      case 10:
                          pos++;
                          if (trailing) {
                              return result;
                          }
                          collecting = true;
                          if (result && result.length) {
                              ts.lastOrUndefined(result).hasTrailingNewLine = true;
                          }
                          continue;
                      case 9:
                      case 11:
                      case 12:
                      case 32:
                          pos++;
                          continue;
                      case 47:
                          var nextChar = text.charCodeAt(pos + 1);
                          var hasTrailingNewLine = false;
                          if (nextChar === 47 || nextChar === 42) {
                              var kind = nextChar === 47 ? 2 : 3;
                              var startPos = pos;
                              pos += 2;
                              if (nextChar === 47) {
                                  while (pos < text.length) {
                                      if (isLineBreak(text.charCodeAt(pos))) {
                                          hasTrailingNewLine = true;
                                          break;
                                      }
                                      pos++;
                                  }
                              }
                              else {
                                  while (pos < text.length) {
                                      if (text.charCodeAt(pos) === 42 && text.charCodeAt(pos + 1) === 47) {
                                          pos += 2;
                                          break;
                                      }
                                      pos++;
                                  }
                              }
                              if (collecting) {
                                  if (!result) {
                                      result = [];
                                  }
                                  result.push({ pos: startPos, end: pos, hasTrailingNewLine: hasTrailingNewLine, kind: kind });
                              }
                              continue;
                          }
                          break;
                      default:
                          if (ch > 127 && (isWhiteSpace(ch) || isLineBreak(ch))) {
                              if (result && result.length && isLineBreak(ch)) {
                                  ts.lastOrUndefined(result).hasTrailingNewLine = true;
                              }
                              pos++;
                              continue;
                          }
                          break;
                  }
                  return result;
              }
          }
          function getLeadingCommentRanges(text, pos) {
              return getCommentRanges(text, pos, false);
          }
          ts.getLeadingCommentRanges = getLeadingCommentRanges;
          function getTrailingCommentRanges(text, pos) {
              return getCommentRanges(text, pos, true);
          }
          ts.getTrailingCommentRanges = getTrailingCommentRanges;
          function isIdentifierStart(ch, languageVersion) {
              return ch >= 65 && ch <= 90 || ch >= 97 && ch <= 122 ||
                  ch === 36 || ch === 95 ||
                  ch > 127 && isUnicodeIdentifierStart(ch, languageVersion);
          }
          ts.isIdentifierStart = isIdentifierStart;
          function isIdentifierPart(ch, languageVersion) {
              return ch >= 65 && ch <= 90 || ch >= 97 && ch <= 122 ||
                  ch >= 48 && ch <= 57 || ch === 36 || ch === 95 ||
                  ch > 127 && isUnicodeIdentifierPart(ch, languageVersion);
          }
          ts.isIdentifierPart = isIdentifierPart;
          function createScanner(languageVersion, skipTrivia, text, onError, start, length) {
              var pos;
              var end;
              var startPos;
              var tokenPos;
              var token;
              var tokenValue;
              var precedingLineBreak;
              var hasExtendedUnicodeEscape;
              var tokenIsUnterminated;
              setText(text, start, length);
              return {
                  getStartPos: function () { return startPos; },
                  getTextPos: function () { return pos; },
                  getToken: function () { return token; },
                  getTokenPos: function () { return tokenPos; },
                  getTokenText: function () { return text.substring(tokenPos, pos); },
                  getTokenValue: function () { return tokenValue; },
                  hasExtendedUnicodeEscape: function () { return hasExtendedUnicodeEscape; },
                  hasPrecedingLineBreak: function () { return precedingLineBreak; },
                  isIdentifier: function () { return token === 65 || token > 101; },
                  isReservedWord: function () { return token >= 66 && token <= 101; },
                  isUnterminated: function () { return tokenIsUnterminated; },
                  reScanGreaterToken: reScanGreaterToken,
                  reScanSlashToken: reScanSlashToken,
                  reScanTemplateToken: reScanTemplateToken,
                  scan: scan,
                  setText: setText,
                  setScriptTarget: setScriptTarget,
                  setOnError: setOnError,
                  setTextPos: setTextPos,
                  tryScan: tryScan,
                  lookAhead: lookAhead
              };
              function error(message, length) {
                  if (onError) {
                      onError(message, length || 0);
                  }
              }
              function isIdentifierStart(ch) {
                  return ch >= 65 && ch <= 90 || ch >= 97 && ch <= 122 ||
                      ch === 36 || ch === 95 ||
                      ch > 127 && isUnicodeIdentifierStart(ch, languageVersion);
              }
              function isIdentifierPart(ch) {
                  return ch >= 65 && ch <= 90 || ch >= 97 && ch <= 122 ||
                      ch >= 48 && ch <= 57 || ch === 36 || ch === 95 ||
                      ch > 127 && isUnicodeIdentifierPart(ch, languageVersion);
              }
              function scanNumber() {
                  var start = pos;
                  while (isDigit(text.charCodeAt(pos)))
                      pos++;
                  if (text.charCodeAt(pos) === 46) {
                      pos++;
                      while (isDigit(text.charCodeAt(pos)))
                          pos++;
                  }
                  var end = pos;
                  if (text.charCodeAt(pos) === 69 || text.charCodeAt(pos) === 101) {
                      pos++;
                      if (text.charCodeAt(pos) === 43 || text.charCodeAt(pos) === 45)
                          pos++;
                      if (isDigit(text.charCodeAt(pos))) {
                          pos++;
                          while (isDigit(text.charCodeAt(pos)))
                              pos++;
                          end = pos;
                      }
                      else {
                          error(ts.Diagnostics.Digit_expected);
                      }
                  }
                  return +(text.substring(start, end));
              }
              function scanOctalDigits() {
                  var start = pos;
                  while (isOctalDigit(text.charCodeAt(pos))) {
                      pos++;
                  }
                  return +(text.substring(start, pos));
              }
              function scanExactNumberOfHexDigits(count) {
                  return scanHexDigits(count, false);
              }
              function scanMinimumNumberOfHexDigits(count) {
                  return scanHexDigits(count, true);
              }
              function scanHexDigits(minCount, scanAsManyAsPossible) {
                  var digits = 0;
                  var value = 0;
                  while (digits < minCount || scanAsManyAsPossible) {
                      var ch = text.charCodeAt(pos);
                      if (ch >= 48 && ch <= 57) {
                          value = value * 16 + ch - 48;
                      }
                      else if (ch >= 65 && ch <= 70) {
                          value = value * 16 + ch - 65 + 10;
                      }
                      else if (ch >= 97 && ch <= 102) {
                          value = value * 16 + ch - 97 + 10;
                      }
                      else {
                          break;
                      }
                      pos++;
                      digits++;
                  }
                  if (digits < minCount) {
                      value = -1;
                  }
                  return value;
              }
              function scanString() {
                  var quote = text.charCodeAt(pos++);
                  var result = "";
                  var start = pos;
                  while (true) {
                      if (pos >= end) {
                          result += text.substring(start, pos);
                          tokenIsUnterminated = true;
                          error(ts.Diagnostics.Unterminated_string_literal);
                          break;
                      }
                      var ch = text.charCodeAt(pos);
                      if (ch === quote) {
                          result += text.substring(start, pos);
                          pos++;
                          break;
                      }
                      if (ch === 92) {
                          result += text.substring(start, pos);
                          result += scanEscapeSequence();
                          start = pos;
                          continue;
                      }
                      if (isLineBreak(ch)) {
                          result += text.substring(start, pos);
                          tokenIsUnterminated = true;
                          error(ts.Diagnostics.Unterminated_string_literal);
                          break;
                      }
                      pos++;
                  }
                  return result;
              }
              function scanTemplateAndSetTokenValue() {
                  var startedWithBacktick = text.charCodeAt(pos) === 96;
                  pos++;
                  var start = pos;
                  var contents = "";
                  var resultingToken;
                  while (true) {
                      if (pos >= end) {
                          contents += text.substring(start, pos);
                          tokenIsUnterminated = true;
                          error(ts.Diagnostics.Unterminated_template_literal);
                          resultingToken = startedWithBacktick ? 10 : 13;
                          break;
                      }
                      var currChar = text.charCodeAt(pos);
                      if (currChar === 96) {
                          contents += text.substring(start, pos);
                          pos++;
                          resultingToken = startedWithBacktick ? 10 : 13;
                          break;
                      }
                      if (currChar === 36 && pos + 1 < end && text.charCodeAt(pos + 1) === 123) {
                          contents += text.substring(start, pos);
                          pos += 2;
                          resultingToken = startedWithBacktick ? 11 : 12;
                          break;
                      }
                      if (currChar === 92) {
                          contents += text.substring(start, pos);
                          contents += scanEscapeSequence();
                          start = pos;
                          continue;
                      }
                      if (currChar === 13) {
                          contents += text.substring(start, pos);
                          pos++;
                          if (pos < end && text.charCodeAt(pos) === 10) {
                              pos++;
                          }
                          contents += "\n";
                          start = pos;
                          continue;
                      }
                      pos++;
                  }
                  ts.Debug.assert(resultingToken !== undefined);
                  tokenValue = contents;
                  return resultingToken;
              }
              function scanEscapeSequence() {
                  pos++;
                  if (pos >= end) {
                      error(ts.Diagnostics.Unexpected_end_of_text);
                      return "";
                  }
                  var ch = text.charCodeAt(pos++);
                  switch (ch) {
                      case 48:
                          return "\0";
                      case 98:
                          return "\b";
                      case 116:
                          return "\t";
                      case 110:
                          return "\n";
                      case 118:
                          return "\v";
                      case 102:
                          return "\f";
                      case 114:
                          return "\r";
                      case 39:
                          return "\'";
                      case 34:
                          return "\"";
                      case 117:
                          if (pos < end && text.charCodeAt(pos) === 123) {
                              hasExtendedUnicodeEscape = true;
                              pos++;
                              return scanExtendedUnicodeEscape();
                          }
                          return scanHexadecimalEscape(4);
                      case 120:
                          return scanHexadecimalEscape(2);
                      case 13:
                          if (pos < end && text.charCodeAt(pos) === 10) {
                              pos++;
                          }
                      case 10:
                      case 8232:
                      case 8233:
                          return "";
                      default:
                          return String.fromCharCode(ch);
                  }
              }
              function scanHexadecimalEscape(numDigits) {
                  var escapedValue = scanExactNumberOfHexDigits(numDigits);
                  if (escapedValue >= 0) {
                      return String.fromCharCode(escapedValue);
                  }
                  else {
                      error(ts.Diagnostics.Hexadecimal_digit_expected);
                      return "";
                  }
              }
              function scanExtendedUnicodeEscape() {
                  var escapedValue = scanMinimumNumberOfHexDigits(1);
                  var isInvalidExtendedEscape = false;
                  if (escapedValue < 0) {
                      error(ts.Diagnostics.Hexadecimal_digit_expected);
                      isInvalidExtendedEscape = true;
                  }
                  else if (escapedValue > 0x10FFFF) {
                      error(ts.Diagnostics.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive);
                      isInvalidExtendedEscape = true;
                  }
                  if (pos >= end) {
                      error(ts.Diagnostics.Unexpected_end_of_text);
                      isInvalidExtendedEscape = true;
                  }
                  else if (text.charCodeAt(pos) == 125) {
                      pos++;
                  }
                  else {
                      error(ts.Diagnostics.Unterminated_Unicode_escape_sequence);
                      isInvalidExtendedEscape = true;
                  }
                  if (isInvalidExtendedEscape) {
                      return "";
                  }
                  return utf16EncodeAsString(escapedValue);
              }
              function utf16EncodeAsString(codePoint) {
                  ts.Debug.assert(0x0 <= codePoint && codePoint <= 0x10FFFF);
                  if (codePoint <= 65535) {
                      return String.fromCharCode(codePoint);
                  }
                  var codeUnit1 = Math.floor((codePoint - 65536) / 1024) + 0xD800;
                  var codeUnit2 = ((codePoint - 65536) % 1024) + 0xDC00;
                  return String.fromCharCode(codeUnit1, codeUnit2);
              }
              function peekUnicodeEscape() {
                  if (pos + 5 < end && text.charCodeAt(pos + 1) === 117) {
                      var start_1 = pos;
                      pos += 2;
                      var value = scanExactNumberOfHexDigits(4);
                      pos = start_1;
                      return value;
                  }
                  return -1;
              }
              function scanIdentifierParts() {
                  var result = "";
                  var start = pos;
                  while (pos < end) {
                      var ch = text.charCodeAt(pos);
                      if (isIdentifierPart(ch)) {
                          pos++;
                      }
                      else if (ch === 92) {
                          ch = peekUnicodeEscape();
                          if (!(ch >= 0 && isIdentifierPart(ch))) {
                              break;
                          }
                          result += text.substring(start, pos);
                          result += String.fromCharCode(ch);
                          pos += 6;
                          start = pos;
                      }
                      else {
                          break;
                      }
                  }
                  result += text.substring(start, pos);
                  return result;
              }
              function getIdentifierToken() {
                  var len = tokenValue.length;
                  if (len >= 2 && len <= 11) {
                      var ch = tokenValue.charCodeAt(0);
                      if (ch >= 97 && ch <= 122 && hasOwnProperty.call(textToToken, tokenValue)) {
                          return token = textToToken[tokenValue];
                      }
                  }
                  return token = 65;
              }
              function scanBinaryOrOctalDigits(base) {
                  ts.Debug.assert(base !== 2 || base !== 8, "Expected either base 2 or base 8");
                  var value = 0;
                  var numberOfDigits = 0;
                  while (true) {
                      var ch = text.charCodeAt(pos);
                      var valueOfCh = ch - 48;
                      if (!isDigit(ch) || valueOfCh >= base) {
                          break;
                      }
                      value = value * base + valueOfCh;
                      pos++;
                      numberOfDigits++;
                  }
                  if (numberOfDigits === 0) {
                      return -1;
                  }
                  return value;
              }
              function scan() {
                  startPos = pos;
                  hasExtendedUnicodeEscape = false;
                  precedingLineBreak = false;
                  tokenIsUnterminated = false;
                  while (true) {
                      tokenPos = pos;
                      if (pos >= end) {
                          return token = 1;
                      }
                      var ch = text.charCodeAt(pos);
                      switch (ch) {
                          case 10:
                          case 13:
                              precedingLineBreak = true;
                              if (skipTrivia) {
                                  pos++;
                                  continue;
                              }
                              else {
                                  if (ch === 13 && pos + 1 < end && text.charCodeAt(pos + 1) === 10) {
                                      pos += 2;
                                  }
                                  else {
                                      pos++;
                                  }
                                  return token = 4;
                              }
                          case 9:
                          case 11:
                          case 12:
                          case 32:
                              if (skipTrivia) {
                                  pos++;
                                  continue;
                              }
                              else {
                                  while (pos < end && isWhiteSpace(text.charCodeAt(pos))) {
                                      pos++;
                                  }
                                  return token = 5;
                              }
                          case 33:
                              if (text.charCodeAt(pos + 1) === 61) {
                                  if (text.charCodeAt(pos + 2) === 61) {
                                      return pos += 3, token = 31;
                                  }
                                  return pos += 2, token = 29;
                              }
                              return pos++, token = 46;
                          case 34:
                          case 39:
                              tokenValue = scanString();
                              return token = 8;
                          case 96:
                              return token = scanTemplateAndSetTokenValue();
                          case 37:
                              if (text.charCodeAt(pos + 1) === 61) {
                                  return pos += 2, token = 58;
                              }
                              return pos++, token = 37;
                          case 38:
                              if (text.charCodeAt(pos + 1) === 38) {
                                  return pos += 2, token = 48;
                              }
                              if (text.charCodeAt(pos + 1) === 61) {
                                  return pos += 2, token = 62;
                              }
                              return pos++, token = 43;
                          case 40:
                              return pos++, token = 16;
                          case 41:
                              return pos++, token = 17;
                          case 42:
                              if (text.charCodeAt(pos + 1) === 61) {
                                  return pos += 2, token = 56;
                              }
                              return pos++, token = 35;
                          case 43:
                              if (text.charCodeAt(pos + 1) === 43) {
                                  return pos += 2, token = 38;
                              }
                              if (text.charCodeAt(pos + 1) === 61) {
                                  return pos += 2, token = 54;
                              }
                              return pos++, token = 33;
                          case 44:
                              return pos++, token = 23;
                          case 45:
                              if (text.charCodeAt(pos + 1) === 45) {
                                  return pos += 2, token = 39;
                              }
                              if (text.charCodeAt(pos + 1) === 61) {
                                  return pos += 2, token = 55;
                              }
                              return pos++, token = 34;
                          case 46:
                              if (isDigit(text.charCodeAt(pos + 1))) {
                                  tokenValue = "" + scanNumber();
                                  return token = 7;
                              }
                              if (text.charCodeAt(pos + 1) === 46 && text.charCodeAt(pos + 2) === 46) {
                                  return pos += 3, token = 21;
                              }
                              return pos++, token = 20;
                          case 47:
                              if (text.charCodeAt(pos + 1) === 47) {
                                  pos += 2;
                                  while (pos < end) {
                                      if (isLineBreak(text.charCodeAt(pos))) {
                                          break;
                                      }
                                      pos++;
                                  }
                                  if (skipTrivia) {
                                      continue;
                                  }
                                  else {
                                      return token = 2;
                                  }
                              }
                              if (text.charCodeAt(pos + 1) === 42) {
                                  pos += 2;
                                  var commentClosed = false;
                                  while (pos < end) {
                                      var ch_2 = text.charCodeAt(pos);
                                      if (ch_2 === 42 && text.charCodeAt(pos + 1) === 47) {
                                          pos += 2;
                                          commentClosed = true;
                                          break;
                                      }
                                      if (isLineBreak(ch_2)) {
                                          precedingLineBreak = true;
                                      }
                                      pos++;
                                  }
                                  if (!commentClosed) {
                                      error(ts.Diagnostics.Asterisk_Slash_expected);
                                  }
                                  if (skipTrivia) {
                                      continue;
                                  }
                                  else {
                                      tokenIsUnterminated = !commentClosed;
                                      return token = 3;
                                  }
                              }
                              if (text.charCodeAt(pos + 1) === 61) {
                                  return pos += 2, token = 57;
                              }
                              return pos++, token = 36;
                          case 48:
                              if (pos + 2 < end && (text.charCodeAt(pos + 1) === 88 || text.charCodeAt(pos + 1) === 120)) {
                                  pos += 2;
                                  var value = scanMinimumNumberOfHexDigits(1);
                                  if (value < 0) {
                                      error(ts.Diagnostics.Hexadecimal_digit_expected);
                                      value = 0;
                                  }
                                  tokenValue = "" + value;
                                  return token = 7;
                              }
                              else if (pos + 2 < end && (text.charCodeAt(pos + 1) === 66 || text.charCodeAt(pos + 1) === 98)) {
                                  pos += 2;
                                  var value = scanBinaryOrOctalDigits(2);
                                  if (value < 0) {
                                      error(ts.Diagnostics.Binary_digit_expected);
                                      value = 0;
                                  }
                                  tokenValue = "" + value;
                                  return token = 7;
                              }
                              else if (pos + 2 < end && (text.charCodeAt(pos + 1) === 79 || text.charCodeAt(pos + 1) === 111)) {
                                  pos += 2;
                                  var value = scanBinaryOrOctalDigits(8);
                                  if (value < 0) {
                                      error(ts.Diagnostics.Octal_digit_expected);
                                      value = 0;
                                  }
                                  tokenValue = "" + value;
                                  return token = 7;
                              }
                              if (pos + 1 < end && isOctalDigit(text.charCodeAt(pos + 1))) {
                                  tokenValue = "" + scanOctalDigits();
                                  return token = 7;
                              }
                          case 49:
                          case 50:
                          case 51:
                          case 52:
                          case 53:
                          case 54:
                          case 55:
                          case 56:
                          case 57:
                              tokenValue = "" + scanNumber();
                              return token = 7;
                          case 58:
                              return pos++, token = 51;
                          case 59:
                              return pos++, token = 22;
                          case 60:
                              if (isConflictMarkerTrivia(text, pos)) {
                                  pos = scanConflictMarkerTrivia(text, pos, error);
                                  if (skipTrivia) {
                                      continue;
                                  }
                                  else {
                                      return token = 6;
                                  }
                              }
                              if (text.charCodeAt(pos + 1) === 60) {
                                  if (text.charCodeAt(pos + 2) === 61) {
                                      return pos += 3, token = 59;
                                  }
                                  return pos += 2, token = 40;
                              }
                              if (text.charCodeAt(pos + 1) === 61) {
                                  return pos += 2, token = 26;
                              }
                              return pos++, token = 24;
                          case 61:
                              if (isConflictMarkerTrivia(text, pos)) {
                                  pos = scanConflictMarkerTrivia(text, pos, error);
                                  if (skipTrivia) {
                                      continue;
                                  }
                                  else {
                                      return token = 6;
                                  }
                              }
                              if (text.charCodeAt(pos + 1) === 61) {
                                  if (text.charCodeAt(pos + 2) === 61) {
                                      return pos += 3, token = 30;
                                  }
                                  return pos += 2, token = 28;
                              }
                              if (text.charCodeAt(pos + 1) === 62) {
                                  return pos += 2, token = 32;
                              }
                              return pos++, token = 53;
                          case 62:
                              if (isConflictMarkerTrivia(text, pos)) {
                                  pos = scanConflictMarkerTrivia(text, pos, error);
                                  if (skipTrivia) {
                                      continue;
                                  }
                                  else {
                                      return token = 6;
                                  }
                              }
                              return pos++, token = 25;
                          case 63:
                              return pos++, token = 50;
                          case 91:
                              return pos++, token = 18;
                          case 93:
                              return pos++, token = 19;
                          case 94:
                              if (text.charCodeAt(pos + 1) === 61) {
                                  return pos += 2, token = 64;
                              }
                              return pos++, token = 45;
                          case 123:
                              return pos++, token = 14;
                          case 124:
                              if (text.charCodeAt(pos + 1) === 124) {
                                  return pos += 2, token = 49;
                              }
                              if (text.charCodeAt(pos + 1) === 61) {
                                  return pos += 2, token = 63;
                              }
                              return pos++, token = 44;
                          case 125:
                              return pos++, token = 15;
                          case 126:
                              return pos++, token = 47;
                          case 64:
                              return pos++, token = 52;
                          case 92:
                              var cookedChar = peekUnicodeEscape();
                              if (cookedChar >= 0 && isIdentifierStart(cookedChar)) {
                                  pos += 6;
                                  tokenValue = String.fromCharCode(cookedChar) + scanIdentifierParts();
                                  return token = getIdentifierToken();
                              }
                              error(ts.Diagnostics.Invalid_character);
                              return pos++, token = 0;
                          default:
                              if (isIdentifierStart(ch)) {
                                  pos++;
                                  while (pos < end && isIdentifierPart(ch = text.charCodeAt(pos)))
                                      pos++;
                                  tokenValue = text.substring(tokenPos, pos);
                                  if (ch === 92) {
                                      tokenValue += scanIdentifierParts();
                                  }
                                  return token = getIdentifierToken();
                              }
                              else if (isWhiteSpace(ch)) {
                                  pos++;
                                  continue;
                              }
                              else if (isLineBreak(ch)) {
                                  precedingLineBreak = true;
                                  pos++;
                                  continue;
                              }
                              error(ts.Diagnostics.Invalid_character);
                              return pos++, token = 0;
                      }
                  }
              }
              function reScanGreaterToken() {
                  if (token === 25) {
                      if (text.charCodeAt(pos) === 62) {
                          if (text.charCodeAt(pos + 1) === 62) {
                              if (text.charCodeAt(pos + 2) === 61) {
                                  return pos += 3, token = 61;
                              }
                              return pos += 2, token = 42;
                          }
                          if (text.charCodeAt(pos + 1) === 61) {
                              return pos += 2, token = 60;
                          }
                          return pos++, token = 41;
                      }
                      if (text.charCodeAt(pos) === 61) {
                          return pos++, token = 27;
                      }
                  }
                  return token;
              }
              function reScanSlashToken() {
                  if (token === 36 || token === 57) {
                      var p = tokenPos + 1;
                      var inEscape = false;
                      var inCharacterClass = false;
                      while (true) {
                          if (p >= end) {
                              tokenIsUnterminated = true;
                              error(ts.Diagnostics.Unterminated_regular_expression_literal);
                              break;
                          }
                          var ch = text.charCodeAt(p);
                          if (isLineBreak(ch)) {
                              tokenIsUnterminated = true;
                              error(ts.Diagnostics.Unterminated_regular_expression_literal);
                              break;
                          }
                          if (inEscape) {
                              inEscape = false;
                          }
                          else if (ch === 47 && !inCharacterClass) {
                              p++;
                              break;
                          }
                          else if (ch === 91) {
                              inCharacterClass = true;
                          }
                          else if (ch === 92) {
                              inEscape = true;
                          }
                          else if (ch === 93) {
                              inCharacterClass = false;
                          }
                          p++;
                      }
                      while (p < end && isIdentifierPart(text.charCodeAt(p))) {
                          p++;
                      }
                      pos = p;
                      tokenValue = text.substring(tokenPos, pos);
                      token = 9;
                  }
                  return token;
              }
              function reScanTemplateToken() {
                  ts.Debug.assert(token === 15, "'reScanTemplateToken' should only be called on a '}'");
                  pos = tokenPos;
                  return token = scanTemplateAndSetTokenValue();
              }
              function speculationHelper(callback, isLookahead) {
                  var savePos = pos;
                  var saveStartPos = startPos;
                  var saveTokenPos = tokenPos;
                  var saveToken = token;
                  var saveTokenValue = tokenValue;
                  var savePrecedingLineBreak = precedingLineBreak;
                  var result = callback();
                  if (!result || isLookahead) {
                      pos = savePos;
                      startPos = saveStartPos;
                      tokenPos = saveTokenPos;
                      token = saveToken;
                      tokenValue = saveTokenValue;
                      precedingLineBreak = savePrecedingLineBreak;
                  }
                  return result;
              }
              function lookAhead(callback) {
                  return speculationHelper(callback, true);
              }
              function tryScan(callback) {
                  return speculationHelper(callback, false);
              }
              function setText(newText, start, length) {
                  text = newText || "";
                  end = length === undefined ? text.length : start + length;
                  setTextPos(start || 0);
              }
              function setOnError(errorCallback) {
                  onError = errorCallback;
              }
              function setScriptTarget(scriptTarget) {
                  languageVersion = scriptTarget;
              }
              function setTextPos(textPos) {
                  ts.Debug.assert(textPos >= 0);
                  pos = textPos;
                  startPos = textPos;
                  tokenPos = textPos;
                  token = 0;
                  precedingLineBreak = false;
                  tokenValue = undefined;
                  hasExtendedUnicodeEscape = false;
                  tokenIsUnterminated = false;
              }
          }
          ts.createScanner = createScanner;
      })(ts || (ts = {}));
      /// <reference path="parser.ts"/>
      var ts;
      (function (ts) {
          ts.bindTime = 0;
          function getModuleInstanceState(node) {
              if (node.kind === 203 || node.kind === 204) {
                  return 0;
              }
              else if (ts.isConstEnumDeclaration(node)) {
                  return 2;
              }
              else if ((node.kind === 210 || node.kind === 209) && !(node.flags & 1)) {
                  return 0;
              }
              else if (node.kind === 207) {
                  var state = 0;
                  ts.forEachChild(node, function (n) {
                      switch (getModuleInstanceState(n)) {
                          case 0:
                              return false;
                          case 2:
                              state = 2;
                              return false;
                          case 1:
                              state = 1;
                              return true;
                      }
                  });
                  return state;
              }
              else if (node.kind === 206) {
                  return getModuleInstanceState(node.body);
              }
              else {
                  return 1;
              }
          }
          ts.getModuleInstanceState = getModuleInstanceState;
          function bindSourceFile(file) {
              var start = new Date().getTime();
              bindSourceFileWorker(file);
              ts.bindTime += new Date().getTime() - start;
          }
          ts.bindSourceFile = bindSourceFile;
          function bindSourceFileWorker(file) {
              var parent;
              var container;
              var blockScopeContainer;
              var lastContainer;
              var symbolCount = 0;
              var Symbol = ts.objectAllocator.getSymbolConstructor();
              if (!file.locals) {
                  file.locals = {};
                  container = file;
                  setBlockScopeContainer(file, false);
                  bind(file);
                  file.symbolCount = symbolCount;
              }
              function createSymbol(flags, name) {
                  symbolCount++;
                  return new Symbol(flags, name);
              }
              function setBlockScopeContainer(node, cleanLocals) {
                  blockScopeContainer = node;
                  if (cleanLocals) {
                      blockScopeContainer.locals = undefined;
                  }
              }
              function addDeclarationToSymbol(symbol, node, symbolKind) {
                  symbol.flags |= symbolKind;
                  if (!symbol.declarations)
                      symbol.declarations = [];
                  symbol.declarations.push(node);
                  if (symbolKind & 1952 && !symbol.exports)
                      symbol.exports = {};
                  if (symbolKind & 6240 && !symbol.members)
                      symbol.members = {};
                  node.symbol = symbol;
                  if (symbolKind & 107455 && !symbol.valueDeclaration)
                      symbol.valueDeclaration = node;
              }
              function getDeclarationName(node) {
                  if (node.name) {
                      if (node.kind === 206 && node.name.kind === 8) {
                          return '"' + node.name.text + '"';
                      }
                      if (node.name.kind === 128) {
                          var nameExpression = node.name.expression;
                          ts.Debug.assert(ts.isWellKnownSymbolSyntactically(nameExpression));
                          return ts.getPropertyNameForKnownSymbolName(nameExpression.name.text);
                      }
                      return node.name.text;
                  }
                  switch (node.kind) {
                      case 144:
                      case 136:
                          return "__constructor";
                      case 143:
                      case 139:
                          return "__call";
                      case 140:
                          return "__new";
                      case 141:
                          return "__index";
                      case 216:
                          return "__export";
                      case 215:
                          return node.isExportEquals ? "export=" : "default";
                      case 201:
                      case 202:
                          return node.flags & 256 ? "default" : undefined;
                  }
              }
              function getDisplayName(node) {
                  return node.name ? ts.declarationNameToString(node.name) : getDeclarationName(node);
              }
              function declareSymbol(symbols, parent, node, includes, excludes) {
                  ts.Debug.assert(!ts.hasDynamicName(node));
                  var name = node.flags & 256 && parent ? "default" : getDeclarationName(node);
                  var symbol;
                  if (name !== undefined) {
                      symbol = ts.hasProperty(symbols, name) ? symbols[name] : (symbols[name] = createSymbol(0, name));
                      if (symbol.flags & excludes) {
                          if (node.name) {
                              node.name.parent = node;
                          }
                          var message = symbol.flags & 2
                              ? ts.Diagnostics.Cannot_redeclare_block_scoped_variable_0
                              : ts.Diagnostics.Duplicate_identifier_0;
                          ts.forEach(symbol.declarations, function (declaration) {
                              file.bindDiagnostics.push(ts.createDiagnosticForNode(declaration.name || declaration, message, getDisplayName(declaration)));
                          });
                          file.bindDiagnostics.push(ts.createDiagnosticForNode(node.name || node, message, getDisplayName(node)));
                          symbol = createSymbol(0, name);
                      }
                  }
                  else {
                      symbol = createSymbol(0, "__missing");
                  }
                  addDeclarationToSymbol(symbol, node, includes);
                  symbol.parent = parent;
                  if ((node.kind === 202 || node.kind === 175) && symbol.exports) {
                      var prototypeSymbol = createSymbol(4 | 134217728, "prototype");
                      if (ts.hasProperty(symbol.exports, prototypeSymbol.name)) {
                          if (node.name) {
                              node.name.parent = node;
                          }
                          file.bindDiagnostics.push(ts.createDiagnosticForNode(symbol.exports[prototypeSymbol.name].declarations[0], ts.Diagnostics.Duplicate_identifier_0, prototypeSymbol.name));
                      }
                      symbol.exports[prototypeSymbol.name] = prototypeSymbol;
                      prototypeSymbol.parent = symbol;
                  }
                  return symbol;
              }
              function declareModuleMember(node, symbolKind, symbolExcludes) {
                  var hasExportModifier = ts.getCombinedNodeFlags(node) & 1;
                  if (symbolKind & 8388608) {
                      if (node.kind === 218 || (node.kind === 209 && hasExportModifier)) {
                          declareSymbol(container.symbol.exports, container.symbol, node, symbolKind, symbolExcludes);
                      }
                      else {
                          declareSymbol(container.locals, undefined, node, symbolKind, symbolExcludes);
                      }
                  }
                  else {
                      if (hasExportModifier || container.flags & 65536) {
                          var exportKind = (symbolKind & 107455 ? 1048576 : 0) |
                              (symbolKind & 793056 ? 2097152 : 0) |
                              (symbolKind & 1536 ? 4194304 : 0);
                          var local = declareSymbol(container.locals, undefined, node, exportKind, symbolExcludes);
                          local.exportSymbol = declareSymbol(container.symbol.exports, container.symbol, node, symbolKind, symbolExcludes);
                          node.localSymbol = local;
                      }
                      else {
                          declareSymbol(container.locals, undefined, node, symbolKind, symbolExcludes);
                      }
                  }
              }
              function bindChildren(node, symbolKind, isBlockScopeContainer) {
                  if (symbolKind & 255504) {
                      node.locals = {};
                  }
                  var saveParent = parent;
                  var saveContainer = container;
                  var savedBlockScopeContainer = blockScopeContainer;
                  parent = node;
                  if (symbolKind & 262128) {
                      container = node;
                      addToContainerChain(container);
                  }
                  if (isBlockScopeContainer) {
                      setBlockScopeContainer(node, (symbolKind & 255504) === 0 && node.kind !== 228);
                  }
                  ts.forEachChild(node, bind);
                  container = saveContainer;
                  parent = saveParent;
                  blockScopeContainer = savedBlockScopeContainer;
              }
              function addToContainerChain(node) {
                  if (lastContainer) {
                      lastContainer.nextContainer = node;
                  }
                  lastContainer = node;
              }
              function bindDeclaration(node, symbolKind, symbolExcludes, isBlockScopeContainer) {
                  switch (container.kind) {
                      case 206:
                          declareModuleMember(node, symbolKind, symbolExcludes);
                          break;
                      case 228:
                          if (ts.isExternalModule(container)) {
                              declareModuleMember(node, symbolKind, symbolExcludes);
                              break;
                          }
                      case 143:
                      case 144:
                      case 139:
                      case 140:
                      case 141:
                      case 135:
                      case 134:
                      case 136:
                      case 137:
                      case 138:
                      case 201:
                      case 163:
                      case 164:
                          declareSymbol(container.locals, undefined, node, symbolKind, symbolExcludes);
                          break;
                      case 175:
                      case 202:
                          if (node.flags & 128) {
                              declareSymbol(container.symbol.exports, container.symbol, node, symbolKind, symbolExcludes);
                              break;
                          }
                      case 146:
                      case 155:
                      case 203:
                          declareSymbol(container.symbol.members, container.symbol, node, symbolKind, symbolExcludes);
                          break;
                      case 205:
                          declareSymbol(container.symbol.exports, container.symbol, node, symbolKind, symbolExcludes);
                          break;
                  }
                  bindChildren(node, symbolKind, isBlockScopeContainer);
              }
              function isAmbientContext(node) {
                  while (node) {
                      if (node.flags & 2)
                          return true;
                      node = node.parent;
                  }
                  return false;
              }
              function hasExportDeclarations(node) {
                  var body = node.kind === 228 ? node : node.body;
                  if (body.kind === 228 || body.kind === 207) {
                      for (var _i = 0, _a = body.statements; _i < _a.length; _i++) {
                          var stat = _a[_i];
                          if (stat.kind === 216 || stat.kind === 215) {
                              return true;
                          }
                      }
                  }
                  return false;
              }
              function setExportContextFlag(node) {
                  if (isAmbientContext(node) && !hasExportDeclarations(node)) {
                      node.flags |= 65536;
                  }
                  else {
                      node.flags &= ~65536;
                  }
              }
              function bindModuleDeclaration(node) {
                  setExportContextFlag(node);
                  if (node.name.kind === 8) {
                      bindDeclaration(node, 512, 106639, true);
                  }
                  else {
                      var state = getModuleInstanceState(node);
                      if (state === 0) {
                          bindDeclaration(node, 1024, 0, true);
                      }
                      else {
                          bindDeclaration(node, 512, 106639, true);
                          var currentModuleIsConstEnumOnly = state === 2;
                          if (node.symbol.constEnumOnlyModule === undefined) {
                              node.symbol.constEnumOnlyModule = currentModuleIsConstEnumOnly;
                          }
                          else {
                              node.symbol.constEnumOnlyModule = node.symbol.constEnumOnlyModule && currentModuleIsConstEnumOnly;
                          }
                      }
                  }
              }
              function bindFunctionOrConstructorType(node) {
                  // For a given function symbol "<...>(...) => T" we want to generate a symbol identical
                  // to the one we would get for: { <...>(...): T }
                  //
                  // We do that by making an anonymous type literal symbol, and then setting the function 
                  // symbol as its sole member. To the rest of the system, this symbol will be  indistinguishable 
                  // from an actual type literal symbol you would have gotten had you used the long form.
                  var symbol = createSymbol(131072, getDeclarationName(node));
                  addDeclarationToSymbol(symbol, node, 131072);
                  bindChildren(node, 131072, false);
                  var typeLiteralSymbol = createSymbol(2048, "__type");
                  addDeclarationToSymbol(typeLiteralSymbol, node, 2048);
                  typeLiteralSymbol.members = {};
                  typeLiteralSymbol.members[node.kind === 143 ? "__call" : "__new"] = symbol;
              }
              function bindAnonymousDeclaration(node, symbolKind, name, isBlockScopeContainer) {
                  var symbol = createSymbol(symbolKind, name);
                  addDeclarationToSymbol(symbol, node, symbolKind);
                  bindChildren(node, symbolKind, isBlockScopeContainer);
              }
              function bindCatchVariableDeclaration(node) {
                  bindChildren(node, 0, true);
              }
              function bindBlockScopedDeclaration(node, symbolKind, symbolExcludes) {
                  switch (blockScopeContainer.kind) {
                      case 206:
                          declareModuleMember(node, symbolKind, symbolExcludes);
                          break;
                      case 228:
                          if (ts.isExternalModule(container)) {
                              declareModuleMember(node, symbolKind, symbolExcludes);
                              break;
                          }
                      default:
                          if (!blockScopeContainer.locals) {
                              blockScopeContainer.locals = {};
                              addToContainerChain(blockScopeContainer);
                          }
                          declareSymbol(blockScopeContainer.locals, undefined, node, symbolKind, symbolExcludes);
                  }
                  bindChildren(node, symbolKind, false);
              }
              function bindBlockScopedVariableDeclaration(node) {
                  bindBlockScopedDeclaration(node, 2, 107455);
              }
              function getDestructuringParameterName(node) {
                  return "__" + ts.indexOf(node.parent.parameters, node);
              }
              function bind(node) {
                  node.parent = parent;
                  switch (node.kind) {
                      case 129:
                          bindDeclaration(node, 262144, 530912, false);
                          break;
                      case 130:
                          bindParameter(node);
                          break;
                      case 199:
                      case 153:
                          if (ts.isBindingPattern(node.name)) {
                              bindChildren(node, 0, false);
                          }
                          else if (ts.isBlockOrCatchScoped(node)) {
                              bindBlockScopedVariableDeclaration(node);
                          }
                          else if (ts.isParameterDeclaration(node)) {
                              bindDeclaration(node, 1, 107455, false);
                          }
                          else {
                              bindDeclaration(node, 1, 107454, false);
                          }
                          break;
                      case 133:
                      case 132:
                          bindPropertyOrMethodOrAccessor(node, 4 | (node.questionToken ? 536870912 : 0), 107455, false);
                          break;
                      case 225:
                      case 226:
                          bindPropertyOrMethodOrAccessor(node, 4, 107455, false);
                          break;
                      case 227:
                          bindPropertyOrMethodOrAccessor(node, 8, 107455, false);
                          break;
                      case 139:
                      case 140:
                      case 141:
                          bindDeclaration(node, 131072, 0, false);
                          break;
                      case 135:
                      case 134:
                          bindPropertyOrMethodOrAccessor(node, 8192 | (node.questionToken ? 536870912 : 0), ts.isObjectLiteralMethod(node) ? 107455 : 99263, true);
                          break;
                      case 201:
                          bindDeclaration(node, 16, 106927, true);
                          break;
                      case 136:
                          bindDeclaration(node, 16384, 0, true);
                          break;
                      case 137:
                          bindPropertyOrMethodOrAccessor(node, 32768, 41919, true);
                          break;
                      case 138:
                          bindPropertyOrMethodOrAccessor(node, 65536, 74687, true);
                          break;
                      case 143:
                      case 144:
                          bindFunctionOrConstructorType(node);
                          break;
                      case 146:
                          bindAnonymousDeclaration(node, 2048, "__type", false);
                          break;
                      case 155:
                          bindAnonymousDeclaration(node, 4096, "__object", false);
                          break;
                      case 163:
                      case 164:
                          bindAnonymousDeclaration(node, 16, "__function", true);
                          break;
                      case 175:
                          bindAnonymousDeclaration(node, 32, "__class", false);
                          break;
                      case 224:
                          bindCatchVariableDeclaration(node);
                          break;
                      case 202:
                          bindBlockScopedDeclaration(node, 32, 899583);
                          break;
                      case 203:
                          bindDeclaration(node, 64, 792992, false);
                          break;
                      case 204:
                          bindDeclaration(node, 524288, 793056, false);
                          break;
                      case 205:
                          if (ts.isConst(node)) {
                              bindDeclaration(node, 128, 899967, false);
                          }
                          else {
                              bindDeclaration(node, 256, 899327, false);
                          }
                          break;
                      case 206:
                          bindModuleDeclaration(node);
                          break;
                      case 209:
                      case 212:
                      case 214:
                      case 218:
                          bindDeclaration(node, 8388608, 8388608, false);
                          break;
                      case 211:
                          if (node.name) {
                              bindDeclaration(node, 8388608, 8388608, false);
                          }
                          else {
                              bindChildren(node, 0, false);
                          }
                          break;
                      case 216:
                          if (!node.exportClause) {
                              declareSymbol(container.symbol.exports, container.symbol, node, 1073741824, 0);
                          }
                          bindChildren(node, 0, false);
                          break;
                      case 215:
                          if (node.expression.kind === 65) {
                              declareSymbol(container.symbol.exports, container.symbol, node, 8388608, 107455 | 8388608);
                          }
                          else {
                              declareSymbol(container.symbol.exports, container.symbol, node, 4, 107455 | 8388608);
                          }
                          bindChildren(node, 0, false);
                          break;
                      case 228:
                          setExportContextFlag(node);
                          if (ts.isExternalModule(node)) {
                              bindAnonymousDeclaration(node, 512, '"' + ts.removeFileExtension(node.fileName) + '"', true);
                              break;
                          }
                      case 180:
                          bindChildren(node, 0, !ts.isFunctionLike(node.parent));
                          break;
                      case 224:
                      case 187:
                      case 188:
                      case 189:
                      case 208:
                          bindChildren(node, 0, true);
                          break;
                      default:
                          var saveParent = parent;
                          parent = node;
                          ts.forEachChild(node, bind);
                          parent = saveParent;
                  }
              }
              function bindParameter(node) {
                  if (ts.isBindingPattern(node.name)) {
                      bindAnonymousDeclaration(node, 1, getDestructuringParameterName(node), false);
                  }
                  else {
                      bindDeclaration(node, 1, 107455, false);
                  }
                  if (node.flags & 112 &&
                      node.parent.kind === 136 &&
                      (node.parent.parent.kind === 202 || node.parent.parent.kind === 175)) {
                      var classDeclaration = node.parent.parent;
                      declareSymbol(classDeclaration.symbol.members, classDeclaration.symbol, node, 4, 107455);
                  }
              }
              function bindPropertyOrMethodOrAccessor(node, symbolKind, symbolExcludes, isBlockScopeContainer) {
                  if (ts.hasDynamicName(node)) {
                      bindAnonymousDeclaration(node, symbolKind, "__computed", isBlockScopeContainer);
                  }
                  else {
                      bindDeclaration(node, symbolKind, symbolExcludes, isBlockScopeContainer);
                  }
              }
          }
      })(ts || (ts = {}));
      /// <reference path="binder.ts" />
      var ts;
      (function (ts) {
          function getDeclarationOfKind(symbol, kind) {
              var declarations = symbol.declarations;
              for (var _i = 0; _i < declarations.length; _i++) {
                  var declaration = declarations[_i];
                  if (declaration.kind === kind) {
                      return declaration;
                  }
              }
              return undefined;
          }
          ts.getDeclarationOfKind = getDeclarationOfKind;
          var stringWriters = [];
          function getSingleLineStringWriter() {
              if (stringWriters.length == 0) {
                  var str = "";
                  var writeText = function (text) { return str += text; };
                  return {
                      string: function () { return str; },
                      writeKeyword: writeText,
                      writeOperator: writeText,
                      writePunctuation: writeText,
                      writeSpace: writeText,
                      writeStringLiteral: writeText,
                      writeParameter: writeText,
                      writeSymbol: writeText,
                      writeLine: function () { return str += " "; },
                      increaseIndent: function () { },
                      decreaseIndent: function () { },
                      clear: function () { return str = ""; },
                      trackSymbol: function () { }
                  };
              }
              return stringWriters.pop();
          }
          ts.getSingleLineStringWriter = getSingleLineStringWriter;
          function releaseStringWriter(writer) {
              writer.clear();
              stringWriters.push(writer);
          }
          ts.releaseStringWriter = releaseStringWriter;
          function getFullWidth(node) {
              return node.end - node.pos;
          }
          ts.getFullWidth = getFullWidth;
          function containsParseError(node) {
              aggregateChildData(node);
              return (node.parserContextFlags & 64) !== 0;
          }
          ts.containsParseError = containsParseError;
          function aggregateChildData(node) {
              if (!(node.parserContextFlags & 128)) {
                  var thisNodeOrAnySubNodesHasError = ((node.parserContextFlags & 32) !== 0) ||
                      ts.forEachChild(node, containsParseError);
                  if (thisNodeOrAnySubNodesHasError) {
                      node.parserContextFlags |= 64;
                  }
                  node.parserContextFlags |= 128;
              }
          }
          function getSourceFileOfNode(node) {
              while (node && node.kind !== 228) {
                  node = node.parent;
              }
              return node;
          }
          ts.getSourceFileOfNode = getSourceFileOfNode;
          function getStartPositionOfLine(line, sourceFile) {
              ts.Debug.assert(line >= 0);
              return ts.getLineStarts(sourceFile)[line];
          }
          ts.getStartPositionOfLine = getStartPositionOfLine;
          function nodePosToString(node) {
              var file = getSourceFileOfNode(node);
              var loc = ts.getLineAndCharacterOfPosition(file, node.pos);
              return file.fileName + "(" + (loc.line + 1) + "," + (loc.character + 1) + ")";
          }
          ts.nodePosToString = nodePosToString;
          function getStartPosOfNode(node) {
              return node.pos;
          }
          ts.getStartPosOfNode = getStartPosOfNode;
          function nodeIsMissing(node) {
              if (!node) {
                  return true;
              }
              return node.pos === node.end && node.kind !== 1;
          }
          ts.nodeIsMissing = nodeIsMissing;
          function nodeIsPresent(node) {
              return !nodeIsMissing(node);
          }
          ts.nodeIsPresent = nodeIsPresent;
          function getTokenPosOfNode(node, sourceFile) {
              if (nodeIsMissing(node)) {
                  return node.pos;
              }
              return ts.skipTrivia((sourceFile || getSourceFileOfNode(node)).text, node.pos);
          }
          ts.getTokenPosOfNode = getTokenPosOfNode;
          function getNonDecoratorTokenPosOfNode(node, sourceFile) {
              if (nodeIsMissing(node) || !node.decorators) {
                  return getTokenPosOfNode(node, sourceFile);
              }
              return ts.skipTrivia((sourceFile || getSourceFileOfNode(node)).text, node.decorators.end);
          }
          ts.getNonDecoratorTokenPosOfNode = getNonDecoratorTokenPosOfNode;
          function getSourceTextOfNodeFromSourceFile(sourceFile, node) {
              if (nodeIsMissing(node)) {
                  return "";
              }
              var text = sourceFile.text;
              return text.substring(ts.skipTrivia(text, node.pos), node.end);
          }
          ts.getSourceTextOfNodeFromSourceFile = getSourceTextOfNodeFromSourceFile;
          function getTextOfNodeFromSourceText(sourceText, node) {
              if (nodeIsMissing(node)) {
                  return "";
              }
              return sourceText.substring(ts.skipTrivia(sourceText, node.pos), node.end);
          }
          ts.getTextOfNodeFromSourceText = getTextOfNodeFromSourceText;
          function getTextOfNode(node) {
              return getSourceTextOfNodeFromSourceFile(getSourceFileOfNode(node), node);
          }
          ts.getTextOfNode = getTextOfNode;
          function escapeIdentifier(identifier) {
              return identifier.length >= 2 && identifier.charCodeAt(0) === 95 && identifier.charCodeAt(1) === 95 ? "_" + identifier : identifier;
          }
          ts.escapeIdentifier = escapeIdentifier;
          function unescapeIdentifier(identifier) {
              return identifier.length >= 3 && identifier.charCodeAt(0) === 95 && identifier.charCodeAt(1) === 95 && identifier.charCodeAt(2) === 95 ? identifier.substr(1) : identifier;
          }
          ts.unescapeIdentifier = unescapeIdentifier;
          function makeIdentifierFromModuleName(moduleName) {
              return ts.getBaseFileName(moduleName).replace(/\W/g, "_");
          }
          ts.makeIdentifierFromModuleName = makeIdentifierFromModuleName;
          function isBlockOrCatchScoped(declaration) {
              return (getCombinedNodeFlags(declaration) & 12288) !== 0 ||
                  isCatchClauseVariableDeclaration(declaration);
          }
          ts.isBlockOrCatchScoped = isBlockOrCatchScoped;
          function getEnclosingBlockScopeContainer(node) {
              var current = node.parent;
              while (current) {
                  if (isFunctionLike(current)) {
                      return current;
                  }
                  switch (current.kind) {
                      case 228:
                      case 208:
                      case 224:
                      case 206:
                      case 187:
                      case 188:
                      case 189:
                          return current;
                      case 180:
                          if (!isFunctionLike(current.parent)) {
                              return current;
                          }
                  }
                  current = current.parent;
              }
          }
          ts.getEnclosingBlockScopeContainer = getEnclosingBlockScopeContainer;
          function isCatchClauseVariableDeclaration(declaration) {
              return declaration &&
                  declaration.kind === 199 &&
                  declaration.parent &&
                  declaration.parent.kind === 224;
          }
          ts.isCatchClauseVariableDeclaration = isCatchClauseVariableDeclaration;
          function declarationNameToString(name) {
              return getFullWidth(name) === 0 ? "(Missing)" : getTextOfNode(name);
          }
          ts.declarationNameToString = declarationNameToString;
          function createDiagnosticForNode(node, message, arg0, arg1, arg2) {
              var sourceFile = getSourceFileOfNode(node);
              var span = getErrorSpanForNode(sourceFile, node);
              return ts.createFileDiagnostic(sourceFile, span.start, span.length, message, arg0, arg1, arg2);
          }
          ts.createDiagnosticForNode = createDiagnosticForNode;
          function createDiagnosticForNodeFromMessageChain(node, messageChain) {
              var sourceFile = getSourceFileOfNode(node);
              var span = getErrorSpanForNode(sourceFile, node);
              return {
                  file: sourceFile,
                  start: span.start,
                  length: span.length,
                  code: messageChain.code,
                  category: messageChain.category,
                  messageText: messageChain.next ? messageChain : messageChain.messageText
              };
          }
          ts.createDiagnosticForNodeFromMessageChain = createDiagnosticForNodeFromMessageChain;
          function getSpanOfTokenAtPosition(sourceFile, pos) {
              var scanner = ts.createScanner(sourceFile.languageVersion, true, sourceFile.text, undefined, pos);
              scanner.scan();
              var start = scanner.getTokenPos();
              return ts.createTextSpanFromBounds(start, scanner.getTextPos());
          }
          ts.getSpanOfTokenAtPosition = getSpanOfTokenAtPosition;
          function getErrorSpanForNode(sourceFile, node) {
              var errorNode = node;
              switch (node.kind) {
                  case 228:
                      var pos_1 = ts.skipTrivia(sourceFile.text, 0, false);
                      if (pos_1 === sourceFile.text.length) {
                          return ts.createTextSpan(0, 0);
                      }
                      return getSpanOfTokenAtPosition(sourceFile, pos_1);
                  case 199:
                  case 153:
                  case 202:
                  case 175:
                  case 203:
                  case 206:
                  case 205:
                  case 227:
                  case 201:
                  case 163:
                      errorNode = node.name;
                      break;
              }
              if (errorNode === undefined) {
                  return getSpanOfTokenAtPosition(sourceFile, node.pos);
              }
              var pos = nodeIsMissing(errorNode)
                  ? errorNode.pos
                  : ts.skipTrivia(sourceFile.text, errorNode.pos);
              return ts.createTextSpanFromBounds(pos, errorNode.end);
          }
          ts.getErrorSpanForNode = getErrorSpanForNode;
          function isExternalModule(file) {
              return file.externalModuleIndicator !== undefined;
          }
          ts.isExternalModule = isExternalModule;
          function isDeclarationFile(file) {
              return (file.flags & 2048) !== 0;
          }
          ts.isDeclarationFile = isDeclarationFile;
          function isConstEnumDeclaration(node) {
              return node.kind === 205 && isConst(node);
          }
          ts.isConstEnumDeclaration = isConstEnumDeclaration;
          function walkUpBindingElementsAndPatterns(node) {
              while (node && (node.kind === 153 || isBindingPattern(node))) {
                  node = node.parent;
              }
              return node;
          }
          function getCombinedNodeFlags(node) {
              node = walkUpBindingElementsAndPatterns(node);
              var flags = node.flags;
              if (node.kind === 199) {
                  node = node.parent;
              }
              if (node && node.kind === 200) {
                  flags |= node.flags;
                  node = node.parent;
              }
              if (node && node.kind === 181) {
                  flags |= node.flags;
              }
              return flags;
          }
          ts.getCombinedNodeFlags = getCombinedNodeFlags;
          function isConst(node) {
              return !!(getCombinedNodeFlags(node) & 8192);
          }
          ts.isConst = isConst;
          function isLet(node) {
              return !!(getCombinedNodeFlags(node) & 4096);
          }
          ts.isLet = isLet;
          function isPrologueDirective(node) {
              return node.kind === 183 && node.expression.kind === 8;
          }
          ts.isPrologueDirective = isPrologueDirective;
          function getLeadingCommentRangesOfNode(node, sourceFileOfNode) {
              if (node.kind === 130 || node.kind === 129) {
                  return ts.concatenate(ts.getTrailingCommentRanges(sourceFileOfNode.text, node.pos), ts.getLeadingCommentRanges(sourceFileOfNode.text, node.pos));
              }
              else {
                  return ts.getLeadingCommentRanges(sourceFileOfNode.text, node.pos);
              }
          }
          ts.getLeadingCommentRangesOfNode = getLeadingCommentRangesOfNode;
          function getJsDocComments(node, sourceFileOfNode) {
              return ts.filter(getLeadingCommentRangesOfNode(node, sourceFileOfNode), isJsDocComment);
              function isJsDocComment(comment) {
                  return sourceFileOfNode.text.charCodeAt(comment.pos + 1) === 42 &&
                      sourceFileOfNode.text.charCodeAt(comment.pos + 2) === 42 &&
                      sourceFileOfNode.text.charCodeAt(comment.pos + 3) !== 47;
              }
          }
          ts.getJsDocComments = getJsDocComments;
          ts.fullTripleSlashReferencePathRegEx = /^(\/\/\/\s*<reference\s+path\s*=\s*)('|")(.+?)\2.*?\/>/;
          function forEachReturnStatement(body, visitor) {
              return traverse(body);
              function traverse(node) {
                  switch (node.kind) {
                      case 192:
                          return visitor(node);
                      case 208:
                      case 180:
                      case 184:
                      case 185:
                      case 186:
                      case 187:
                      case 188:
                      case 189:
                      case 193:
                      case 194:
                      case 221:
                      case 222:
                      case 195:
                      case 197:
                      case 224:
                          return ts.forEachChild(node, traverse);
                  }
              }
          }
          ts.forEachReturnStatement = forEachReturnStatement;
          function isVariableLike(node) {
              if (node) {
                  switch (node.kind) {
                      case 153:
                      case 227:
                      case 130:
                      case 225:
                      case 133:
                      case 132:
                      case 226:
                      case 199:
                          return true;
                  }
              }
              return false;
          }
          ts.isVariableLike = isVariableLike;
          function isAccessor(node) {
              if (node) {
                  switch (node.kind) {
                      case 137:
                      case 138:
                          return true;
                  }
              }
              return false;
          }
          ts.isAccessor = isAccessor;
          function isFunctionLike(node) {
              if (node) {
                  switch (node.kind) {
                      case 136:
                      case 163:
                      case 201:
                      case 164:
                      case 135:
                      case 134:
                      case 137:
                      case 138:
                      case 139:
                      case 140:
                      case 141:
                      case 143:
                      case 144:
                          return true;
                  }
              }
              return false;
          }
          ts.isFunctionLike = isFunctionLike;
          function isFunctionBlock(node) {
              return node && node.kind === 180 && isFunctionLike(node.parent);
          }
          ts.isFunctionBlock = isFunctionBlock;
          function isObjectLiteralMethod(node) {
              return node && node.kind === 135 && node.parent.kind === 155;
          }
          ts.isObjectLiteralMethod = isObjectLiteralMethod;
          function getContainingFunction(node) {
              while (true) {
                  node = node.parent;
                  if (!node || isFunctionLike(node)) {
                      return node;
                  }
              }
          }
          ts.getContainingFunction = getContainingFunction;
          function getThisContainer(node, includeArrowFunctions) {
              while (true) {
                  node = node.parent;
                  if (!node) {
                      return undefined;
                  }
                  switch (node.kind) {
                      case 128:
                          if (node.parent.parent.kind === 202) {
                              return node;
                          }
                          node = node.parent;
                          break;
                      case 131:
                          if (node.parent.kind === 130 && isClassElement(node.parent.parent)) {
                              node = node.parent.parent;
                          }
                          else if (isClassElement(node.parent)) {
                              node = node.parent;
                          }
                          break;
                      case 164:
                          if (!includeArrowFunctions) {
                              continue;
                          }
                      case 201:
                      case 163:
                      case 206:
                      case 133:
                      case 132:
                      case 135:
                      case 134:
                      case 136:
                      case 137:
                      case 138:
                      case 205:
                      case 228:
                          return node;
                  }
              }
          }
          ts.getThisContainer = getThisContainer;
          function getSuperContainer(node, includeFunctions) {
              while (true) {
                  node = node.parent;
                  if (!node)
                      return node;
                  switch (node.kind) {
                      case 128:
                          if (node.parent.parent.kind === 202) {
                              return node;
                          }
                          node = node.parent;
                          break;
                      case 131:
                          if (node.parent.kind === 130 && isClassElement(node.parent.parent)) {
                              node = node.parent.parent;
                          }
                          else if (isClassElement(node.parent)) {
                              node = node.parent;
                          }
                          break;
                      case 201:
                      case 163:
                      case 164:
                          if (!includeFunctions) {
                              continue;
                          }
                      case 133:
                      case 132:
                      case 135:
                      case 134:
                      case 136:
                      case 137:
                      case 138:
                          return node;
                  }
              }
          }
          ts.getSuperContainer = getSuperContainer;
          function getInvokedExpression(node) {
              if (node.kind === 160) {
                  return node.tag;
              }
              return node.expression;
          }
          ts.getInvokedExpression = getInvokedExpression;
          function nodeCanBeDecorated(node) {
              switch (node.kind) {
                  case 202:
                      return true;
                  case 133:
                      return node.parent.kind === 202;
                  case 130:
                      return node.parent.body && node.parent.parent.kind === 202;
                  case 137:
                  case 138:
                  case 135:
                      return node.body && node.parent.kind === 202;
              }
              return false;
          }
          ts.nodeCanBeDecorated = nodeCanBeDecorated;
          function nodeIsDecorated(node) {
              switch (node.kind) {
                  case 202:
                      if (node.decorators) {
                          return true;
                      }
                      return false;
                  case 133:
                  case 130:
                      if (node.decorators) {
                          return true;
                      }
                      return false;
                  case 137:
                      if (node.body && node.decorators) {
                          return true;
                      }
                      return false;
                  case 135:
                  case 138:
                      if (node.body && node.decorators) {
                          return true;
                      }
                      return false;
              }
              return false;
          }
          ts.nodeIsDecorated = nodeIsDecorated;
          function childIsDecorated(node) {
              switch (node.kind) {
                  case 202:
                      return ts.forEach(node.members, nodeOrChildIsDecorated);
                  case 135:
                  case 138:
                      return ts.forEach(node.parameters, nodeIsDecorated);
              }
              return false;
          }
          ts.childIsDecorated = childIsDecorated;
          function nodeOrChildIsDecorated(node) {
              return nodeIsDecorated(node) || childIsDecorated(node);
          }
          ts.nodeOrChildIsDecorated = nodeOrChildIsDecorated;
          function isExpression(node) {
              switch (node.kind) {
                  case 93:
                  case 91:
                  case 89:
                  case 95:
                  case 80:
                  case 9:
                  case 154:
                  case 155:
                  case 156:
                  case 157:
                  case 158:
                  case 159:
                  case 160:
                  case 161:
                  case 162:
                  case 163:
                  case 175:
                  case 164:
                  case 167:
                  case 165:
                  case 166:
                  case 168:
                  case 169:
                  case 170:
                  case 171:
                  case 174:
                  case 172:
                  case 10:
                  case 176:
                      return true;
                  case 127:
                      while (node.parent.kind === 127) {
                          node = node.parent;
                      }
                      return node.parent.kind === 145;
                  case 65:
                      if (node.parent.kind === 145) {
                          return true;
                      }
                  case 7:
                  case 8:
                      var parent_1 = node.parent;
                      switch (parent_1.kind) {
                          case 199:
                          case 130:
                          case 133:
                          case 132:
                          case 227:
                          case 225:
                          case 153:
                              return parent_1.initializer === node;
                          case 183:
                          case 184:
                          case 185:
                          case 186:
                          case 192:
                          case 193:
                          case 194:
                          case 221:
                          case 196:
                          case 194:
                              return parent_1.expression === node;
                          case 187:
                              var forStatement = parent_1;
                              return (forStatement.initializer === node && forStatement.initializer.kind !== 200) ||
                                  forStatement.condition === node ||
                                  forStatement.incrementor === node;
                          case 188:
                          case 189:
                              var forInStatement = parent_1;
                              return (forInStatement.initializer === node && forInStatement.initializer.kind !== 200) ||
                                  forInStatement.expression === node;
                          case 161:
                              return node === parent_1.expression;
                          case 178:
                              return node === parent_1.expression;
                          case 128:
                              return node === parent_1.expression;
                          case 131:
                              return true;
                          default:
                              if (isExpression(parent_1)) {
                                  return true;
                              }
                      }
              }
              return false;
          }
          ts.isExpression = isExpression;
          function isInstantiatedModule(node, preserveConstEnums) {
              var moduleState = ts.getModuleInstanceState(node);
              return moduleState === 1 ||
                  (preserveConstEnums && moduleState === 2);
          }
          ts.isInstantiatedModule = isInstantiatedModule;
          function isExternalModuleImportEqualsDeclaration(node) {
              return node.kind === 209 && node.moduleReference.kind === 220;
          }
          ts.isExternalModuleImportEqualsDeclaration = isExternalModuleImportEqualsDeclaration;
          function getExternalModuleImportEqualsDeclarationExpression(node) {
              ts.Debug.assert(isExternalModuleImportEqualsDeclaration(node));
              return node.moduleReference.expression;
          }
          ts.getExternalModuleImportEqualsDeclarationExpression = getExternalModuleImportEqualsDeclarationExpression;
          function isInternalModuleImportEqualsDeclaration(node) {
              return node.kind === 209 && node.moduleReference.kind !== 220;
          }
          ts.isInternalModuleImportEqualsDeclaration = isInternalModuleImportEqualsDeclaration;
          function getExternalModuleName(node) {
              if (node.kind === 210) {
                  return node.moduleSpecifier;
              }
              if (node.kind === 209) {
                  var reference = node.moduleReference;
                  if (reference.kind === 220) {
                      return reference.expression;
                  }
              }
              if (node.kind === 216) {
                  return node.moduleSpecifier;
              }
          }
          ts.getExternalModuleName = getExternalModuleName;
          function hasDotDotDotToken(node) {
              return node && node.kind === 130 && node.dotDotDotToken !== undefined;
          }
          ts.hasDotDotDotToken = hasDotDotDotToken;
          function hasQuestionToken(node) {
              if (node) {
                  switch (node.kind) {
                      case 130:
                          return node.questionToken !== undefined;
                      case 135:
                      case 134:
                          return node.questionToken !== undefined;
                      case 226:
                      case 225:
                      case 133:
                      case 132:
                          return node.questionToken !== undefined;
                  }
              }
              return false;
          }
          ts.hasQuestionToken = hasQuestionToken;
          function hasRestParameters(s) {
              return s.parameters.length > 0 && ts.lastOrUndefined(s.parameters).dotDotDotToken !== undefined;
          }
          ts.hasRestParameters = hasRestParameters;
          function isLiteralKind(kind) {
              return 7 <= kind && kind <= 10;
          }
          ts.isLiteralKind = isLiteralKind;
          function isTextualLiteralKind(kind) {
              return kind === 8 || kind === 10;
          }
          ts.isTextualLiteralKind = isTextualLiteralKind;
          function isTemplateLiteralKind(kind) {
              return 10 <= kind && kind <= 13;
          }
          ts.isTemplateLiteralKind = isTemplateLiteralKind;
          function isBindingPattern(node) {
              return !!node && (node.kind === 152 || node.kind === 151);
          }
          ts.isBindingPattern = isBindingPattern;
          function isInAmbientContext(node) {
              while (node) {
                  if (node.flags & (2 | 2048)) {
                      return true;
                  }
                  node = node.parent;
              }
              return false;
          }
          ts.isInAmbientContext = isInAmbientContext;
          function isDeclaration(node) {
              switch (node.kind) {
                  case 164:
                  case 153:
                  case 202:
                  case 136:
                  case 205:
                  case 227:
                  case 218:
                  case 201:
                  case 163:
                  case 137:
                  case 211:
                  case 209:
                  case 214:
                  case 203:
                  case 135:
                  case 134:
                  case 206:
                  case 212:
                  case 130:
                  case 225:
                  case 133:
                  case 132:
                  case 138:
                  case 226:
                  case 204:
                  case 129:
                  case 199:
                      return true;
              }
              return false;
          }
          ts.isDeclaration = isDeclaration;
          function isStatement(n) {
              switch (n.kind) {
                  case 191:
                  case 190:
                  case 198:
                  case 185:
                  case 183:
                  case 182:
                  case 188:
                  case 189:
                  case 187:
                  case 184:
                  case 195:
                  case 192:
                  case 194:
                  case 94:
                  case 197:
                  case 181:
                  case 186:
                  case 193:
                  case 215:
                      return true;
                  default:
                      return false;
              }
          }
          ts.isStatement = isStatement;
          function isClassElement(n) {
              switch (n.kind) {
                  case 136:
                  case 133:
                  case 135:
                  case 137:
                  case 138:
                  case 134:
                  case 141:
                      return true;
                  default:
                      return false;
              }
          }
          ts.isClassElement = isClassElement;
          function isDeclarationName(name) {
              if (name.kind !== 65 && name.kind !== 8 && name.kind !== 7) {
                  return false;
              }
              var parent = name.parent;
              if (parent.kind === 214 || parent.kind === 218) {
                  if (parent.propertyName) {
                      return true;
                  }
              }
              if (isDeclaration(parent)) {
                  return parent.name === name;
              }
              return false;
          }
          ts.isDeclarationName = isDeclarationName;
          function isAliasSymbolDeclaration(node) {
              return node.kind === 209 ||
                  node.kind === 211 && !!node.name ||
                  node.kind === 212 ||
                  node.kind === 214 ||
                  node.kind === 218 ||
                  node.kind === 215 && node.expression.kind === 65;
          }
          ts.isAliasSymbolDeclaration = isAliasSymbolDeclaration;
          function getClassExtendsHeritageClauseElement(node) {
              var heritageClause = getHeritageClause(node.heritageClauses, 79);
              return heritageClause && heritageClause.types.length > 0 ? heritageClause.types[0] : undefined;
          }
          ts.getClassExtendsHeritageClauseElement = getClassExtendsHeritageClauseElement;
          function getClassImplementsHeritageClauseElements(node) {
              var heritageClause = getHeritageClause(node.heritageClauses, 102);
              return heritageClause ? heritageClause.types : undefined;
          }
          ts.getClassImplementsHeritageClauseElements = getClassImplementsHeritageClauseElements;
          function getInterfaceBaseTypeNodes(node) {
              var heritageClause = getHeritageClause(node.heritageClauses, 79);
              return heritageClause ? heritageClause.types : undefined;
          }
          ts.getInterfaceBaseTypeNodes = getInterfaceBaseTypeNodes;
          function getHeritageClause(clauses, kind) {
              if (clauses) {
                  for (var _i = 0; _i < clauses.length; _i++) {
                      var clause = clauses[_i];
                      if (clause.token === kind) {
                          return clause;
                      }
                  }
              }
              return undefined;
          }
          ts.getHeritageClause = getHeritageClause;
          function tryResolveScriptReference(host, sourceFile, reference) {
              if (!host.getCompilerOptions().noResolve) {
                  var referenceFileName = ts.isRootedDiskPath(reference.fileName) ? reference.fileName : ts.combinePaths(ts.getDirectoryPath(sourceFile.fileName), reference.fileName);
                  referenceFileName = ts.getNormalizedAbsolutePath(referenceFileName, host.getCurrentDirectory());
                  return host.getSourceFile(referenceFileName);
              }
          }
          ts.tryResolveScriptReference = tryResolveScriptReference;
          function getAncestor(node, kind) {
              while (node) {
                  if (node.kind === kind) {
                      return node;
                  }
                  node = node.parent;
              }
              return undefined;
          }
          ts.getAncestor = getAncestor;
          function getFileReferenceFromReferencePath(comment, commentRange) {
              var simpleReferenceRegEx = /^\/\/\/\s*<reference\s+/gim;
              var isNoDefaultLibRegEx = /^(\/\/\/\s*<reference\s+no-default-lib\s*=\s*)('|")(.+?)\2\s*\/>/gim;
              if (simpleReferenceRegEx.exec(comment)) {
                  if (isNoDefaultLibRegEx.exec(comment)) {
                      return {
                          isNoDefaultLib: true
                      };
                  }
                  else {
                      var matchResult = ts.fullTripleSlashReferencePathRegEx.exec(comment);
                      if (matchResult) {
                          var start = commentRange.pos;
                          var end = commentRange.end;
                          return {
                              fileReference: {
                                  pos: start,
                                  end: end,
                                  fileName: matchResult[3]
                              },
                              isNoDefaultLib: false
                          };
                      }
                      else {
                          return {
                              diagnosticMessage: ts.Diagnostics.Invalid_reference_directive_syntax,
                              isNoDefaultLib: false
                          };
                      }
                  }
              }
              return undefined;
          }
          ts.getFileReferenceFromReferencePath = getFileReferenceFromReferencePath;
          function isKeyword(token) {
              return 66 <= token && token <= 126;
          }
          ts.isKeyword = isKeyword;
          function isTrivia(token) {
              return 2 <= token && token <= 6;
          }
          ts.isTrivia = isTrivia;
          function hasDynamicName(declaration) {
              return declaration.name &&
                  declaration.name.kind === 128 &&
                  !isWellKnownSymbolSyntactically(declaration.name.expression);
          }
          ts.hasDynamicName = hasDynamicName;
          function isWellKnownSymbolSyntactically(node) {
              return node.kind === 156 && isESSymbolIdentifier(node.expression);
          }
          ts.isWellKnownSymbolSyntactically = isWellKnownSymbolSyntactically;
          function getPropertyNameForPropertyNameNode(name) {
              if (name.kind === 65 || name.kind === 8 || name.kind === 7) {
                  return name.text;
              }
              if (name.kind === 128) {
                  var nameExpression = name.expression;
                  if (isWellKnownSymbolSyntactically(nameExpression)) {
                      var rightHandSideName = nameExpression.name.text;
                      return getPropertyNameForKnownSymbolName(rightHandSideName);
                  }
              }
              return undefined;
          }
          ts.getPropertyNameForPropertyNameNode = getPropertyNameForPropertyNameNode;
          function getPropertyNameForKnownSymbolName(symbolName) {
              return "__@" + symbolName;
          }
          ts.getPropertyNameForKnownSymbolName = getPropertyNameForKnownSymbolName;
          function isESSymbolIdentifier(node) {
              return node.kind === 65 && node.text === "Symbol";
          }
          ts.isESSymbolIdentifier = isESSymbolIdentifier;
          function isModifier(token) {
              switch (token) {
                  case 108:
                  case 106:
                  case 107:
                  case 109:
                  case 78:
                  case 115:
                  case 70:
                  case 73:
                      return true;
              }
              return false;
          }
          ts.isModifier = isModifier;
          function isParameterDeclaration(node) {
              var root = getRootDeclaration(node);
              return root.kind === 130;
          }
          ts.isParameterDeclaration = isParameterDeclaration;
          function getRootDeclaration(node) {
              while (node.kind === 153) {
                  node = node.parent.parent;
              }
              return node;
          }
          ts.getRootDeclaration = getRootDeclaration;
          function nodeStartsNewLexicalEnvironment(n) {
              return isFunctionLike(n) || n.kind === 206 || n.kind === 228;
          }
          ts.nodeStartsNewLexicalEnvironment = nodeStartsNewLexicalEnvironment;
          function nodeIsSynthesized(node) {
              return node.pos === -1;
          }
          ts.nodeIsSynthesized = nodeIsSynthesized;
          function createSynthesizedNode(kind, startsOnNewLine) {
              var node = ts.createNode(kind);
              node.pos = -1;
              node.end = -1;
              node.startsOnNewLine = startsOnNewLine;
              return node;
          }
          ts.createSynthesizedNode = createSynthesizedNode;
          function createSynthesizedNodeArray() {
              var array = [];
              array.pos = -1;
              array.end = -1;
              return array;
          }
          ts.createSynthesizedNodeArray = createSynthesizedNodeArray;
          function createDiagnosticCollection() {
              var nonFileDiagnostics = [];
              var fileDiagnostics = {};
              var diagnosticsModified = false;
              var modificationCount = 0;
              return {
                  add: add,
                  getGlobalDiagnostics: getGlobalDiagnostics,
                  getDiagnostics: getDiagnostics,
                  getModificationCount: getModificationCount
              };
              function getModificationCount() {
                  return modificationCount;
              }
              function add(diagnostic) {
                  var diagnostics;
                  if (diagnostic.file) {
                      diagnostics = fileDiagnostics[diagnostic.file.fileName];
                      if (!diagnostics) {
                          diagnostics = [];
                          fileDiagnostics[diagnostic.file.fileName] = diagnostics;
                      }
                  }
                  else {
                      diagnostics = nonFileDiagnostics;
                  }
                  diagnostics.push(diagnostic);
                  diagnosticsModified = true;
                  modificationCount++;
              }
              function getGlobalDiagnostics() {
                  sortAndDeduplicate();
                  return nonFileDiagnostics;
              }
              function getDiagnostics(fileName) {
                  sortAndDeduplicate();
                  if (fileName) {
                      return fileDiagnostics[fileName] || [];
                  }
                  var allDiagnostics = [];
                  function pushDiagnostic(d) {
                      allDiagnostics.push(d);
                  }
                  ts.forEach(nonFileDiagnostics, pushDiagnostic);
                  for (var key in fileDiagnostics) {
                      if (ts.hasProperty(fileDiagnostics, key)) {
                          ts.forEach(fileDiagnostics[key], pushDiagnostic);
                      }
                  }
                  return ts.sortAndDeduplicateDiagnostics(allDiagnostics);
              }
              function sortAndDeduplicate() {
                  if (!diagnosticsModified) {
                      return;
                  }
                  diagnosticsModified = false;
                  nonFileDiagnostics = ts.sortAndDeduplicateDiagnostics(nonFileDiagnostics);
                  for (var key in fileDiagnostics) {
                      if (ts.hasProperty(fileDiagnostics, key)) {
                          fileDiagnostics[key] = ts.sortAndDeduplicateDiagnostics(fileDiagnostics[key]);
                      }
                  }
              }
          }
          ts.createDiagnosticCollection = createDiagnosticCollection;
          var escapedCharsRegExp = /[\\\"\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g;
          var escapedCharsMap = {
              "\0": "\\0",
              "\t": "\\t",
              "\v": "\\v",
              "\f": "\\f",
              "\b": "\\b",
              "\r": "\\r",
              "\n": "\\n",
              "\\": "\\\\",
              "\"": "\\\"",
              "\u2028": "\\u2028",
              "\u2029": "\\u2029",
              "\u0085": "\\u0085"
          };
          function escapeString(s) {
              s = escapedCharsRegExp.test(s) ? s.replace(escapedCharsRegExp, getReplacement) : s;
              return s;
              function getReplacement(c) {
                  return escapedCharsMap[c] || get16BitUnicodeEscapeSequence(c.charCodeAt(0));
              }
          }
          ts.escapeString = escapeString;
          function get16BitUnicodeEscapeSequence(charCode) {
              var hexCharCode = charCode.toString(16).toUpperCase();
              var paddedHexCode = ("0000" + hexCharCode).slice(-4);
              return "\\u" + paddedHexCode;
          }
          var nonAsciiCharacters = /[^\u0000-\u007F]/g;
          function escapeNonAsciiCharacters(s) {
              return nonAsciiCharacters.test(s) ?
                  s.replace(nonAsciiCharacters, function (c) { return get16BitUnicodeEscapeSequence(c.charCodeAt(0)); }) :
                  s;
          }
          ts.escapeNonAsciiCharacters = escapeNonAsciiCharacters;
          var indentStrings = ["", "    "];
          function getIndentString(level) {
              if (indentStrings[level] === undefined) {
                  indentStrings[level] = getIndentString(level - 1) + indentStrings[1];
              }
              return indentStrings[level];
          }
          ts.getIndentString = getIndentString;
          function getIndentSize() {
              return indentStrings[1].length;
          }
          ts.getIndentSize = getIndentSize;
          function createTextWriter(newLine) {
              var output = "";
              var indent = 0;
              var lineStart = true;
              var lineCount = 0;
              var linePos = 0;
              function write(s) {
                  if (s && s.length) {
                      if (lineStart) {
                          output += getIndentString(indent);
                          lineStart = false;
                      }
                      output += s;
                  }
              }
              function rawWrite(s) {
                  if (s !== undefined) {
                      if (lineStart) {
                          lineStart = false;
                      }
                      output += s;
                  }
              }
              function writeLiteral(s) {
                  if (s && s.length) {
                      write(s);
                      var lineStartsOfS = ts.computeLineStarts(s);
                      if (lineStartsOfS.length > 1) {
                          lineCount = lineCount + lineStartsOfS.length - 1;
                          linePos = output.length - s.length + ts.lastOrUndefined(lineStartsOfS);
                      }
                  }
              }
              function writeLine() {
                  if (!lineStart) {
                      output += newLine;
                      lineCount++;
                      linePos = output.length;
                      lineStart = true;
                  }
              }
              function writeTextOfNode(sourceFile, node) {
                  write(getSourceTextOfNodeFromSourceFile(sourceFile, node));
              }
              return {
                  write: write,
                  rawWrite: rawWrite,
                  writeTextOfNode: writeTextOfNode,
                  writeLiteral: writeLiteral,
                  writeLine: writeLine,
                  increaseIndent: function () { return indent++; },
                  decreaseIndent: function () { return indent--; },
                  getIndent: function () { return indent; },
                  getTextPos: function () { return output.length; },
                  getLine: function () { return lineCount + 1; },
                  getColumn: function () { return lineStart ? indent * getIndentSize() + 1 : output.length - linePos + 1; },
                  getText: function () { return output; }
              };
          }
          ts.createTextWriter = createTextWriter;
          function getOwnEmitOutputFilePath(sourceFile, host, extension) {
              var compilerOptions = host.getCompilerOptions();
              var emitOutputFilePathWithoutExtension;
              if (compilerOptions.outDir) {
                  emitOutputFilePathWithoutExtension = ts.removeFileExtension(getSourceFilePathInNewDir(sourceFile, host, compilerOptions.outDir));
              }
              else {
                  emitOutputFilePathWithoutExtension = ts.removeFileExtension(sourceFile.fileName);
              }
              return emitOutputFilePathWithoutExtension + extension;
          }
          ts.getOwnEmitOutputFilePath = getOwnEmitOutputFilePath;
          function getSourceFilePathInNewDir(sourceFile, host, newDirPath) {
              var sourceFilePath = ts.getNormalizedAbsolutePath(sourceFile.fileName, host.getCurrentDirectory());
              sourceFilePath = sourceFilePath.replace(host.getCommonSourceDirectory(), "");
              return ts.combinePaths(newDirPath, sourceFilePath);
          }
          ts.getSourceFilePathInNewDir = getSourceFilePathInNewDir;
          function writeFile(host, diagnostics, fileName, data, writeByteOrderMark) {
              host.writeFile(fileName, data, writeByteOrderMark, function (hostErrorMessage) {
                  diagnostics.push(ts.createCompilerDiagnostic(ts.Diagnostics.Could_not_write_file_0_Colon_1, fileName, hostErrorMessage));
              });
          }
          ts.writeFile = writeFile;
          function getLineOfLocalPosition(currentSourceFile, pos) {
              return ts.getLineAndCharacterOfPosition(currentSourceFile, pos).line;
          }
          ts.getLineOfLocalPosition = getLineOfLocalPosition;
          function getFirstConstructorWithBody(node) {
              return ts.forEach(node.members, function (member) {
                  if (member.kind === 136 && nodeIsPresent(member.body)) {
                      return member;
                  }
              });
          }
          ts.getFirstConstructorWithBody = getFirstConstructorWithBody;
          function shouldEmitToOwnFile(sourceFile, compilerOptions) {
              if (!isDeclarationFile(sourceFile)) {
                  if ((isExternalModule(sourceFile) || !compilerOptions.out)) {
                      return compilerOptions.separateCompilation || !ts.fileExtensionIs(sourceFile.fileName, ".js");
                  }
                  return false;
              }
              return false;
          }
          ts.shouldEmitToOwnFile = shouldEmitToOwnFile;
          function getAllAccessorDeclarations(declarations, accessor) {
              var firstAccessor;
              var secondAccessor;
              var getAccessor;
              var setAccessor;
              if (hasDynamicName(accessor)) {
                  firstAccessor = accessor;
                  if (accessor.kind === 137) {
                      getAccessor = accessor;
                  }
                  else if (accessor.kind === 138) {
                      setAccessor = accessor;
                  }
                  else {
                      ts.Debug.fail("Accessor has wrong kind");
                  }
              }
              else {
                  ts.forEach(declarations, function (member) {
                      if ((member.kind === 137 || member.kind === 138)
                          && (member.flags & 128) === (accessor.flags & 128)) {
                          var memberName = getPropertyNameForPropertyNameNode(member.name);
                          var accessorName = getPropertyNameForPropertyNameNode(accessor.name);
                          if (memberName === accessorName) {
                              if (!firstAccessor) {
                                  firstAccessor = member;
                              }
                              else if (!secondAccessor) {
                                  secondAccessor = member;
                              }
                              if (member.kind === 137 && !getAccessor) {
                                  getAccessor = member;
                              }
                              if (member.kind === 138 && !setAccessor) {
                                  setAccessor = member;
                              }
                          }
                      }
                  });
              }
              return {
                  firstAccessor: firstAccessor,
                  secondAccessor: secondAccessor,
                  getAccessor: getAccessor,
                  setAccessor: setAccessor
              };
          }
          ts.getAllAccessorDeclarations = getAllAccessorDeclarations;
          function emitNewLineBeforeLeadingComments(currentSourceFile, writer, node, leadingComments) {
              if (leadingComments && leadingComments.length && node.pos !== leadingComments[0].pos &&
                  getLineOfLocalPosition(currentSourceFile, node.pos) !== getLineOfLocalPosition(currentSourceFile, leadingComments[0].pos)) {
                  writer.writeLine();
              }
          }
          ts.emitNewLineBeforeLeadingComments = emitNewLineBeforeLeadingComments;
          function emitComments(currentSourceFile, writer, comments, trailingSeparator, newLine, writeComment) {
              var emitLeadingSpace = !trailingSeparator;
              ts.forEach(comments, function (comment) {
                  if (emitLeadingSpace) {
                      writer.write(" ");
                      emitLeadingSpace = false;
                  }
                  writeComment(currentSourceFile, writer, comment, newLine);
                  if (comment.hasTrailingNewLine) {
                      writer.writeLine();
                  }
                  else if (trailingSeparator) {
                      writer.write(" ");
                  }
                  else {
                      emitLeadingSpace = true;
                  }
              });
          }
          ts.emitComments = emitComments;
          function writeCommentRange(currentSourceFile, writer, comment, newLine) {
              if (currentSourceFile.text.charCodeAt(comment.pos + 1) === 42) {
                  var firstCommentLineAndCharacter = ts.getLineAndCharacterOfPosition(currentSourceFile, comment.pos);
                  var lineCount = ts.getLineStarts(currentSourceFile).length;
                  var firstCommentLineIndent;
                  for (var pos = comment.pos, currentLine = firstCommentLineAndCharacter.line; pos < comment.end; currentLine++) {
                      var nextLineStart = (currentLine + 1) === lineCount
                          ? currentSourceFile.text.length + 1
                          : getStartPositionOfLine(currentLine + 1, currentSourceFile);
                      if (pos !== comment.pos) {
                          if (firstCommentLineIndent === undefined) {
                              firstCommentLineIndent = calculateIndent(getStartPositionOfLine(firstCommentLineAndCharacter.line, currentSourceFile), comment.pos);
                          }
                          var currentWriterIndentSpacing = writer.getIndent() * getIndentSize();
                          var spacesToEmit = currentWriterIndentSpacing - firstCommentLineIndent + calculateIndent(pos, nextLineStart);
                          if (spacesToEmit > 0) {
                              var numberOfSingleSpacesToEmit = spacesToEmit % getIndentSize();
                              var indentSizeSpaceString = getIndentString((spacesToEmit - numberOfSingleSpacesToEmit) / getIndentSize());
                              writer.rawWrite(indentSizeSpaceString);
                              while (numberOfSingleSpacesToEmit) {
                                  writer.rawWrite(" ");
                                  numberOfSingleSpacesToEmit--;
                              }
                          }
                          else {
                              writer.rawWrite("");
                          }
                      }
                      writeTrimmedCurrentLine(pos, nextLineStart);
                      pos = nextLineStart;
                  }
              }
              else {
                  writer.write(currentSourceFile.text.substring(comment.pos, comment.end));
              }
              function writeTrimmedCurrentLine(pos, nextLineStart) {
                  var end = Math.min(comment.end, nextLineStart - 1);
                  var currentLineText = currentSourceFile.text.substring(pos, end).replace(/^\s+|\s+$/g, '');
                  if (currentLineText) {
                      writer.write(currentLineText);
                      if (end !== comment.end) {
                          writer.writeLine();
                      }
                  }
                  else {
                      writer.writeLiteral(newLine);
                  }
              }
              function calculateIndent(pos, end) {
                  var currentLineIndent = 0;
                  for (; pos < end && ts.isWhiteSpace(currentSourceFile.text.charCodeAt(pos)); pos++) {
                      if (currentSourceFile.text.charCodeAt(pos) === 9) {
                          currentLineIndent += getIndentSize() - (currentLineIndent % getIndentSize());
                      }
                      else {
                          currentLineIndent++;
                      }
                  }
                  return currentLineIndent;
              }
          }
          ts.writeCommentRange = writeCommentRange;
          function modifierToFlag(token) {
              switch (token) {
                  case 109: return 128;
                  case 108: return 16;
                  case 107: return 64;
                  case 106: return 32;
                  case 78: return 1;
                  case 115: return 2;
                  case 70: return 8192;
                  case 73: return 256;
              }
              return 0;
          }
          ts.modifierToFlag = modifierToFlag;
          function isLeftHandSideExpression(expr) {
              if (expr) {
                  switch (expr.kind) {
                      case 156:
                      case 157:
                      case 159:
                      case 158:
                      case 160:
                      case 154:
                      case 162:
                      case 155:
                      case 175:
                      case 163:
                      case 65:
                      case 9:
                      case 7:
                      case 8:
                      case 10:
                      case 172:
                      case 80:
                      case 89:
                      case 93:
                      case 95:
                      case 91:
                          return true;
                  }
              }
              return false;
          }
          ts.isLeftHandSideExpression = isLeftHandSideExpression;
          function isAssignmentOperator(token) {
              return token >= 53 && token <= 64;
          }
          ts.isAssignmentOperator = isAssignmentOperator;
          function isSupportedExpressionWithTypeArguments(node) {
              return isSupportedExpressionWithTypeArgumentsRest(node.expression);
          }
          ts.isSupportedExpressionWithTypeArguments = isSupportedExpressionWithTypeArguments;
          function isSupportedExpressionWithTypeArgumentsRest(node) {
              if (node.kind === 65) {
                  return true;
              }
              else if (node.kind === 156) {
                  return isSupportedExpressionWithTypeArgumentsRest(node.expression);
              }
              else {
                  return false;
              }
          }
          function isRightSideOfQualifiedNameOrPropertyAccess(node) {
              return (node.parent.kind === 127 && node.parent.right === node) ||
                  (node.parent.kind === 156 && node.parent.name === node);
          }
          ts.isRightSideOfQualifiedNameOrPropertyAccess = isRightSideOfQualifiedNameOrPropertyAccess;
          function getLocalSymbolForExportDefault(symbol) {
              return symbol && symbol.valueDeclaration && (symbol.valueDeclaration.flags & 256) ? symbol.valueDeclaration.localSymbol : undefined;
          }
          ts.getLocalSymbolForExportDefault = getLocalSymbolForExportDefault;
          function getExpandedCharCodes(input) {
              var output = [];
              var length = input.length;
              var leadSurrogate = undefined;
              for (var i = 0; i < length; i++) {
                  var charCode = input.charCodeAt(i);
                  if (charCode < 0x80) {
                      output.push(charCode);
                  }
                  else if (charCode < 0x800) {
                      output.push((charCode >> 6) | 192);
                      output.push((charCode & 63) | 128);
                  }
                  else if (charCode < 0x10000) {
                      output.push((charCode >> 12) | 224);
                      output.push(((charCode >> 6) & 63) | 128);
                      output.push((charCode & 63) | 128);
                  }
                  else if (charCode < 0x20000) {
                      output.push((charCode >> 18) | 240);
                      output.push(((charCode >> 12) & 63) | 128);
                      output.push(((charCode >> 6) & 63) | 128);
                      output.push((charCode & 63) | 128);
                  }
                  else {
                      ts.Debug.assert(false, "Unexpected code point");
                  }
              }
              return output;
          }
          var base64Digits = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
          function convertToBase64(input) {
              var result = "";
              var charCodes = getExpandedCharCodes(input);
              var i = 0;
              var length = charCodes.length;
              var byte1, byte2, byte3, byte4;
              while (i < length) {
                  byte1 = charCodes[i] >> 2;
                  byte2 = (charCodes[i] & 3) << 4 | charCodes[i + 1] >> 4;
                  byte3 = (charCodes[i + 1] & 15) << 2 | charCodes[i + 2] >> 6;
                  byte4 = charCodes[i + 2] & 63;
                  if (i + 1 >= length) {
                      byte3 = byte4 = 64;
                  }
                  else if (i + 2 >= length) {
                      byte4 = 64;
                  }
                  result += base64Digits.charAt(byte1) + base64Digits.charAt(byte2) + base64Digits.charAt(byte3) + base64Digits.charAt(byte4);
                  i += 3;
              }
              return result;
          }
          ts.convertToBase64 = convertToBase64;
      })(ts || (ts = {}));
      var ts;
      (function (ts) {
          function getDefaultLibFileName(options) {
              return options.target === 2 ? "lib.es6.d.ts" : "lib.d.ts";
          }
          ts.getDefaultLibFileName = getDefaultLibFileName;
          function textSpanEnd(span) {
              return span.start + span.length;
          }
          ts.textSpanEnd = textSpanEnd;
          function textSpanIsEmpty(span) {
              return span.length === 0;
          }
          ts.textSpanIsEmpty = textSpanIsEmpty;
          function textSpanContainsPosition(span, position) {
              return position >= span.start && position < textSpanEnd(span);
          }
          ts.textSpanContainsPosition = textSpanContainsPosition;
          function textSpanContainsTextSpan(span, other) {
              return other.start >= span.start && textSpanEnd(other) <= textSpanEnd(span);
          }
          ts.textSpanContainsTextSpan = textSpanContainsTextSpan;
          function textSpanOverlapsWith(span, other) {
              var overlapStart = Math.max(span.start, other.start);
              var overlapEnd = Math.min(textSpanEnd(span), textSpanEnd(other));
              return overlapStart < overlapEnd;
          }
          ts.textSpanOverlapsWith = textSpanOverlapsWith;
          function textSpanOverlap(span1, span2) {
              var overlapStart = Math.max(span1.start, span2.start);
              var overlapEnd = Math.min(textSpanEnd(span1), textSpanEnd(span2));
              if (overlapStart < overlapEnd) {
                  return createTextSpanFromBounds(overlapStart, overlapEnd);
              }
              return undefined;
          }
          ts.textSpanOverlap = textSpanOverlap;
          function textSpanIntersectsWithTextSpan(span, other) {
              return other.start <= textSpanEnd(span) && textSpanEnd(other) >= span.start;
          }
          ts.textSpanIntersectsWithTextSpan = textSpanIntersectsWithTextSpan;
          function textSpanIntersectsWith(span, start, length) {
              var end = start + length;
              return start <= textSpanEnd(span) && end >= span.start;
          }
          ts.textSpanIntersectsWith = textSpanIntersectsWith;
          function textSpanIntersectsWithPosition(span, position) {
              return position <= textSpanEnd(span) && position >= span.start;
          }
          ts.textSpanIntersectsWithPosition = textSpanIntersectsWithPosition;
          function textSpanIntersection(span1, span2) {
              var intersectStart = Math.max(span1.start, span2.start);
              var intersectEnd = Math.min(textSpanEnd(span1), textSpanEnd(span2));
              if (intersectStart <= intersectEnd) {
                  return createTextSpanFromBounds(intersectStart, intersectEnd);
              }
              return undefined;
          }
          ts.textSpanIntersection = textSpanIntersection;
          function createTextSpan(start, length) {
              if (start < 0) {
                  throw new Error("start < 0");
              }
              if (length < 0) {
                  throw new Error("length < 0");
              }
              return { start: start, length: length };
          }
          ts.createTextSpan = createTextSpan;
          function createTextSpanFromBounds(start, end) {
              return createTextSpan(start, end - start);
          }
          ts.createTextSpanFromBounds = createTextSpanFromBounds;
          function textChangeRangeNewSpan(range) {
              return createTextSpan(range.span.start, range.newLength);
          }
          ts.textChangeRangeNewSpan = textChangeRangeNewSpan;
          function textChangeRangeIsUnchanged(range) {
              return textSpanIsEmpty(range.span) && range.newLength === 0;
          }
          ts.textChangeRangeIsUnchanged = textChangeRangeIsUnchanged;
          function createTextChangeRange(span, newLength) {
              if (newLength < 0) {
                  throw new Error("newLength < 0");
              }
              return { span: span, newLength: newLength };
          }
          ts.createTextChangeRange = createTextChangeRange;
          ts.unchangedTextChangeRange = createTextChangeRange(createTextSpan(0, 0), 0);
          function collapseTextChangeRangesAcrossMultipleVersions(changes) {
              if (changes.length === 0) {
                  return ts.unchangedTextChangeRange;
              }
              if (changes.length === 1) {
                  return changes[0];
              }
              var change0 = changes[0];
              var oldStartN = change0.span.start;
              var oldEndN = textSpanEnd(change0.span);
              var newEndN = oldStartN + change0.newLength;
              for (var i = 1; i < changes.length; i++) {
                  var nextChange = changes[i];
                  var oldStart1 = oldStartN;
                  var oldEnd1 = oldEndN;
                  var newEnd1 = newEndN;
                  var oldStart2 = nextChange.span.start;
                  var oldEnd2 = textSpanEnd(nextChange.span);
                  var newEnd2 = oldStart2 + nextChange.newLength;
                  oldStartN = Math.min(oldStart1, oldStart2);
                  oldEndN = Math.max(oldEnd1, oldEnd1 + (oldEnd2 - newEnd1));
                  newEndN = Math.max(newEnd2, newEnd2 + (newEnd1 - oldEnd2));
              }
              return createTextChangeRange(createTextSpanFromBounds(oldStartN, oldEndN), newEndN - oldStartN);
          }
          ts.collapseTextChangeRangesAcrossMultipleVersions = collapseTextChangeRangesAcrossMultipleVersions;
      })(ts || (ts = {}));
      /// <reference path="scanner.ts"/>
      /// <reference path="utilities.ts"/>
      var ts;
      (function (ts) {
          var nodeConstructors = new Array(230);
          ts.parseTime = 0;
          function getNodeConstructor(kind) {
              return nodeConstructors[kind] || (nodeConstructors[kind] = ts.objectAllocator.getNodeConstructor(kind));
          }
          ts.getNodeConstructor = getNodeConstructor;
          function createNode(kind) {
              return new (getNodeConstructor(kind))();
          }
          ts.createNode = createNode;
          function visitNode(cbNode, node) {
              if (node) {
                  return cbNode(node);
              }
          }
          function visitNodeArray(cbNodes, nodes) {
              if (nodes) {
                  return cbNodes(nodes);
              }
          }
          function visitEachNode(cbNode, nodes) {
              if (nodes) {
                  for (var _i = 0; _i < nodes.length; _i++) {
                      var node = nodes[_i];
                      var result = cbNode(node);
                      if (result) {
                          return result;
                      }
                  }
              }
          }
          function forEachChild(node, cbNode, cbNodeArray) {
              if (!node) {
                  return;
              }
              var visitNodes = cbNodeArray ? visitNodeArray : visitEachNode;
              var cbNodes = cbNodeArray || cbNode;
              switch (node.kind) {
                  case 127:
                      return visitNode(cbNode, node.left) ||
                          visitNode(cbNode, node.right);
                  case 129:
                      return visitNode(cbNode, node.name) ||
                          visitNode(cbNode, node.constraint) ||
                          visitNode(cbNode, node.expression);
                  case 130:
                  case 133:
                  case 132:
                  case 225:
                  case 226:
                  case 199:
                  case 153:
                      return visitNodes(cbNodes, node.decorators) ||
                          visitNodes(cbNodes, node.modifiers) ||
                          visitNode(cbNode, node.propertyName) ||
                          visitNode(cbNode, node.dotDotDotToken) ||
                          visitNode(cbNode, node.name) ||
                          visitNode(cbNode, node.questionToken) ||
                          visitNode(cbNode, node.type) ||
                          visitNode(cbNode, node.initializer);
                  case 143:
                  case 144:
                  case 139:
                  case 140:
                  case 141:
                      return visitNodes(cbNodes, node.decorators) ||
                          visitNodes(cbNodes, node.modifiers) ||
                          visitNodes(cbNodes, node.typeParameters) ||
                          visitNodes(cbNodes, node.parameters) ||
                          visitNode(cbNode, node.type);
                  case 135:
                  case 134:
                  case 136:
                  case 137:
                  case 138:
                  case 163:
                  case 201:
                  case 164:
                      return visitNodes(cbNodes, node.decorators) ||
                          visitNodes(cbNodes, node.modifiers) ||
                          visitNode(cbNode, node.asteriskToken) ||
                          visitNode(cbNode, node.name) ||
                          visitNode(cbNode, node.questionToken) ||
                          visitNodes(cbNodes, node.typeParameters) ||
                          visitNodes(cbNodes, node.parameters) ||
                          visitNode(cbNode, node.type) ||
                          visitNode(cbNode, node.equalsGreaterThanToken) ||
                          visitNode(cbNode, node.body);
                  case 142:
                      return visitNode(cbNode, node.typeName) ||
                          visitNodes(cbNodes, node.typeArguments);
                  case 145:
                      return visitNode(cbNode, node.exprName);
                  case 146:
                      return visitNodes(cbNodes, node.members);
                  case 147:
                      return visitNode(cbNode, node.elementType);
                  case 148:
                      return visitNodes(cbNodes, node.elementTypes);
                  case 149:
                      return visitNodes(cbNodes, node.types);
                  case 150:
                      return visitNode(cbNode, node.type);
                  case 151:
                  case 152:
                      return visitNodes(cbNodes, node.elements);
                  case 154:
                      return visitNodes(cbNodes, node.elements);
                  case 155:
                      return visitNodes(cbNodes, node.properties);
                  case 156:
                      return visitNode(cbNode, node.expression) ||
                          visitNode(cbNode, node.dotToken) ||
                          visitNode(cbNode, node.name);
                  case 157:
                      return visitNode(cbNode, node.expression) ||
                          visitNode(cbNode, node.argumentExpression);
                  case 158:
                  case 159:
                      return visitNode(cbNode, node.expression) ||
                          visitNodes(cbNodes, node.typeArguments) ||
                          visitNodes(cbNodes, node.arguments);
                  case 160:
                      return visitNode(cbNode, node.tag) ||
                          visitNode(cbNode, node.template);
                  case 161:
                      return visitNode(cbNode, node.type) ||
                          visitNode(cbNode, node.expression);
                  case 162:
                      return visitNode(cbNode, node.expression);
                  case 165:
                      return visitNode(cbNode, node.expression);
                  case 166:
                      return visitNode(cbNode, node.expression);
                  case 167:
                      return visitNode(cbNode, node.expression);
                  case 168:
                      return visitNode(cbNode, node.operand);
                  case 173:
                      return visitNode(cbNode, node.asteriskToken) ||
                          visitNode(cbNode, node.expression);
                  case 169:
                      return visitNode(cbNode, node.operand);
                  case 170:
                      return visitNode(cbNode, node.left) ||
                          visitNode(cbNode, node.operatorToken) ||
                          visitNode(cbNode, node.right);
                  case 171:
                      return visitNode(cbNode, node.condition) ||
                          visitNode(cbNode, node.questionToken) ||
                          visitNode(cbNode, node.whenTrue) ||
                          visitNode(cbNode, node.colonToken) ||
                          visitNode(cbNode, node.whenFalse);
                  case 174:
                      return visitNode(cbNode, node.expression);
                  case 180:
                  case 207:
                      return visitNodes(cbNodes, node.statements);
                  case 228:
                      return visitNodes(cbNodes, node.statements) ||
                          visitNode(cbNode, node.endOfFileToken);
                  case 181:
                      return visitNodes(cbNodes, node.decorators) ||
                          visitNodes(cbNodes, node.modifiers) ||
                          visitNode(cbNode, node.declarationList);
                  case 200:
                      return visitNodes(cbNodes, node.declarations);
                  case 183:
                      return visitNode(cbNode, node.expression);
                  case 184:
                      return visitNode(cbNode, node.expression) ||
                          visitNode(cbNode, node.thenStatement) ||
                          visitNode(cbNode, node.elseStatement);
                  case 185:
                      return visitNode(cbNode, node.statement) ||
                          visitNode(cbNode, node.expression);
                  case 186:
                      return visitNode(cbNode, node.expression) ||
                          visitNode(cbNode, node.statement);
                  case 187:
                      return visitNode(cbNode, node.initializer) ||
                          visitNode(cbNode, node.condition) ||
                          visitNode(cbNode, node.incrementor) ||
                          visitNode(cbNode, node.statement);
                  case 188:
                      return visitNode(cbNode, node.initializer) ||
                          visitNode(cbNode, node.expression) ||
                          visitNode(cbNode, node.statement);
                  case 189:
                      return visitNode(cbNode, node.initializer) ||
                          visitNode(cbNode, node.expression) ||
                          visitNode(cbNode, node.statement);
                  case 190:
                  case 191:
                      return visitNode(cbNode, node.label);
                  case 192:
                      return visitNode(cbNode, node.expression);
                  case 193:
                      return visitNode(cbNode, node.expression) ||
                          visitNode(cbNode, node.statement);
                  case 194:
                      return visitNode(cbNode, node.expression) ||
                          visitNode(cbNode, node.caseBlock);
                  case 208:
                      return visitNodes(cbNodes, node.clauses);
                  case 221:
                      return visitNode(cbNode, node.expression) ||
                          visitNodes(cbNodes, node.statements);
                  case 222:
                      return visitNodes(cbNodes, node.statements);
                  case 195:
                      return visitNode(cbNode, node.label) ||
                          visitNode(cbNode, node.statement);
                  case 196:
                      return visitNode(cbNode, node.expression);
                  case 197:
                      return visitNode(cbNode, node.tryBlock) ||
                          visitNode(cbNode, node.catchClause) ||
                          visitNode(cbNode, node.finallyBlock);
                  case 224:
                      return visitNode(cbNode, node.variableDeclaration) ||
                          visitNode(cbNode, node.block);
                  case 131:
                      return visitNode(cbNode, node.expression);
                  case 202:
                  case 175:
                      return visitNodes(cbNodes, node.decorators) ||
                          visitNodes(cbNodes, node.modifiers) ||
                          visitNode(cbNode, node.name) ||
                          visitNodes(cbNodes, node.typeParameters) ||
                          visitNodes(cbNodes, node.heritageClauses) ||
                          visitNodes(cbNodes, node.members);
                  case 203:
                      return visitNodes(cbNodes, node.decorators) ||
                          visitNodes(cbNodes, node.modifiers) ||
                          visitNode(cbNode, node.name) ||
                          visitNodes(cbNodes, node.typeParameters) ||
                          visitNodes(cbNodes, node.heritageClauses) ||
                          visitNodes(cbNodes, node.members);
                  case 204:
                      return visitNodes(cbNodes, node.decorators) ||
                          visitNodes(cbNodes, node.modifiers) ||
                          visitNode(cbNode, node.name) ||
                          visitNode(cbNode, node.type);
                  case 205:
                      return visitNodes(cbNodes, node.decorators) ||
                          visitNodes(cbNodes, node.modifiers) ||
                          visitNode(cbNode, node.name) ||
                          visitNodes(cbNodes, node.members);
                  case 227:
                      return visitNode(cbNode, node.name) ||
                          visitNode(cbNode, node.initializer);
                  case 206:
                      return visitNodes(cbNodes, node.decorators) ||
                          visitNodes(cbNodes, node.modifiers) ||
                          visitNode(cbNode, node.name) ||
                          visitNode(cbNode, node.body);
                  case 209:
                      return visitNodes(cbNodes, node.decorators) ||
                          visitNodes(cbNodes, node.modifiers) ||
                          visitNode(cbNode, node.name) ||
                          visitNode(cbNode, node.moduleReference);
                  case 210:
                      return visitNodes(cbNodes, node.decorators) ||
                          visitNodes(cbNodes, node.modifiers) ||
                          visitNode(cbNode, node.importClause) ||
                          visitNode(cbNode, node.moduleSpecifier);
                  case 211:
                      return visitNode(cbNode, node.name) ||
                          visitNode(cbNode, node.namedBindings);
                  case 212:
                      return visitNode(cbNode, node.name);
                  case 213:
                  case 217:
                      return visitNodes(cbNodes, node.elements);
                  case 216:
                      return visitNodes(cbNodes, node.decorators) ||
                          visitNodes(cbNodes, node.modifiers) ||
                          visitNode(cbNode, node.exportClause) ||
                          visitNode(cbNode, node.moduleSpecifier);
                  case 214:
                  case 218:
                      return visitNode(cbNode, node.propertyName) ||
                          visitNode(cbNode, node.name);
                  case 215:
                      return visitNodes(cbNodes, node.decorators) ||
                          visitNodes(cbNodes, node.modifiers) ||
                          visitNode(cbNode, node.expression);
                  case 172:
                      return visitNode(cbNode, node.head) || visitNodes(cbNodes, node.templateSpans);
                  case 178:
                      return visitNode(cbNode, node.expression) || visitNode(cbNode, node.literal);
                  case 128:
                      return visitNode(cbNode, node.expression);
                  case 223:
                      return visitNodes(cbNodes, node.types);
                  case 177:
                      return visitNode(cbNode, node.expression) ||
                          visitNodes(cbNodes, node.typeArguments);
                  case 220:
                      return visitNode(cbNode, node.expression);
                  case 219:
                      return visitNodes(cbNodes, node.decorators);
              }
          }
          ts.forEachChild = forEachChild;
          function createSourceFile(fileName, sourceText, languageVersion, setParentNodes) {
              if (setParentNodes === void 0) { setParentNodes = false; }
              var start = new Date().getTime();
              var result = Parser.parseSourceFile(fileName, sourceText, languageVersion, undefined, setParentNodes);
              ts.parseTime += new Date().getTime() - start;
              return result;
          }
          ts.createSourceFile = createSourceFile;
          function updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks) {
              return IncrementalParser.updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks);
          }
          ts.updateSourceFile = updateSourceFile;
          var Parser;
          (function (Parser) {
              var scanner = ts.createScanner(2, true);
              var disallowInAndDecoratorContext = 2 | 16;
              var sourceFile;
              var syntaxCursor;
              var token;
              var sourceText;
              var nodeCount;
              var identifiers;
              var identifierCount;
              var parsingContext;
              var contextFlags = 0;
              var parseErrorBeforeNextFinishedNode = false;
              function parseSourceFile(fileName, _sourceText, languageVersion, _syntaxCursor, setParentNodes) {
                  sourceText = _sourceText;
                  syntaxCursor = _syntaxCursor;
                  parsingContext = 0;
                  identifiers = {};
                  identifierCount = 0;
                  nodeCount = 0;
                  contextFlags = 0;
                  parseErrorBeforeNextFinishedNode = false;
                  createSourceFile(fileName, languageVersion);
                  scanner.setText(sourceText);
                  scanner.setOnError(scanError);
                  scanner.setScriptTarget(languageVersion);
                  token = nextToken();
                  processReferenceComments(sourceFile);
                  sourceFile.statements = parseList(0, true, parseSourceElement);
                  ts.Debug.assert(token === 1);
                  sourceFile.endOfFileToken = parseTokenNode();
                  setExternalModuleIndicator(sourceFile);
                  sourceFile.nodeCount = nodeCount;
                  sourceFile.identifierCount = identifierCount;
                  sourceFile.identifiers = identifiers;
                  if (setParentNodes) {
                      fixupParentReferences(sourceFile);
                  }
                  syntaxCursor = undefined;
                  scanner.setText("");
                  scanner.setOnError(undefined);
                  var result = sourceFile;
                  sourceFile = undefined;
                  identifiers = undefined;
                  syntaxCursor = undefined;
                  sourceText = undefined;
                  return result;
              }
              Parser.parseSourceFile = parseSourceFile;
              function fixupParentReferences(sourceFile) {
                  // normally parent references are set during binding. However, for clients that only need
                  // a syntax tree, and no semantic features, then the binding process is an unnecessary
                  // overhead.  This functions allows us to set all the parents, without all the expense of
                  // binding.
                  var parent = sourceFile;
                  forEachChild(sourceFile, visitNode);
                  return;
                  function visitNode(n) {
                      if (n.parent !== parent) {
                          n.parent = parent;
                          var saveParent = parent;
                          parent = n;
                          forEachChild(n, visitNode);
                          parent = saveParent;
                      }
                  }
              }
              function createSourceFile(fileName, languageVersion) {
                  sourceFile = createNode(228, 0);
                  sourceFile.pos = 0;
                  sourceFile.end = sourceText.length;
                  sourceFile.text = sourceText;
                  sourceFile.parseDiagnostics = [];
                  sourceFile.bindDiagnostics = [];
                  sourceFile.languageVersion = languageVersion;
                  sourceFile.fileName = ts.normalizePath(fileName);
                  sourceFile.flags = ts.fileExtensionIs(sourceFile.fileName, ".d.ts") ? 2048 : 0;
              }
              function setContextFlag(val, flag) {
                  if (val) {
                      contextFlags |= flag;
                  }
                  else {
                      contextFlags &= ~flag;
                  }
              }
              function setStrictModeContext(val) {
                  setContextFlag(val, 1);
              }
              function setDisallowInContext(val) {
                  setContextFlag(val, 2);
              }
              function setYieldContext(val) {
                  setContextFlag(val, 4);
              }
              function setGeneratorParameterContext(val) {
                  setContextFlag(val, 8);
              }
              function setDecoratorContext(val) {
                  setContextFlag(val, 16);
              }
              function doOutsideOfContext(flags, func) {
                  var currentContextFlags = contextFlags & flags;
                  if (currentContextFlags) {
                      setContextFlag(false, currentContextFlags);
                      var result = func();
                      setContextFlag(true, currentContextFlags);
                      return result;
                  }
                  return func();
              }
              function allowInAnd(func) {
                  if (contextFlags & 2) {
                      setDisallowInContext(false);
                      var result = func();
                      setDisallowInContext(true);
                      return result;
                  }
                  return func();
              }
              function disallowInAnd(func) {
                  if (contextFlags & 2) {
                      return func();
                  }
                  setDisallowInContext(true);
                  var result = func();
                  setDisallowInContext(false);
                  return result;
              }
              function doInYieldContext(func) {
                  if (contextFlags & 4) {
                      return func();
                  }
                  setYieldContext(true);
                  var result = func();
                  setYieldContext(false);
                  return result;
              }
              function doOutsideOfYieldContext(func) {
                  if (contextFlags & 4) {
                      setYieldContext(false);
                      var result = func();
                      setYieldContext(true);
                      return result;
                  }
                  return func();
              }
              function doInDecoratorContext(func) {
                  if (contextFlags & 16) {
                      return func();
                  }
                  setDecoratorContext(true);
                  var result = func();
                  setDecoratorContext(false);
                  return result;
              }
              function inYieldContext() {
                  return (contextFlags & 4) !== 0;
              }
              function inStrictModeContext() {
                  return (contextFlags & 1) !== 0;
              }
              function inGeneratorParameterContext() {
                  return (contextFlags & 8) !== 0;
              }
              function inDisallowInContext() {
                  return (contextFlags & 2) !== 0;
              }
              function inDecoratorContext() {
                  return (contextFlags & 16) !== 0;
              }
              function parseErrorAtCurrentToken(message, arg0) {
                  var start = scanner.getTokenPos();
                  var length = scanner.getTextPos() - start;
                  parseErrorAtPosition(start, length, message, arg0);
              }
              function parseErrorAtPosition(start, length, message, arg0) {
                  var lastError = ts.lastOrUndefined(sourceFile.parseDiagnostics);
                  if (!lastError || start !== lastError.start) {
                      sourceFile.parseDiagnostics.push(ts.createFileDiagnostic(sourceFile, start, length, message, arg0));
                  }
                  parseErrorBeforeNextFinishedNode = true;
              }
              function scanError(message, length) {
                  var pos = scanner.getTextPos();
                  parseErrorAtPosition(pos, length || 0, message);
              }
              function getNodePos() {
                  return scanner.getStartPos();
              }
              function getNodeEnd() {
                  return scanner.getStartPos();
              }
              function nextToken() {
                  return token = scanner.scan();
              }
              function getTokenPos(pos) {
                  return ts.skipTrivia(sourceText, pos);
              }
              function reScanGreaterToken() {
                  return token = scanner.reScanGreaterToken();
              }
              function reScanSlashToken() {
                  return token = scanner.reScanSlashToken();
              }
              function reScanTemplateToken() {
                  return token = scanner.reScanTemplateToken();
              }
              function speculationHelper(callback, isLookAhead) {
                  var saveToken = token;
                  var saveParseDiagnosticsLength = sourceFile.parseDiagnostics.length;
                  var saveParseErrorBeforeNextFinishedNode = parseErrorBeforeNextFinishedNode;
                  var saveContextFlags = contextFlags;
                  var result = isLookAhead
                      ? scanner.lookAhead(callback)
                      : scanner.tryScan(callback);
                  ts.Debug.assert(saveContextFlags === contextFlags);
                  if (!result || isLookAhead) {
                      token = saveToken;
                      sourceFile.parseDiagnostics.length = saveParseDiagnosticsLength;
                      parseErrorBeforeNextFinishedNode = saveParseErrorBeforeNextFinishedNode;
                  }
                  return result;
              }
              function lookAhead(callback) {
                  return speculationHelper(callback, true);
              }
              function tryParse(callback) {
                  return speculationHelper(callback, false);
              }
              function isIdentifier() {
                  if (token === 65) {
                      return true;
                  }
                  if (token === 110 && inYieldContext()) {
                      return false;
                  }
                  return token > 101;
              }
              function parseExpected(kind, diagnosticMessage) {
                  if (token === kind) {
                      nextToken();
                      return true;
                  }
                  if (diagnosticMessage) {
                      parseErrorAtCurrentToken(diagnosticMessage);
                  }
                  else {
                      parseErrorAtCurrentToken(ts.Diagnostics._0_expected, ts.tokenToString(kind));
                  }
                  return false;
              }
              function parseOptional(t) {
                  if (token === t) {
                      nextToken();
                      return true;
                  }
                  return false;
              }
              function parseOptionalToken(t) {
                  if (token === t) {
                      return parseTokenNode();
                  }
                  return undefined;
              }
              function parseExpectedToken(t, reportAtCurrentPosition, diagnosticMessage, arg0) {
                  return parseOptionalToken(t) ||
                      createMissingNode(t, reportAtCurrentPosition, diagnosticMessage, arg0);
              }
              function parseTokenNode() {
                  var node = createNode(token);
                  nextToken();
                  return finishNode(node);
              }
              function canParseSemicolon() {
                  if (token === 22) {
                      return true;
                  }
                  return token === 15 || token === 1 || scanner.hasPrecedingLineBreak();
              }
              function parseSemicolon() {
                  if (canParseSemicolon()) {
                      if (token === 22) {
                          nextToken();
                      }
                      return true;
                  }
                  else {
                      return parseExpected(22);
                  }
              }
              function createNode(kind, pos) {
                  nodeCount++;
                  var node = new (nodeConstructors[kind] || (nodeConstructors[kind] = ts.objectAllocator.getNodeConstructor(kind)))();
                  if (!(pos >= 0)) {
                      pos = scanner.getStartPos();
                  }
                  node.pos = pos;
                  node.end = pos;
                  return node;
              }
              function finishNode(node) {
                  node.end = scanner.getStartPos();
                  if (contextFlags) {
                      node.parserContextFlags = contextFlags;
                  }
                  if (parseErrorBeforeNextFinishedNode) {
                      parseErrorBeforeNextFinishedNode = false;
                      node.parserContextFlags |= 32;
                  }
                  return node;
              }
              function createMissingNode(kind, reportAtCurrentPosition, diagnosticMessage, arg0) {
                  if (reportAtCurrentPosition) {
                      parseErrorAtPosition(scanner.getStartPos(), 0, diagnosticMessage, arg0);
                  }
                  else {
                      parseErrorAtCurrentToken(diagnosticMessage, arg0);
                  }
                  var result = createNode(kind, scanner.getStartPos());
                  result.text = "";
                  return finishNode(result);
              }
              function internIdentifier(text) {
                  text = ts.escapeIdentifier(text);
                  return ts.hasProperty(identifiers, text) ? identifiers[text] : (identifiers[text] = text);
              }
              function createIdentifier(isIdentifier, diagnosticMessage) {
                  identifierCount++;
                  if (isIdentifier) {
                      var node = createNode(65);
                      if (token !== 65) {
                          node.originalKeywordKind = token;
                      }
                      node.text = internIdentifier(scanner.getTokenValue());
                      nextToken();
                      return finishNode(node);
                  }
                  return createMissingNode(65, false, diagnosticMessage || ts.Diagnostics.Identifier_expected);
              }
              function parseIdentifier(diagnosticMessage) {
                  return createIdentifier(isIdentifier(), diagnosticMessage);
              }
              function parseIdentifierName() {
                  return createIdentifier(isIdentifierOrKeyword());
              }
              function isLiteralPropertyName() {
                  return isIdentifierOrKeyword() ||
                      token === 8 ||
                      token === 7;
              }
              function parsePropertyName() {
                  if (token === 8 || token === 7) {
                      return parseLiteralNode(true);
                  }
                  if (token === 18) {
                      return parseComputedPropertyName();
                  }
                  return parseIdentifierName();
              }
              function parseComputedPropertyName() {
                  var node = createNode(128);
                  parseExpected(18);
                  var yieldContext = inYieldContext();
                  if (inGeneratorParameterContext()) {
                      setYieldContext(false);
                  }
                  node.expression = allowInAnd(parseExpression);
                  if (inGeneratorParameterContext()) {
                      setYieldContext(yieldContext);
                  }
                  parseExpected(19);
                  return finishNode(node);
              }
              function parseContextualModifier(t) {
                  return token === t && tryParse(nextTokenCanFollowModifier);
              }
              function nextTokenCanFollowModifier() {
                  if (token === 70) {
                      return nextToken() === 77;
                  }
                  if (token === 78) {
                      nextToken();
                      if (token === 73) {
                          return lookAhead(nextTokenIsClassOrFunction);
                      }
                      return token !== 35 && token !== 14 && canFollowModifier();
                  }
                  if (token === 73) {
                      return nextTokenIsClassOrFunction();
                  }
                  nextToken();
                  return canFollowModifier();
              }
              function parseAnyContextualModifier() {
                  return ts.isModifier(token) && tryParse(nextTokenCanFollowModifier);
              }
              function canFollowModifier() {
                  return token === 18
                      || token === 14
                      || token === 35
                      || isLiteralPropertyName();
              }
              function nextTokenIsClassOrFunction() {
                  nextToken();
                  return token === 69 || token === 83;
              }
              function isListElement(parsingContext, inErrorRecovery) {
                  var node = currentNode(parsingContext);
                  if (node) {
                      return true;
                  }
                  switch (parsingContext) {
                      case 0:
                      case 1:
                          return isSourceElement(inErrorRecovery);
                      case 2:
                      case 4:
                          return isStartOfStatement(inErrorRecovery);
                      case 3:
                          return token === 67 || token === 73;
                      case 5:
                          return isStartOfTypeMember();
                      case 6:
                          return lookAhead(isClassMemberStart) || (token === 22 && !inErrorRecovery);
                      case 7:
                          return token === 18 || isLiteralPropertyName();
                      case 13:
                          return token === 18 || token === 35 || isLiteralPropertyName();
                      case 10:
                          return isLiteralPropertyName();
                      case 8:
                          if (token === 14) {
                              return lookAhead(isValidHeritageClauseObjectLiteral);
                          }
                          if (!inErrorRecovery) {
                              return isStartOfLeftHandSideExpression() && !isHeritageClauseExtendsOrImplementsKeyword();
                          }
                          else {
                              return isIdentifier() && !isHeritageClauseExtendsOrImplementsKeyword();
                          }
                      case 9:
                          return isIdentifierOrPattern();
                      case 11:
                          return token === 23 || token === 21 || isIdentifierOrPattern();
                      case 16:
                          return isIdentifier();
                      case 12:
                      case 14:
                          return token === 23 || token === 21 || isStartOfExpression();
                      case 15:
                          return isStartOfParameter();
                      case 17:
                      case 18:
                          return token === 23 || isStartOfType();
                      case 19:
                          return isHeritageClause();
                      case 20:
                          return isIdentifierOrKeyword();
                  }
                  ts.Debug.fail("Non-exhaustive case in 'isListElement'.");
              }
              function isValidHeritageClauseObjectLiteral() {
                  ts.Debug.assert(token === 14);
                  if (nextToken() === 15) {
                      var next = nextToken();
                      return next === 23 || next === 14 || next === 79 || next === 102;
                  }
                  return true;
              }
              function nextTokenIsIdentifier() {
                  nextToken();
                  return isIdentifier();
              }
              function isHeritageClauseExtendsOrImplementsKeyword() {
                  if (token === 102 ||
                      token === 79) {
                      return lookAhead(nextTokenIsStartOfExpression);
                  }
                  return false;
              }
              function nextTokenIsStartOfExpression() {
                  nextToken();
                  return isStartOfExpression();
              }
              function isListTerminator(kind) {
                  if (token === 1) {
                      return true;
                  }
                  switch (kind) {
                      case 1:
                      case 2:
                      case 3:
                      case 5:
                      case 6:
                      case 7:
                      case 13:
                      case 10:
                      case 20:
                          return token === 15;
                      case 4:
                          return token === 15 || token === 67 || token === 73;
                      case 8:
                          return token === 14 || token === 79 || token === 102;
                      case 9:
                          return isVariableDeclaratorListTerminator();
                      case 16:
                          return token === 25 || token === 16 || token === 14 || token === 79 || token === 102;
                      case 12:
                          return token === 17 || token === 22;
                      case 14:
                      case 18:
                      case 11:
                          return token === 19;
                      case 15:
                          return token === 17 || token === 19;
                      case 17:
                          return token === 25 || token === 16;
                      case 19:
                          return token === 14 || token === 15;
                  }
              }
              function isVariableDeclaratorListTerminator() {
                  if (canParseSemicolon()) {
                      return true;
                  }
                  if (isInOrOfKeyword(token)) {
                      return true;
                  }
                  if (token === 32) {
                      return true;
                  }
                  return false;
              }
              function isInSomeParsingContext() {
                  for (var kind = 0; kind < 21; kind++) {
                      if (parsingContext & (1 << kind)) {
                          if (isListElement(kind, true) || isListTerminator(kind)) {
                              return true;
                          }
                      }
                  }
                  return false;
              }
              function parseList(kind, checkForStrictMode, parseElement) {
                  var saveParsingContext = parsingContext;
                  parsingContext |= 1 << kind;
                  var result = [];
                  result.pos = getNodePos();
                  var savedStrictModeContext = inStrictModeContext();
                  while (!isListTerminator(kind)) {
                      if (isListElement(kind, false)) {
                          var element = parseListElement(kind, parseElement);
                          result.push(element);
                          if (checkForStrictMode && !inStrictModeContext()) {
                              if (ts.isPrologueDirective(element)) {
                                  if (isUseStrictPrologueDirective(sourceFile, element)) {
                                      setStrictModeContext(true);
                                      checkForStrictMode = false;
                                  }
                              }
                              else {
                                  checkForStrictMode = false;
                              }
                          }
                          continue;
                      }
                      if (abortParsingListOrMoveToNextToken(kind)) {
                          break;
                      }
                  }
                  setStrictModeContext(savedStrictModeContext);
                  result.end = getNodeEnd();
                  parsingContext = saveParsingContext;
                  return result;
              }
              function isUseStrictPrologueDirective(sourceFile, node) {
                  ts.Debug.assert(ts.isPrologueDirective(node));
                  var nodeText = ts.getSourceTextOfNodeFromSourceFile(sourceFile, node.expression);
                  return nodeText === '"use strict"' || nodeText === "'use strict'";
              }
              function parseListElement(parsingContext, parseElement) {
                  var node = currentNode(parsingContext);
                  if (node) {
                      return consumeNode(node);
                  }
                  return parseElement();
              }
              function currentNode(parsingContext) {
                  if (parseErrorBeforeNextFinishedNode) {
                      return undefined;
                  }
                  if (!syntaxCursor) {
                      return undefined;
                  }
                  var node = syntaxCursor.currentNode(scanner.getStartPos());
                  if (ts.nodeIsMissing(node)) {
                      return undefined;
                  }
                  if (node.intersectsChange) {
                      return undefined;
                  }
                  if (ts.containsParseError(node)) {
                      return undefined;
                  }
                  var nodeContextFlags = node.parserContextFlags & 63;
                  if (nodeContextFlags !== contextFlags) {
                      return undefined;
                  }
                  if (!canReuseNode(node, parsingContext)) {
                      return undefined;
                  }
                  return node;
              }
              function consumeNode(node) {
                  scanner.setTextPos(node.end);
                  nextToken();
                  return node;
              }
              function canReuseNode(node, parsingContext) {
                  switch (parsingContext) {
                      case 1:
                          return isReusableModuleElement(node);
                      case 6:
                          return isReusableClassMember(node);
                      case 3:
                          return isReusableSwitchClause(node);
                      case 2:
                      case 4:
                          return isReusableStatement(node);
                      case 7:
                          return isReusableEnumMember(node);
                      case 5:
                          return isReusableTypeMember(node);
                      case 9:
                          return isReusableVariableDeclaration(node);
                      case 15:
                          return isReusableParameter(node);
                      case 19:
                      case 16:
                      case 18:
                      case 17:
                      case 12:
                      case 13:
                      case 8:
                  }
                  return false;
              }
              function isReusableModuleElement(node) {
                  if (node) {
                      switch (node.kind) {
                          case 210:
                          case 209:
                          case 216:
                          case 215:
                          case 202:
                          case 203:
                          case 206:
                          case 205:
                              return true;
                      }
                      return isReusableStatement(node);
                  }
                  return false;
              }
              function isReusableClassMember(node) {
                  if (node) {
                      switch (node.kind) {
                          case 136:
                          case 141:
                          case 135:
                          case 137:
                          case 138:
                          case 133:
                          case 179:
                              return true;
                      }
                  }
                  return false;
              }
              function isReusableSwitchClause(node) {
                  if (node) {
                      switch (node.kind) {
                          case 221:
                          case 222:
                              return true;
                      }
                  }
                  return false;
              }
              function isReusableStatement(node) {
                  if (node) {
                      switch (node.kind) {
                          case 201:
                          case 181:
                          case 180:
                          case 184:
                          case 183:
                          case 196:
                          case 192:
                          case 194:
                          case 191:
                          case 190:
                          case 188:
                          case 189:
                          case 187:
                          case 186:
                          case 193:
                          case 182:
                          case 197:
                          case 195:
                          case 185:
                          case 198:
                              return true;
                      }
                  }
                  return false;
              }
              function isReusableEnumMember(node) {
                  return node.kind === 227;
              }
              function isReusableTypeMember(node) {
                  if (node) {
                      switch (node.kind) {
                          case 140:
                          case 134:
                          case 141:
                          case 132:
                          case 139:
                              return true;
                      }
                  }
                  return false;
              }
              function isReusableVariableDeclaration(node) {
                  if (node.kind !== 199) {
                      return false;
                  }
                  var variableDeclarator = node;
                  return variableDeclarator.initializer === undefined;
              }
              function isReusableParameter(node) {
                  if (node.kind !== 130) {
                      return false;
                  }
                  var parameter = node;
                  return parameter.initializer === undefined;
              }
              function abortParsingListOrMoveToNextToken(kind) {
                  parseErrorAtCurrentToken(parsingContextErrors(kind));
                  if (isInSomeParsingContext()) {
                      return true;
                  }
                  nextToken();
                  return false;
              }
              function parsingContextErrors(context) {
                  switch (context) {
                      case 0: return ts.Diagnostics.Declaration_or_statement_expected;
                      case 1: return ts.Diagnostics.Declaration_or_statement_expected;
                      case 2: return ts.Diagnostics.Statement_expected;
                      case 3: return ts.Diagnostics.case_or_default_expected;
                      case 4: return ts.Diagnostics.Statement_expected;
                      case 5: return ts.Diagnostics.Property_or_signature_expected;
                      case 6: return ts.Diagnostics.Unexpected_token_A_constructor_method_accessor_or_property_was_expected;
                      case 7: return ts.Diagnostics.Enum_member_expected;
                      case 8: return ts.Diagnostics.Expression_expected;
                      case 9: return ts.Diagnostics.Variable_declaration_expected;
                      case 10: return ts.Diagnostics.Property_destructuring_pattern_expected;
                      case 11: return ts.Diagnostics.Array_element_destructuring_pattern_expected;
                      case 12: return ts.Diagnostics.Argument_expression_expected;
                      case 13: return ts.Diagnostics.Property_assignment_expected;
                      case 14: return ts.Diagnostics.Expression_or_comma_expected;
                      case 15: return ts.Diagnostics.Parameter_declaration_expected;
                      case 16: return ts.Diagnostics.Type_parameter_declaration_expected;
                      case 17: return ts.Diagnostics.Type_argument_expected;
                      case 18: return ts.Diagnostics.Type_expected;
                      case 19: return ts.Diagnostics.Unexpected_token_expected;
                      case 20: return ts.Diagnostics.Identifier_expected;
                  }
              }
              ;
              function parseDelimitedList(kind, parseElement, considerSemicolonAsDelimeter) {
                  var saveParsingContext = parsingContext;
                  parsingContext |= 1 << kind;
                  var result = [];
                  result.pos = getNodePos();
                  var commaStart = -1;
                  while (true) {
                      if (isListElement(kind, false)) {
                          result.push(parseListElement(kind, parseElement));
                          commaStart = scanner.getTokenPos();
                          if (parseOptional(23)) {
                              continue;
                          }
                          commaStart = -1;
                          if (isListTerminator(kind)) {
                              break;
                          }
                          parseExpected(23);
                          if (considerSemicolonAsDelimeter && token === 22 && !scanner.hasPrecedingLineBreak()) {
                              nextToken();
                          }
                          continue;
                      }
                      if (isListTerminator(kind)) {
                          break;
                      }
                      if (abortParsingListOrMoveToNextToken(kind)) {
                          break;
                      }
                  }
                  if (commaStart >= 0) {
                      result.hasTrailingComma = true;
                  }
                  result.end = getNodeEnd();
                  parsingContext = saveParsingContext;
                  return result;
              }
              function createMissingList() {
                  var pos = getNodePos();
                  var result = [];
                  result.pos = pos;
                  result.end = pos;
                  return result;
              }
              function parseBracketedList(kind, parseElement, open, close) {
                  if (parseExpected(open)) {
                      var result = parseDelimitedList(kind, parseElement);
                      parseExpected(close);
                      return result;
                  }
                  return createMissingList();
              }
              function parseEntityName(allowReservedWords, diagnosticMessage) {
                  var entity = parseIdentifier(diagnosticMessage);
                  while (parseOptional(20)) {
                      var node = createNode(127, entity.pos);
                      node.left = entity;
                      node.right = parseRightSideOfDot(allowReservedWords);
                      entity = finishNode(node);
                  }
                  return entity;
              }
              function parseRightSideOfDot(allowIdentifierNames) {
                  if (scanner.hasPrecedingLineBreak() && scanner.isReservedWord()) {
                      var matchesPattern = lookAhead(nextTokenIsIdentifierOrKeywordOnSameLine);
                      if (matchesPattern) {
                          return createMissingNode(65, true, ts.Diagnostics.Identifier_expected);
                      }
                  }
                  return allowIdentifierNames ? parseIdentifierName() : parseIdentifier();
              }
              function parseTemplateExpression() {
                  var template = createNode(172);
                  template.head = parseLiteralNode();
                  ts.Debug.assert(template.head.kind === 11, "Template head has wrong token kind");
                  var templateSpans = [];
                  templateSpans.pos = getNodePos();
                  do {
                      templateSpans.push(parseTemplateSpan());
                  } while (ts.lastOrUndefined(templateSpans).literal.kind === 12);
                  templateSpans.end = getNodeEnd();
                  template.templateSpans = templateSpans;
                  return finishNode(template);
              }
              function parseTemplateSpan() {
                  var span = createNode(178);
                  span.expression = allowInAnd(parseExpression);
                  var literal;
                  if (token === 15) {
                      reScanTemplateToken();
                      literal = parseLiteralNode();
                  }
                  else {
                      literal = parseExpectedToken(13, false, ts.Diagnostics._0_expected, ts.tokenToString(15));
                  }
                  span.literal = literal;
                  return finishNode(span);
              }
              function parseLiteralNode(internName) {
                  var node = createNode(token);
                  var text = scanner.getTokenValue();
                  node.text = internName ? internIdentifier(text) : text;
                  if (scanner.hasExtendedUnicodeEscape()) {
                      node.hasExtendedUnicodeEscape = true;
                  }
                  if (scanner.isUnterminated()) {
                      node.isUnterminated = true;
                  }
                  var tokenPos = scanner.getTokenPos();
                  nextToken();
                  finishNode(node);
                  if (node.kind === 7
                      && sourceText.charCodeAt(tokenPos) === 48
                      && ts.isOctalDigit(sourceText.charCodeAt(tokenPos + 1))) {
                      node.flags |= 16384;
                  }
                  return node;
              }
              function parseTypeReference() {
                  var node = createNode(142);
                  node.typeName = parseEntityName(false, ts.Diagnostics.Type_expected);
                  if (!scanner.hasPrecedingLineBreak() && token === 24) {
                      node.typeArguments = parseBracketedList(17, parseType, 24, 25);
                  }
                  return finishNode(node);
              }
              function parseTypeQuery() {
                  var node = createNode(145);
                  parseExpected(97);
                  node.exprName = parseEntityName(true);
                  return finishNode(node);
              }
              function parseTypeParameter() {
                  var node = createNode(129);
                  node.name = parseIdentifier();
                  if (parseOptional(79)) {
                      if (isStartOfType() || !isStartOfExpression()) {
                          node.constraint = parseType();
                      }
                      else {
                          node.expression = parseUnaryExpressionOrHigher();
                      }
                  }
                  return finishNode(node);
              }
              function parseTypeParameters() {
                  if (token === 24) {
                      return parseBracketedList(16, parseTypeParameter, 24, 25);
                  }
              }
              function parseParameterType() {
                  if (parseOptional(51)) {
                      return token === 8
                          ? parseLiteralNode(true)
                          : parseType();
                  }
                  return undefined;
              }
              function isStartOfParameter() {
                  return token === 21 || isIdentifierOrPattern() || ts.isModifier(token) || token === 52;
              }
              function setModifiers(node, modifiers) {
                  if (modifiers) {
                      node.flags |= modifiers.flags;
                      node.modifiers = modifiers;
                  }
              }
              function parseParameter() {
                  var node = createNode(130);
                  node.decorators = parseDecorators();
                  setModifiers(node, parseModifiers());
                  node.dotDotDotToken = parseOptionalToken(21);
                  node.name = inGeneratorParameterContext() ? doInYieldContext(parseIdentifierOrPattern) : parseIdentifierOrPattern();
                  if (ts.getFullWidth(node.name) === 0 && node.flags === 0 && ts.isModifier(token)) {
                      nextToken();
                  }
                  node.questionToken = parseOptionalToken(50);
                  node.type = parseParameterType();
                  node.initializer = inGeneratorParameterContext() ? doOutsideOfYieldContext(parseParameterInitializer) : parseParameterInitializer();
                  return finishNode(node);
              }
              function parseParameterInitializer() {
                  return parseInitializer(true);
              }
              function fillSignature(returnToken, yieldAndGeneratorParameterContext, requireCompleteParameterList, signature) {
                  var returnTokenRequired = returnToken === 32;
                  signature.typeParameters = parseTypeParameters();
                  signature.parameters = parseParameterList(yieldAndGeneratorParameterContext, requireCompleteParameterList);
                  if (returnTokenRequired) {
                      parseExpected(returnToken);
                      signature.type = parseType();
                  }
                  else if (parseOptional(returnToken)) {
                      signature.type = parseType();
                  }
              }
              function parseParameterList(yieldAndGeneratorParameterContext, requireCompleteParameterList) {
                  if (parseExpected(16)) {
                      var savedYieldContext = inYieldContext();
                      var savedGeneratorParameterContext = inGeneratorParameterContext();
                      setYieldContext(yieldAndGeneratorParameterContext);
                      setGeneratorParameterContext(yieldAndGeneratorParameterContext);
                      var result = parseDelimitedList(15, parseParameter);
                      setYieldContext(savedYieldContext);
                      setGeneratorParameterContext(savedGeneratorParameterContext);
                      if (!parseExpected(17) && requireCompleteParameterList) {
                          return undefined;
                      }
                      return result;
                  }
                  return requireCompleteParameterList ? undefined : createMissingList();
              }
              function parseTypeMemberSemicolon() {
                  if (parseOptional(23)) {
                      return;
                  }
                  parseSemicolon();
              }
              function parseSignatureMember(kind) {
                  var node = createNode(kind);
                  if (kind === 140) {
                      parseExpected(88);
                  }
                  fillSignature(51, false, false, node);
                  parseTypeMemberSemicolon();
                  return finishNode(node);
              }
              function isIndexSignature() {
                  if (token !== 18) {
                      return false;
                  }
                  return lookAhead(isUnambiguouslyIndexSignature);
              }
              function isUnambiguouslyIndexSignature() {
                  nextToken();
                  if (token === 21 || token === 19) {
                      return true;
                  }
                  if (ts.isModifier(token)) {
                      nextToken();
                      if (isIdentifier()) {
                          return true;
                      }
                  }
                  else if (!isIdentifier()) {
                      return false;
                  }
                  else {
                      nextToken();
                  }
                  if (token === 51 || token === 23) {
                      return true;
                  }
                  if (token !== 50) {
                      return false;
                  }
                  nextToken();
                  return token === 51 || token === 23 || token === 19;
              }
              function parseIndexSignatureDeclaration(fullStart, decorators, modifiers) {
                  var node = createNode(141, fullStart);
                  node.decorators = decorators;
                  setModifiers(node, modifiers);
                  node.parameters = parseBracketedList(15, parseParameter, 18, 19);
                  node.type = parseTypeAnnotation();
                  parseTypeMemberSemicolon();
                  return finishNode(node);
              }
              function parsePropertyOrMethodSignature() {
                  var fullStart = scanner.getStartPos();
                  var name = parsePropertyName();
                  var questionToken = parseOptionalToken(50);
                  if (token === 16 || token === 24) {
                      var method = createNode(134, fullStart);
                      method.name = name;
                      method.questionToken = questionToken;
                      fillSignature(51, false, false, method);
                      parseTypeMemberSemicolon();
                      return finishNode(method);
                  }
                  else {
                      var property = createNode(132, fullStart);
                      property.name = name;
                      property.questionToken = questionToken;
                      property.type = parseTypeAnnotation();
                      parseTypeMemberSemicolon();
                      return finishNode(property);
                  }
              }
              function isStartOfTypeMember() {
                  switch (token) {
                      case 16:
                      case 24:
                      case 18:
                          return true;
                      default:
                          if (ts.isModifier(token)) {
                              var result = lookAhead(isStartOfIndexSignatureDeclaration);
                              if (result) {
                                  return result;
                              }
                          }
                          return isLiteralPropertyName() && lookAhead(isTypeMemberWithLiteralPropertyName);
                  }
              }
              function isStartOfIndexSignatureDeclaration() {
                  while (ts.isModifier(token)) {
                      nextToken();
                  }
                  return isIndexSignature();
              }
              function isTypeMemberWithLiteralPropertyName() {
                  nextToken();
                  return token === 16 ||
                      token === 24 ||
                      token === 50 ||
                      token === 51 ||
                      canParseSemicolon();
              }
              function parseTypeMember() {
                  switch (token) {
                      case 16:
                      case 24:
                          return parseSignatureMember(139);
                      case 18:
                          return isIndexSignature()
                              ? parseIndexSignatureDeclaration(scanner.getStartPos(), undefined, undefined)
                              : parsePropertyOrMethodSignature();
                      case 88:
                          if (lookAhead(isStartOfConstructSignature)) {
                              return parseSignatureMember(140);
                          }
                      case 8:
                      case 7:
                          return parsePropertyOrMethodSignature();
                      default:
                          if (ts.isModifier(token)) {
                              var result = tryParse(parseIndexSignatureWithModifiers);
                              if (result) {
                                  return result;
                              }
                          }
                          if (isIdentifierOrKeyword()) {
                              return parsePropertyOrMethodSignature();
                          }
                  }
              }
              function parseIndexSignatureWithModifiers() {
                  var fullStart = scanner.getStartPos();
                  var decorators = parseDecorators();
                  var modifiers = parseModifiers();
                  return isIndexSignature()
                      ? parseIndexSignatureDeclaration(fullStart, decorators, modifiers)
                      : undefined;
              }
              function isStartOfConstructSignature() {
                  nextToken();
                  return token === 16 || token === 24;
              }
              function parseTypeLiteral() {
                  var node = createNode(146);
                  node.members = parseObjectTypeMembers();
                  return finishNode(node);
              }
              function parseObjectTypeMembers() {
                  var members;
                  if (parseExpected(14)) {
                      members = parseList(5, false, parseTypeMember);
                      parseExpected(15);
                  }
                  else {
                      members = createMissingList();
                  }
                  return members;
              }
              function parseTupleType() {
                  var node = createNode(148);
                  node.elementTypes = parseBracketedList(18, parseType, 18, 19);
                  return finishNode(node);
              }
              function parseParenthesizedType() {
                  var node = createNode(150);
                  parseExpected(16);
                  node.type = parseType();
                  parseExpected(17);
                  return finishNode(node);
              }
              function parseFunctionOrConstructorType(kind) {
                  var node = createNode(kind);
                  if (kind === 144) {
                      parseExpected(88);
                  }
                  fillSignature(32, false, false, node);
                  return finishNode(node);
              }
              function parseKeywordAndNoDot() {
                  var node = parseTokenNode();
                  return token === 20 ? undefined : node;
              }
              function parseNonArrayType() {
                  switch (token) {
                      case 112:
                      case 122:
                      case 120:
                      case 113:
                      case 123:
                          var node = tryParse(parseKeywordAndNoDot);
                          return node || parseTypeReference();
                      case 99:
                          return parseTokenNode();
                      case 97:
                          return parseTypeQuery();
                      case 14:
                          return parseTypeLiteral();
                      case 18:
                          return parseTupleType();
                      case 16:
                          return parseParenthesizedType();
                      default:
                          return parseTypeReference();
                  }
              }
              function isStartOfType() {
                  switch (token) {
                      case 112:
                      case 122:
                      case 120:
                      case 113:
                      case 123:
                      case 99:
                      case 97:
                      case 14:
                      case 18:
                      case 24:
                      case 88:
                          return true;
                      case 16:
                          return lookAhead(isStartOfParenthesizedOrFunctionType);
                      default:
                          return isIdentifier();
                  }
              }
              function isStartOfParenthesizedOrFunctionType() {
                  nextToken();
                  return token === 17 || isStartOfParameter() || isStartOfType();
              }
              function parseArrayTypeOrHigher() {
                  var type = parseNonArrayType();
                  while (!scanner.hasPrecedingLineBreak() && parseOptional(18)) {
                      parseExpected(19);
                      var node = createNode(147, type.pos);
                      node.elementType = type;
                      type = finishNode(node);
                  }
                  return type;
              }
              function parseUnionTypeOrHigher() {
                  var type = parseArrayTypeOrHigher();
                  if (token === 44) {
                      var types = [type];
                      types.pos = type.pos;
                      while (parseOptional(44)) {
                          types.push(parseArrayTypeOrHigher());
                      }
                      types.end = getNodeEnd();
                      var node = createNode(149, type.pos);
                      node.types = types;
                      type = finishNode(node);
                  }
                  return type;
              }
              function isStartOfFunctionType() {
                  if (token === 24) {
                      return true;
                  }
                  return token === 16 && lookAhead(isUnambiguouslyStartOfFunctionType);
              }
              function isUnambiguouslyStartOfFunctionType() {
                  nextToken();
                  if (token === 17 || token === 21) {
                      return true;
                  }
                  if (isIdentifier() || ts.isModifier(token)) {
                      nextToken();
                      if (token === 51 || token === 23 ||
                          token === 50 || token === 53 ||
                          isIdentifier() || ts.isModifier(token)) {
                          return true;
                      }
                      if (token === 17) {
                          nextToken();
                          if (token === 32) {
                              return true;
                          }
                      }
                  }
                  return false;
              }
              function parseType() {
                  var savedYieldContext = inYieldContext();
                  var savedGeneratorParameterContext = inGeneratorParameterContext();
                  setYieldContext(false);
                  setGeneratorParameterContext(false);
                  var result = parseTypeWorker();
                  setYieldContext(savedYieldContext);
                  setGeneratorParameterContext(savedGeneratorParameterContext);
                  return result;
              }
              function parseTypeWorker() {
                  if (isStartOfFunctionType()) {
                      return parseFunctionOrConstructorType(143);
                  }
                  if (token === 88) {
                      return parseFunctionOrConstructorType(144);
                  }
                  return parseUnionTypeOrHigher();
              }
              function parseTypeAnnotation() {
                  return parseOptional(51) ? parseType() : undefined;
              }
              function isStartOfLeftHandSideExpression() {
                  switch (token) {
                      case 93:
                      case 91:
                      case 89:
                      case 95:
                      case 80:
                      case 7:
                      case 8:
                      case 10:
                      case 11:
                      case 16:
                      case 18:
                      case 14:
                      case 83:
                      case 69:
                      case 88:
                      case 36:
                      case 57:
                      case 65:
                          return true;
                      default:
                          return isIdentifier();
                  }
              }
              function isStartOfExpression() {
                  if (isStartOfLeftHandSideExpression()) {
                      return true;
                  }
                  switch (token) {
                      case 33:
                      case 34:
                      case 47:
                      case 46:
                      case 74:
                      case 97:
                      case 99:
                      case 38:
                      case 39:
                      case 24:
                      case 110:
                          return true;
                      default:
                          if (isBinaryOperator()) {
                              return true;
                          }
                          return isIdentifier();
                  }
              }
              function isStartOfExpressionStatement() {
                  return token !== 14 &&
                      token !== 83 &&
                      token !== 69 &&
                      token !== 52 &&
                      isStartOfExpression();
              }
              function parseExpression() {
                  // Expression[in]:
                  //      AssignmentExpression[in]
                  //      Expression[in] , AssignmentExpression[in]
                  var saveDecoratorContext = inDecoratorContext();
                  if (saveDecoratorContext) {
                      setDecoratorContext(false);
                  }
                  var expr = parseAssignmentExpressionOrHigher();
                  var operatorToken;
                  while ((operatorToken = parseOptionalToken(23))) {
                      expr = makeBinaryExpression(expr, operatorToken, parseAssignmentExpressionOrHigher());
                  }
                  if (saveDecoratorContext) {
                      setDecoratorContext(true);
                  }
                  return expr;
              }
              function parseInitializer(inParameter) {
                  if (token !== 53) {
                      if (scanner.hasPrecedingLineBreak() || (inParameter && token === 14) || !isStartOfExpression()) {
                          return undefined;
                      }
                  }
                  parseExpected(53);
                  return parseAssignmentExpressionOrHigher();
              }
              function parseAssignmentExpressionOrHigher() {
                  //  AssignmentExpression[in,yield]:
                  //      1) ConditionalExpression[?in,?yield]
                  //      2) LeftHandSideExpression = AssignmentExpression[?in,?yield]
                  //      3) LeftHandSideExpression AssignmentOperator AssignmentExpression[?in,?yield]
                  //      4) ArrowFunctionExpression[?in,?yield]
                  //      5) [+Yield] YieldExpression[?In]
                  //
                  // Note: for ease of implementation we treat productions '2' and '3' as the same thing.
                  // (i.e. they're both BinaryExpressions with an assignment operator in it).
                  if (isYieldExpression()) {
                      return parseYieldExpression();
                  }
                  var arrowExpression = tryParseParenthesizedArrowFunctionExpression();
                  if (arrowExpression) {
                      return arrowExpression;
                  }
                  var expr = parseBinaryExpressionOrHigher(0);
                  if (expr.kind === 65 && token === 32) {
                      return parseSimpleArrowFunctionExpression(expr);
                  }
                  if (ts.isLeftHandSideExpression(expr) && ts.isAssignmentOperator(reScanGreaterToken())) {
                      return makeBinaryExpression(expr, parseTokenNode(), parseAssignmentExpressionOrHigher());
                  }
                  return parseConditionalExpressionRest(expr);
              }
              function isYieldExpression() {
                  if (token === 110) {
                      if (inYieldContext()) {
                          return true;
                      }
                      if (inStrictModeContext()) {
                          return true;
                      }
                      return lookAhead(nextTokenIsIdentifierOnSameLine);
                  }
                  return false;
              }
              function nextTokenIsIdentifierOnSameLine() {
                  nextToken();
                  return !scanner.hasPrecedingLineBreak() && isIdentifier();
              }
              function nextTokenIsIdentifierOrStartOfDestructuringOnTheSameLine() {
                  nextToken();
                  return !scanner.hasPrecedingLineBreak() &&
                      (isIdentifier() || token === 14 || token === 18);
              }
              function parseYieldExpression() {
                  var node = createNode(173);
                  nextToken();
                  if (!scanner.hasPrecedingLineBreak() &&
                      (token === 35 || isStartOfExpression())) {
                      node.asteriskToken = parseOptionalToken(35);
                      node.expression = parseAssignmentExpressionOrHigher();
                      return finishNode(node);
                  }
                  else {
                      return finishNode(node);
                  }
              }
              function parseSimpleArrowFunctionExpression(identifier) {
                  ts.Debug.assert(token === 32, "parseSimpleArrowFunctionExpression should only have been called if we had a =>");
                  var node = createNode(164, identifier.pos);
                  var parameter = createNode(130, identifier.pos);
                  parameter.name = identifier;
                  finishNode(parameter);
                  node.parameters = [parameter];
                  node.parameters.pos = parameter.pos;
                  node.parameters.end = parameter.end;
                  node.equalsGreaterThanToken = parseExpectedToken(32, false, ts.Diagnostics._0_expected, "=>");
                  node.body = parseArrowFunctionExpressionBody();
                  return finishNode(node);
              }
              function tryParseParenthesizedArrowFunctionExpression() {
                  var triState = isParenthesizedArrowFunctionExpression();
                  if (triState === 0) {
                      return undefined;
                  }
                  var arrowFunction = triState === 1
                      ? parseParenthesizedArrowFunctionExpressionHead(true)
                      : tryParse(parsePossibleParenthesizedArrowFunctionExpressionHead);
                  if (!arrowFunction) {
                      return undefined;
                  }
                  var lastToken = token;
                  arrowFunction.equalsGreaterThanToken = parseExpectedToken(32, false, ts.Diagnostics._0_expected, "=>");
                  arrowFunction.body = (lastToken === 32 || lastToken === 14)
                      ? parseArrowFunctionExpressionBody()
                      : parseIdentifier();
                  return finishNode(arrowFunction);
              }
              function isParenthesizedArrowFunctionExpression() {
                  if (token === 16 || token === 24) {
                      return lookAhead(isParenthesizedArrowFunctionExpressionWorker);
                  }
                  if (token === 32) {
                      return 1;
                  }
                  return 0;
              }
              function isParenthesizedArrowFunctionExpressionWorker() {
                  var first = token;
                  var second = nextToken();
                  if (first === 16) {
                      if (second === 17) {
                          var third = nextToken();
                          switch (third) {
                              case 32:
                              case 51:
                              case 14:
                                  return 1;
                              default:
                                  return 0;
                          }
                      }
                      if (second === 18 || second === 14) {
                          return 2;
                      }
                      if (second === 21) {
                          return 1;
                      }
                      if (!isIdentifier()) {
                          return 0;
                      }
                      if (nextToken() === 51) {
                          return 1;
                      }
                      return 2;
                  }
                  else {
                      ts.Debug.assert(first === 24);
                      if (!isIdentifier()) {
                          return 0;
                      }
                      return 2;
                  }
              }
              function parsePossibleParenthesizedArrowFunctionExpressionHead() {
                  return parseParenthesizedArrowFunctionExpressionHead(false);
              }
              function parseParenthesizedArrowFunctionExpressionHead(allowAmbiguity) {
                  var node = createNode(164);
                  fillSignature(51, false, !allowAmbiguity, node);
                  if (!node.parameters) {
                      return undefined;
                  }
                  if (!allowAmbiguity && token !== 32 && token !== 14) {
                      return undefined;
                  }
                  return node;
              }
              function parseArrowFunctionExpressionBody() {
                  if (token === 14) {
                      return parseFunctionBlock(false, false);
                  }
                  if (isStartOfStatement(true) &&
                      !isStartOfExpressionStatement() &&
                      token !== 83 &&
                      token !== 69) {
                      return parseFunctionBlock(false, true);
                  }
                  return parseAssignmentExpressionOrHigher();
              }
              function parseConditionalExpressionRest(leftOperand) {
                  var questionToken = parseOptionalToken(50);
                  if (!questionToken) {
                      return leftOperand;
                  }
                  var node = createNode(171, leftOperand.pos);
                  node.condition = leftOperand;
                  node.questionToken = questionToken;
                  node.whenTrue = doOutsideOfContext(disallowInAndDecoratorContext, parseAssignmentExpressionOrHigher);
                  node.colonToken = parseExpectedToken(51, false, ts.Diagnostics._0_expected, ts.tokenToString(51));
                  node.whenFalse = parseAssignmentExpressionOrHigher();
                  return finishNode(node);
              }
              function parseBinaryExpressionOrHigher(precedence) {
                  var leftOperand = parseUnaryExpressionOrHigher();
                  return parseBinaryExpressionRest(precedence, leftOperand);
              }
              function isInOrOfKeyword(t) {
                  return t === 86 || t === 126;
              }
              function parseBinaryExpressionRest(precedence, leftOperand) {
                  while (true) {
                      reScanGreaterToken();
                      var newPrecedence = getBinaryOperatorPrecedence();
                      if (newPrecedence <= precedence) {
                          break;
                      }
                      if (token === 86 && inDisallowInContext()) {
                          break;
                      }
                      leftOperand = makeBinaryExpression(leftOperand, parseTokenNode(), parseBinaryExpressionOrHigher(newPrecedence));
                  }
                  return leftOperand;
              }
              function isBinaryOperator() {
                  if (inDisallowInContext() && token === 86) {
                      return false;
                  }
                  return getBinaryOperatorPrecedence() > 0;
              }
              function getBinaryOperatorPrecedence() {
                  switch (token) {
                      case 49:
                          return 1;
                      case 48:
                          return 2;
                      case 44:
                          return 3;
                      case 45:
                          return 4;
                      case 43:
                          return 5;
                      case 28:
                      case 29:
                      case 30:
                      case 31:
                          return 6;
                      case 24:
                      case 25:
                      case 26:
                      case 27:
                      case 87:
                      case 86:
                          return 7;
                      case 40:
                      case 41:
                      case 42:
                          return 8;
                      case 33:
                      case 34:
                          return 9;
                      case 35:
                      case 36:
                      case 37:
                          return 10;
                  }
                  return -1;
              }
              function makeBinaryExpression(left, operatorToken, right) {
                  var node = createNode(170, left.pos);
                  node.left = left;
                  node.operatorToken = operatorToken;
                  node.right = right;
                  return finishNode(node);
              }
              function parsePrefixUnaryExpression() {
                  var node = createNode(168);
                  node.operator = token;
                  nextToken();
                  node.operand = parseUnaryExpressionOrHigher();
                  return finishNode(node);
              }
              function parseDeleteExpression() {
                  var node = createNode(165);
                  nextToken();
                  node.expression = parseUnaryExpressionOrHigher();
                  return finishNode(node);
              }
              function parseTypeOfExpression() {
                  var node = createNode(166);
                  nextToken();
                  node.expression = parseUnaryExpressionOrHigher();
                  return finishNode(node);
              }
              function parseVoidExpression() {
                  var node = createNode(167);
                  nextToken();
                  node.expression = parseUnaryExpressionOrHigher();
                  return finishNode(node);
              }
              function parseUnaryExpressionOrHigher() {
                  switch (token) {
                      case 33:
                      case 34:
                      case 47:
                      case 46:
                      case 38:
                      case 39:
                          return parsePrefixUnaryExpression();
                      case 74:
                          return parseDeleteExpression();
                      case 97:
                          return parseTypeOfExpression();
                      case 99:
                          return parseVoidExpression();
                      case 24:
                          return parseTypeAssertion();
                      default:
                          return parsePostfixExpressionOrHigher();
                  }
              }
              function parsePostfixExpressionOrHigher() {
                  var expression = parseLeftHandSideExpressionOrHigher();
                  ts.Debug.assert(ts.isLeftHandSideExpression(expression));
                  if ((token === 38 || token === 39) && !scanner.hasPrecedingLineBreak()) {
                      var node = createNode(169, expression.pos);
                      node.operand = expression;
                      node.operator = token;
                      nextToken();
                      return finishNode(node);
                  }
                  return expression;
              }
              function parseLeftHandSideExpressionOrHigher() {
                  var expression = token === 91
                      ? parseSuperExpression()
                      : parseMemberExpressionOrHigher();
                  return parseCallExpressionRest(expression);
              }
              function parseMemberExpressionOrHigher() {
                  var expression = parsePrimaryExpression();
                  return parseMemberExpressionRest(expression);
              }
              function parseSuperExpression() {
                  var expression = parseTokenNode();
                  if (token === 16 || token === 20) {
                      return expression;
                  }
                  var node = createNode(156, expression.pos);
                  node.expression = expression;
                  node.dotToken = parseExpectedToken(20, false, ts.Diagnostics.super_must_be_followed_by_an_argument_list_or_member_access);
                  node.name = parseRightSideOfDot(true);
                  return finishNode(node);
              }
              function parseTypeAssertion() {
                  var node = createNode(161);
                  parseExpected(24);
                  node.type = parseType();
                  parseExpected(25);
                  node.expression = parseUnaryExpressionOrHigher();
                  return finishNode(node);
              }
              function parseMemberExpressionRest(expression) {
                  while (true) {
                      var dotToken = parseOptionalToken(20);
                      if (dotToken) {
                          var propertyAccess = createNode(156, expression.pos);
                          propertyAccess.expression = expression;
                          propertyAccess.dotToken = dotToken;
                          propertyAccess.name = parseRightSideOfDot(true);
                          expression = finishNode(propertyAccess);
                          continue;
                      }
                      if (!inDecoratorContext() && parseOptional(18)) {
                          var indexedAccess = createNode(157, expression.pos);
                          indexedAccess.expression = expression;
                          if (token !== 19) {
                              indexedAccess.argumentExpression = allowInAnd(parseExpression);
                              if (indexedAccess.argumentExpression.kind === 8 || indexedAccess.argumentExpression.kind === 7) {
                                  var literal = indexedAccess.argumentExpression;
                                  literal.text = internIdentifier(literal.text);
                              }
                          }
                          parseExpected(19);
                          expression = finishNode(indexedAccess);
                          continue;
                      }
                      if (token === 10 || token === 11) {
                          var tagExpression = createNode(160, expression.pos);
                          tagExpression.tag = expression;
                          tagExpression.template = token === 10
                              ? parseLiteralNode()
                              : parseTemplateExpression();
                          expression = finishNode(tagExpression);
                          continue;
                      }
                      return expression;
                  }
              }
              function parseCallExpressionRest(expression) {
                  while (true) {
                      expression = parseMemberExpressionRest(expression);
                      if (token === 24) {
                          var typeArguments = tryParse(parseTypeArgumentsInExpression);
                          if (!typeArguments) {
                              return expression;
                          }
                          var callExpr = createNode(158, expression.pos);
                          callExpr.expression = expression;
                          callExpr.typeArguments = typeArguments;
                          callExpr.arguments = parseArgumentList();
                          expression = finishNode(callExpr);
                          continue;
                      }
                      else if (token === 16) {
                          var callExpr = createNode(158, expression.pos);
                          callExpr.expression = expression;
                          callExpr.arguments = parseArgumentList();
                          expression = finishNode(callExpr);
                          continue;
                      }
                      return expression;
                  }
              }
              function parseArgumentList() {
                  parseExpected(16);
                  var result = parseDelimitedList(12, parseArgumentExpression);
                  parseExpected(17);
                  return result;
              }
              function parseTypeArgumentsInExpression() {
                  if (!parseOptional(24)) {
                      return undefined;
                  }
                  var typeArguments = parseDelimitedList(17, parseType);
                  if (!parseExpected(25)) {
                      return undefined;
                  }
                  return typeArguments && canFollowTypeArgumentsInExpression()
                      ? typeArguments
                      : undefined;
              }
              function canFollowTypeArgumentsInExpression() {
                  switch (token) {
                      case 16:
                      case 20:
                      case 17:
                      case 19:
                      case 51:
                      case 22:
                      case 50:
                      case 28:
                      case 30:
                      case 29:
                      case 31:
                      case 48:
                      case 49:
                      case 45:
                      case 43:
                      case 44:
                      case 15:
                      case 1:
                          return true;
                      case 23:
                      case 14:
                      default:
                          return false;
                  }
              }
              function parsePrimaryExpression() {
                  switch (token) {
                      case 7:
                      case 8:
                      case 10:
                          return parseLiteralNode();
                      case 93:
                      case 91:
                      case 89:
                      case 95:
                      case 80:
                          return parseTokenNode();
                      case 16:
                          return parseParenthesizedExpression();
                      case 18:
                          return parseArrayLiteralExpression();
                      case 14:
                          return parseObjectLiteralExpression();
                      case 69:
                          return parseClassExpression();
                      case 83:
                          return parseFunctionExpression();
                      case 88:
                          return parseNewExpression();
                      case 36:
                      case 57:
                          if (reScanSlashToken() === 9) {
                              return parseLiteralNode();
                          }
                          break;
                      case 11:
                          return parseTemplateExpression();
                  }
                  return parseIdentifier(ts.Diagnostics.Expression_expected);
              }
              function parseParenthesizedExpression() {
                  var node = createNode(162);
                  parseExpected(16);
                  node.expression = allowInAnd(parseExpression);
                  parseExpected(17);
                  return finishNode(node);
              }
              function parseSpreadElement() {
                  var node = createNode(174);
                  parseExpected(21);
                  node.expression = parseAssignmentExpressionOrHigher();
                  return finishNode(node);
              }
              function parseArgumentOrArrayLiteralElement() {
                  return token === 21 ? parseSpreadElement() :
                      token === 23 ? createNode(176) :
                          parseAssignmentExpressionOrHigher();
              }
              function parseArgumentExpression() {
                  return doOutsideOfContext(disallowInAndDecoratorContext, parseArgumentOrArrayLiteralElement);
              }
              function parseArrayLiteralExpression() {
                  var node = createNode(154);
                  parseExpected(18);
                  if (scanner.hasPrecedingLineBreak())
                      node.flags |= 512;
                  node.elements = parseDelimitedList(14, parseArgumentOrArrayLiteralElement);
                  parseExpected(19);
                  return finishNode(node);
              }
              function tryParseAccessorDeclaration(fullStart, decorators, modifiers) {
                  if (parseContextualModifier(116)) {
                      return parseAccessorDeclaration(137, fullStart, decorators, modifiers);
                  }
                  else if (parseContextualModifier(121)) {
                      return parseAccessorDeclaration(138, fullStart, decorators, modifiers);
                  }
                  return undefined;
              }
              function parseObjectLiteralElement() {
                  var fullStart = scanner.getStartPos();
                  var decorators = parseDecorators();
                  var modifiers = parseModifiers();
                  var accessor = tryParseAccessorDeclaration(fullStart, decorators, modifiers);
                  if (accessor) {
                      return accessor;
                  }
                  var asteriskToken = parseOptionalToken(35);
                  var tokenIsIdentifier = isIdentifier();
                  var nameToken = token;
                  var propertyName = parsePropertyName();
                  var questionToken = parseOptionalToken(50);
                  if (asteriskToken || token === 16 || token === 24) {
                      return parseMethodDeclaration(fullStart, decorators, modifiers, asteriskToken, propertyName, questionToken);
                  }
                  if ((token === 23 || token === 15) && tokenIsIdentifier) {
                      var shorthandDeclaration = createNode(226, fullStart);
                      shorthandDeclaration.name = propertyName;
                      shorthandDeclaration.questionToken = questionToken;
                      return finishNode(shorthandDeclaration);
                  }
                  else {
                      var propertyAssignment = createNode(225, fullStart);
                      propertyAssignment.name = propertyName;
                      propertyAssignment.questionToken = questionToken;
                      parseExpected(51);
                      propertyAssignment.initializer = allowInAnd(parseAssignmentExpressionOrHigher);
                      return finishNode(propertyAssignment);
                  }
              }
              function parseObjectLiteralExpression() {
                  var node = createNode(155);
                  parseExpected(14);
                  if (scanner.hasPrecedingLineBreak()) {
                      node.flags |= 512;
                  }
                  node.properties = parseDelimitedList(13, parseObjectLiteralElement, true);
                  parseExpected(15);
                  return finishNode(node);
              }
              function parseFunctionExpression() {
                  var saveDecoratorContext = inDecoratorContext();
                  if (saveDecoratorContext) {
                      setDecoratorContext(false);
                  }
                  var node = createNode(163);
                  parseExpected(83);
                  node.asteriskToken = parseOptionalToken(35);
                  node.name = node.asteriskToken ? doInYieldContext(parseOptionalIdentifier) : parseOptionalIdentifier();
                  fillSignature(51, !!node.asteriskToken, false, node);
                  node.body = parseFunctionBlock(!!node.asteriskToken, false);
                  if (saveDecoratorContext) {
                      setDecoratorContext(true);
                  }
                  return finishNode(node);
              }
              function parseOptionalIdentifier() {
                  return isIdentifier() ? parseIdentifier() : undefined;
              }
              function parseNewExpression() {
                  var node = createNode(159);
                  parseExpected(88);
                  node.expression = parseMemberExpressionOrHigher();
                  node.typeArguments = tryParse(parseTypeArgumentsInExpression);
                  if (node.typeArguments || token === 16) {
                      node.arguments = parseArgumentList();
                  }
                  return finishNode(node);
              }
              function parseBlock(ignoreMissingOpenBrace, checkForStrictMode, diagnosticMessage) {
                  var node = createNode(180);
                  if (parseExpected(14, diagnosticMessage) || ignoreMissingOpenBrace) {
                      node.statements = parseList(2, checkForStrictMode, parseStatement);
                      parseExpected(15);
                  }
                  else {
                      node.statements = createMissingList();
                  }
                  return finishNode(node);
              }
              function parseFunctionBlock(allowYield, ignoreMissingOpenBrace, diagnosticMessage) {
                  var savedYieldContext = inYieldContext();
                  setYieldContext(allowYield);
                  var saveDecoratorContext = inDecoratorContext();
                  if (saveDecoratorContext) {
                      setDecoratorContext(false);
                  }
                  var block = parseBlock(ignoreMissingOpenBrace, true, diagnosticMessage);
                  if (saveDecoratorContext) {
                      setDecoratorContext(true);
                  }
                  setYieldContext(savedYieldContext);
                  return block;
              }
              function parseEmptyStatement() {
                  var node = createNode(182);
                  parseExpected(22);
                  return finishNode(node);
              }
              function parseIfStatement() {
                  var node = createNode(184);
                  parseExpected(84);
                  parseExpected(16);
                  node.expression = allowInAnd(parseExpression);
                  parseExpected(17);
                  node.thenStatement = parseStatement();
                  node.elseStatement = parseOptional(76) ? parseStatement() : undefined;
                  return finishNode(node);
              }
              function parseDoStatement() {
                  var node = createNode(185);
                  parseExpected(75);
                  node.statement = parseStatement();
                  parseExpected(100);
                  parseExpected(16);
                  node.expression = allowInAnd(parseExpression);
                  parseExpected(17);
                  parseOptional(22);
                  return finishNode(node);
              }
              function parseWhileStatement() {
                  var node = createNode(186);
                  parseExpected(100);
                  parseExpected(16);
                  node.expression = allowInAnd(parseExpression);
                  parseExpected(17);
                  node.statement = parseStatement();
                  return finishNode(node);
              }
              function parseForOrForInOrForOfStatement() {
                  var pos = getNodePos();
                  parseExpected(82);
                  parseExpected(16);
                  var initializer = undefined;
                  if (token !== 22) {
                      if (token === 98 || token === 104 || token === 70) {
                          initializer = parseVariableDeclarationList(true);
                      }
                      else {
                          initializer = disallowInAnd(parseExpression);
                      }
                  }
                  var forOrForInOrForOfStatement;
                  if (parseOptional(86)) {
                      var forInStatement = createNode(188, pos);
                      forInStatement.initializer = initializer;
                      forInStatement.expression = allowInAnd(parseExpression);
                      parseExpected(17);
                      forOrForInOrForOfStatement = forInStatement;
                  }
                  else if (parseOptional(126)) {
                      var forOfStatement = createNode(189, pos);
                      forOfStatement.initializer = initializer;
                      forOfStatement.expression = allowInAnd(parseAssignmentExpressionOrHigher);
                      parseExpected(17);
                      forOrForInOrForOfStatement = forOfStatement;
                  }
                  else {
                      var forStatement = createNode(187, pos);
                      forStatement.initializer = initializer;
                      parseExpected(22);
                      if (token !== 22 && token !== 17) {
                          forStatement.condition = allowInAnd(parseExpression);
                      }
                      parseExpected(22);
                      if (token !== 17) {
                          forStatement.incrementor = allowInAnd(parseExpression);
                      }
                      parseExpected(17);
                      forOrForInOrForOfStatement = forStatement;
                  }
                  forOrForInOrForOfStatement.statement = parseStatement();
                  return finishNode(forOrForInOrForOfStatement);
              }
              function parseBreakOrContinueStatement(kind) {
                  var node = createNode(kind);
                  parseExpected(kind === 191 ? 66 : 71);
                  if (!canParseSemicolon()) {
                      node.label = parseIdentifier();
                  }
                  parseSemicolon();
                  return finishNode(node);
              }
              function parseReturnStatement() {
                  var node = createNode(192);
                  parseExpected(90);
                  if (!canParseSemicolon()) {
                      node.expression = allowInAnd(parseExpression);
                  }
                  parseSemicolon();
                  return finishNode(node);
              }
              function parseWithStatement() {
                  var node = createNode(193);
                  parseExpected(101);
                  parseExpected(16);
                  node.expression = allowInAnd(parseExpression);
                  parseExpected(17);
                  node.statement = parseStatement();
                  return finishNode(node);
              }
              function parseCaseClause() {
                  var node = createNode(221);
                  parseExpected(67);
                  node.expression = allowInAnd(parseExpression);
                  parseExpected(51);
                  node.statements = parseList(4, false, parseStatement);
                  return finishNode(node);
              }
              function parseDefaultClause() {
                  var node = createNode(222);
                  parseExpected(73);
                  parseExpected(51);
                  node.statements = parseList(4, false, parseStatement);
                  return finishNode(node);
              }
              function parseCaseOrDefaultClause() {
                  return token === 67 ? parseCaseClause() : parseDefaultClause();
              }
              function parseSwitchStatement() {
                  var node = createNode(194);
                  parseExpected(92);
                  parseExpected(16);
                  node.expression = allowInAnd(parseExpression);
                  parseExpected(17);
                  var caseBlock = createNode(208, scanner.getStartPos());
                  parseExpected(14);
                  caseBlock.clauses = parseList(3, false, parseCaseOrDefaultClause);
                  parseExpected(15);
                  node.caseBlock = finishNode(caseBlock);
                  return finishNode(node);
              }
              function parseThrowStatement() {
                  // ThrowStatement[Yield] :
                  //      throw [no LineTerminator here]Expression[In, ?Yield];
                  var node = createNode(196);
                  parseExpected(94);
                  node.expression = scanner.hasPrecedingLineBreak() ? undefined : allowInAnd(parseExpression);
                  parseSemicolon();
                  return finishNode(node);
              }
              function parseTryStatement() {
                  var node = createNode(197);
                  parseExpected(96);
                  node.tryBlock = parseBlock(false, false);
                  node.catchClause = token === 68 ? parseCatchClause() : undefined;
                  if (!node.catchClause || token === 81) {
                      parseExpected(81);
                      node.finallyBlock = parseBlock(false, false);
                  }
                  return finishNode(node);
              }
              function parseCatchClause() {
                  var result = createNode(224);
                  parseExpected(68);
                  if (parseExpected(16)) {
                      result.variableDeclaration = parseVariableDeclaration();
                  }
                  parseExpected(17);
                  result.block = parseBlock(false, false);
                  return finishNode(result);
              }
              function parseDebuggerStatement() {
                  var node = createNode(198);
                  parseExpected(72);
                  parseSemicolon();
                  return finishNode(node);
              }
              function parseExpressionOrLabeledStatement() {
                  var fullStart = scanner.getStartPos();
                  var expression = allowInAnd(parseExpression);
                  if (expression.kind === 65 && parseOptional(51)) {
                      var labeledStatement = createNode(195, fullStart);
                      labeledStatement.label = expression;
                      labeledStatement.statement = parseStatement();
                      return finishNode(labeledStatement);
                  }
                  else {
                      var expressionStatement = createNode(183, fullStart);
                      expressionStatement.expression = expression;
                      parseSemicolon();
                      return finishNode(expressionStatement);
                  }
              }
              function isStartOfStatement(inErrorRecovery) {
                  if (ts.isModifier(token)) {
                      var result = lookAhead(parseVariableStatementOrFunctionDeclarationOrClassDeclarationWithDecoratorsOrModifiers);
                      if (result) {
                          return true;
                      }
                  }
                  switch (token) {
                      case 22:
                          return !inErrorRecovery;
                      case 14:
                      case 98:
                      case 104:
                      case 83:
                      case 69:
                      case 84:
                      case 75:
                      case 100:
                      case 82:
                      case 71:
                      case 66:
                      case 90:
                      case 101:
                      case 92:
                      case 94:
                      case 96:
                      case 72:
                      case 68:
                      case 81:
                          return true;
                      case 70:
                          var isConstEnum = lookAhead(nextTokenIsEnumKeyword);
                          return !isConstEnum;
                      case 103:
                      case 117:
                      case 118:
                      case 77:
                      case 124:
                          if (isDeclarationStart()) {
                              return false;
                          }
                      case 108:
                      case 106:
                      case 107:
                      case 109:
                          if (lookAhead(nextTokenIsIdentifierOrKeywordOnSameLine)) {
                              return false;
                          }
                      default:
                          return isStartOfExpression();
                  }
              }
              function nextTokenIsEnumKeyword() {
                  nextToken();
                  return token === 77;
              }
              function nextTokenIsIdentifierOrKeywordOnSameLine() {
                  nextToken();
                  return isIdentifierOrKeyword() && !scanner.hasPrecedingLineBreak();
              }
              function parseStatement() {
                  switch (token) {
                      case 14:
                          return parseBlock(false, false);
                      case 98:
                      case 70:
                          return parseVariableStatement(scanner.getStartPos(), undefined, undefined);
                      case 83:
                          return parseFunctionDeclaration(scanner.getStartPos(), undefined, undefined);
                      case 69:
                          return parseClassDeclaration(scanner.getStartPos(), undefined, undefined);
                      case 22:
                          return parseEmptyStatement();
                      case 84:
                          return parseIfStatement();
                      case 75:
                          return parseDoStatement();
                      case 100:
                          return parseWhileStatement();
                      case 82:
                          return parseForOrForInOrForOfStatement();
                      case 71:
                          return parseBreakOrContinueStatement(190);
                      case 66:
                          return parseBreakOrContinueStatement(191);
                      case 90:
                          return parseReturnStatement();
                      case 101:
                          return parseWithStatement();
                      case 92:
                          return parseSwitchStatement();
                      case 94:
                          return parseThrowStatement();
                      case 96:
                      case 68:
                      case 81:
                          return parseTryStatement();
                      case 72:
                          return parseDebuggerStatement();
                      case 104:
                          if (isLetDeclaration()) {
                              return parseVariableStatement(scanner.getStartPos(), undefined, undefined);
                          }
                      default:
                          if (ts.isModifier(token) || token === 52) {
                              var result = tryParse(parseVariableStatementOrFunctionDeclarationOrClassDeclarationWithDecoratorsOrModifiers);
                              if (result) {
                                  return result;
                              }
                          }
                          return parseExpressionOrLabeledStatement();
                  }
              }
              function parseVariableStatementOrFunctionDeclarationOrClassDeclarationWithDecoratorsOrModifiers() {
                  var start = scanner.getStartPos();
                  var decorators = parseDecorators();
                  var modifiers = parseModifiers();
                  switch (token) {
                      case 70:
                          var nextTokenIsEnum = lookAhead(nextTokenIsEnumKeyword);
                          if (nextTokenIsEnum) {
                              return undefined;
                          }
                          return parseVariableStatement(start, decorators, modifiers);
                      case 104:
                          if (!isLetDeclaration()) {
                              return undefined;
                          }
                          return parseVariableStatement(start, decorators, modifiers);
                      case 98:
                          return parseVariableStatement(start, decorators, modifiers);
                      case 83:
                          return parseFunctionDeclaration(start, decorators, modifiers);
                      case 69:
                          return parseClassDeclaration(start, decorators, modifiers);
                  }
                  return undefined;
              }
              function parseFunctionBlockOrSemicolon(isGenerator, diagnosticMessage) {
                  if (token !== 14 && canParseSemicolon()) {
                      parseSemicolon();
                      return;
                  }
                  return parseFunctionBlock(isGenerator, false, diagnosticMessage);
              }
              function parseArrayBindingElement() {
                  if (token === 23) {
                      return createNode(176);
                  }
                  var node = createNode(153);
                  node.dotDotDotToken = parseOptionalToken(21);
                  node.name = parseIdentifierOrPattern();
                  node.initializer = parseInitializer(false);
                  return finishNode(node);
              }
              function parseObjectBindingElement() {
                  var node = createNode(153);
                  var tokenIsIdentifier = isIdentifier();
                  var propertyName = parsePropertyName();
                  if (tokenIsIdentifier && token !== 51) {
                      node.name = propertyName;
                  }
                  else {
                      parseExpected(51);
                      node.propertyName = propertyName;
                      node.name = parseIdentifierOrPattern();
                  }
                  node.initializer = parseInitializer(false);
                  return finishNode(node);
              }
              function parseObjectBindingPattern() {
                  var node = createNode(151);
                  parseExpected(14);
                  node.elements = parseDelimitedList(10, parseObjectBindingElement);
                  parseExpected(15);
                  return finishNode(node);
              }
              function parseArrayBindingPattern() {
                  var node = createNode(152);
                  parseExpected(18);
                  node.elements = parseDelimitedList(11, parseArrayBindingElement);
                  parseExpected(19);
                  return finishNode(node);
              }
              function isIdentifierOrPattern() {
                  return token === 14 || token === 18 || isIdentifier();
              }
              function parseIdentifierOrPattern() {
                  if (token === 18) {
                      return parseArrayBindingPattern();
                  }
                  if (token === 14) {
                      return parseObjectBindingPattern();
                  }
                  return parseIdentifier();
              }
              function parseVariableDeclaration() {
                  var node = createNode(199);
                  node.name = parseIdentifierOrPattern();
                  node.type = parseTypeAnnotation();
                  if (!isInOrOfKeyword(token)) {
                      node.initializer = parseInitializer(false);
                  }
                  return finishNode(node);
              }
              function parseVariableDeclarationList(inForStatementInitializer) {
                  var node = createNode(200);
                  switch (token) {
                      case 98:
                          break;
                      case 104:
                          node.flags |= 4096;
                          break;
                      case 70:
                          node.flags |= 8192;
                          break;
                      default:
                          ts.Debug.fail();
                  }
                  nextToken();
                  if (token === 126 && lookAhead(canFollowContextualOfKeyword)) {
                      node.declarations = createMissingList();
                  }
                  else {
                      var savedDisallowIn = inDisallowInContext();
                      setDisallowInContext(inForStatementInitializer);
                      node.declarations = parseDelimitedList(9, parseVariableDeclaration);
                      setDisallowInContext(savedDisallowIn);
                  }
                  return finishNode(node);
              }
              function canFollowContextualOfKeyword() {
                  return nextTokenIsIdentifier() && nextToken() === 17;
              }
              function parseVariableStatement(fullStart, decorators, modifiers) {
                  var node = createNode(181, fullStart);
                  node.decorators = decorators;
                  setModifiers(node, modifiers);
                  node.declarationList = parseVariableDeclarationList(false);
                  parseSemicolon();
                  return finishNode(node);
              }
              function parseFunctionDeclaration(fullStart, decorators, modifiers) {
                  var node = createNode(201, fullStart);
                  node.decorators = decorators;
                  setModifiers(node, modifiers);
                  parseExpected(83);
                  node.asteriskToken = parseOptionalToken(35);
                  node.name = node.flags & 256 ? parseOptionalIdentifier() : parseIdentifier();
                  fillSignature(51, !!node.asteriskToken, false, node);
                  node.body = parseFunctionBlockOrSemicolon(!!node.asteriskToken, ts.Diagnostics.or_expected);
                  return finishNode(node);
              }
              function parseConstructorDeclaration(pos, decorators, modifiers) {
                  var node = createNode(136, pos);
                  node.decorators = decorators;
                  setModifiers(node, modifiers);
                  parseExpected(114);
                  fillSignature(51, false, false, node);
                  node.body = parseFunctionBlockOrSemicolon(false, ts.Diagnostics.or_expected);
                  return finishNode(node);
              }
              function parseMethodDeclaration(fullStart, decorators, modifiers, asteriskToken, name, questionToken, diagnosticMessage) {
                  var method = createNode(135, fullStart);
                  method.decorators = decorators;
                  setModifiers(method, modifiers);
                  method.asteriskToken = asteriskToken;
                  method.name = name;
                  method.questionToken = questionToken;
                  fillSignature(51, !!asteriskToken, false, method);
                  method.body = parseFunctionBlockOrSemicolon(!!asteriskToken, diagnosticMessage);
                  return finishNode(method);
              }
              function parsePropertyDeclaration(fullStart, decorators, modifiers, name, questionToken) {
                  var property = createNode(133, fullStart);
                  property.decorators = decorators;
                  setModifiers(property, modifiers);
                  property.name = name;
                  property.questionToken = questionToken;
                  property.type = parseTypeAnnotation();
                  property.initializer = allowInAnd(parseNonParameterInitializer);
                  parseSemicolon();
                  return finishNode(property);
              }
              function parsePropertyOrMethodDeclaration(fullStart, decorators, modifiers) {
                  var asteriskToken = parseOptionalToken(35);
                  var name = parsePropertyName();
                  var questionToken = parseOptionalToken(50);
                  if (asteriskToken || token === 16 || token === 24) {
                      return parseMethodDeclaration(fullStart, decorators, modifiers, asteriskToken, name, questionToken, ts.Diagnostics.or_expected);
                  }
                  else {
                      return parsePropertyDeclaration(fullStart, decorators, modifiers, name, questionToken);
                  }
              }
              function parseNonParameterInitializer() {
                  return parseInitializer(false);
              }
              function parseAccessorDeclaration(kind, fullStart, decorators, modifiers) {
                  var node = createNode(kind, fullStart);
                  node.decorators = decorators;
                  setModifiers(node, modifiers);
                  node.name = parsePropertyName();
                  fillSignature(51, false, false, node);
                  node.body = parseFunctionBlockOrSemicolon(false);
                  return finishNode(node);
              }
              function isClassMemberModifier(idToken) {
                  switch (idToken) {
                      case 108:
                      case 106:
                      case 107:
                      case 109:
                          return true;
                      default:
                          return false;
                  }
              }
              function isClassMemberStart() {
                  var idToken;
                  if (token === 52) {
                      return true;
                  }
                  while (ts.isModifier(token)) {
                      idToken = token;
                      if (isClassMemberModifier(idToken)) {
                          return true;
                      }
                      nextToken();
                  }
                  if (token === 35) {
                      return true;
                  }
                  if (isLiteralPropertyName()) {
                      idToken = token;
                      nextToken();
                  }
                  if (token === 18) {
                      return true;
                  }
                  if (idToken !== undefined) {
                      if (!ts.isKeyword(idToken) || idToken === 121 || idToken === 116) {
                          return true;
                      }
                      switch (token) {
                          case 16:
                          case 24:
                          case 51:
                          case 53:
                          case 50:
                              return true;
                          default:
                              return canParseSemicolon();
                      }
                  }
                  return false;
              }
              function parseDecorators() {
                  var decorators;
                  while (true) {
                      var decoratorStart = getNodePos();
                      if (!parseOptional(52)) {
                          break;
                      }
                      if (!decorators) {
                          decorators = [];
                          decorators.pos = scanner.getStartPos();
                      }
                      var decorator = createNode(131, decoratorStart);
                      decorator.expression = doInDecoratorContext(parseLeftHandSideExpressionOrHigher);
                      decorators.push(finishNode(decorator));
                  }
                  if (decorators) {
                      decorators.end = getNodeEnd();
                  }
                  return decorators;
              }
              function parseModifiers() {
                  var flags = 0;
                  var modifiers;
                  while (true) {
                      var modifierStart = scanner.getStartPos();
                      var modifierKind = token;
                      if (!parseAnyContextualModifier()) {
                          break;
                      }
                      if (!modifiers) {
                          modifiers = [];
                          modifiers.pos = modifierStart;
                      }
                      flags |= ts.modifierToFlag(modifierKind);
                      modifiers.push(finishNode(createNode(modifierKind, modifierStart)));
                  }
                  if (modifiers) {
                      modifiers.flags = flags;
                      modifiers.end = scanner.getStartPos();
                  }
                  return modifiers;
              }
              function parseClassElement() {
                  if (token === 22) {
                      var result = createNode(179);
                      nextToken();
                      return finishNode(result);
                  }
                  var fullStart = getNodePos();
                  var decorators = parseDecorators();
                  var modifiers = parseModifiers();
                  var accessor = tryParseAccessorDeclaration(fullStart, decorators, modifiers);
                  if (accessor) {
                      return accessor;
                  }
                  if (token === 114) {
                      return parseConstructorDeclaration(fullStart, decorators, modifiers);
                  }
                  if (isIndexSignature()) {
                      return parseIndexSignatureDeclaration(fullStart, decorators, modifiers);
                  }
                  if (isIdentifierOrKeyword() ||
                      token === 8 ||
                      token === 7 ||
                      token === 35 ||
                      token === 18) {
                      return parsePropertyOrMethodDeclaration(fullStart, decorators, modifiers);
                  }
                  if (decorators) {
                      var name_3 = createMissingNode(65, true, ts.Diagnostics.Declaration_expected);
                      return parsePropertyDeclaration(fullStart, decorators, modifiers, name_3, undefined);
                  }
                  ts.Debug.fail("Should not have attempted to parse class member declaration.");
              }
              function parseClassExpression() {
                  return parseClassDeclarationOrExpression(scanner.getStartPos(), undefined, undefined, 175);
              }
              function parseClassDeclaration(fullStart, decorators, modifiers) {
                  return parseClassDeclarationOrExpression(fullStart, decorators, modifiers, 202);
              }
              function parseClassDeclarationOrExpression(fullStart, decorators, modifiers, kind) {
                  var savedStrictModeContext = inStrictModeContext();
                  setStrictModeContext(true);
                  var node = createNode(kind, fullStart);
                  node.decorators = decorators;
                  setModifiers(node, modifiers);
                  parseExpected(69);
                  node.name = parseOptionalIdentifier();
                  node.typeParameters = parseTypeParameters();
                  node.heritageClauses = parseHeritageClauses(true);
                  if (parseExpected(14)) {
                      node.members = inGeneratorParameterContext()
                          ? doOutsideOfYieldContext(parseClassMembers)
                          : parseClassMembers();
                      parseExpected(15);
                  }
                  else {
                      node.members = createMissingList();
                  }
                  var finishedNode = finishNode(node);
                  setStrictModeContext(savedStrictModeContext);
                  return finishedNode;
              }
              function parseHeritageClauses(isClassHeritageClause) {
                  // ClassTail[Yield,GeneratorParameter] : See 14.5
                  //      [~GeneratorParameter]ClassHeritage[?Yield]opt { ClassBody[?Yield]opt }
                  //      [+GeneratorParameter] ClassHeritageopt { ClassBodyopt }
                  if (isHeritageClause()) {
                      return isClassHeritageClause && inGeneratorParameterContext()
                          ? doOutsideOfYieldContext(parseHeritageClausesWorker)
                          : parseHeritageClausesWorker();
                  }
                  return undefined;
              }
              function parseHeritageClausesWorker() {
                  return parseList(19, false, parseHeritageClause);
              }
              function parseHeritageClause() {
                  if (token === 79 || token === 102) {
                      var node = createNode(223);
                      node.token = token;
                      nextToken();
                      node.types = parseDelimitedList(8, parseExpressionWithTypeArguments);
                      return finishNode(node);
                  }
                  return undefined;
              }
              function parseExpressionWithTypeArguments() {
                  var node = createNode(177);
                  node.expression = parseLeftHandSideExpressionOrHigher();
                  if (token === 24) {
                      node.typeArguments = parseBracketedList(17, parseType, 24, 25);
                  }
                  return finishNode(node);
              }
              function isHeritageClause() {
                  return token === 79 || token === 102;
              }
              function parseClassMembers() {
                  return parseList(6, false, parseClassElement);
              }
              function parseInterfaceDeclaration(fullStart, decorators, modifiers) {
                  var node = createNode(203, fullStart);
                  node.decorators = decorators;
                  setModifiers(node, modifiers);
                  parseExpected(103);
                  node.name = parseIdentifier();
                  node.typeParameters = parseTypeParameters();
                  node.heritageClauses = parseHeritageClauses(false);
                  node.members = parseObjectTypeMembers();
                  return finishNode(node);
              }
              function parseTypeAliasDeclaration(fullStart, decorators, modifiers) {
                  var node = createNode(204, fullStart);
                  node.decorators = decorators;
                  setModifiers(node, modifiers);
                  parseExpected(124);
                  node.name = parseIdentifier();
                  parseExpected(53);
                  node.type = parseType();
                  parseSemicolon();
                  return finishNode(node);
              }
              function parseEnumMember() {
                  var node = createNode(227, scanner.getStartPos());
                  node.name = parsePropertyName();
                  node.initializer = allowInAnd(parseNonParameterInitializer);
                  return finishNode(node);
              }
              function parseEnumDeclaration(fullStart, decorators, modifiers) {
                  var node = createNode(205, fullStart);
                  node.decorators = decorators;
                  setModifiers(node, modifiers);
                  parseExpected(77);
                  node.name = parseIdentifier();
                  if (parseExpected(14)) {
                      node.members = parseDelimitedList(7, parseEnumMember);
                      parseExpected(15);
                  }
                  else {
                      node.members = createMissingList();
                  }
                  return finishNode(node);
              }
              function parseModuleBlock() {
                  var node = createNode(207, scanner.getStartPos());
                  if (parseExpected(14)) {
                      node.statements = parseList(1, false, parseModuleElement);
                      parseExpected(15);
                  }
                  else {
                      node.statements = createMissingList();
                  }
                  return finishNode(node);
              }
              function parseModuleOrNamespaceDeclaration(fullStart, decorators, modifiers, flags) {
                  var node = createNode(206, fullStart);
                  node.decorators = decorators;
                  setModifiers(node, modifiers);
                  node.flags |= flags;
                  node.name = parseIdentifier();
                  node.body = parseOptional(20)
                      ? parseModuleOrNamespaceDeclaration(getNodePos(), undefined, undefined, 1)
                      : parseModuleBlock();
                  return finishNode(node);
              }
              function parseAmbientExternalModuleDeclaration(fullStart, decorators, modifiers) {
                  var node = createNode(206, fullStart);
                  node.decorators = decorators;
                  setModifiers(node, modifiers);
                  node.name = parseLiteralNode(true);
                  node.body = parseModuleBlock();
                  return finishNode(node);
              }
              function parseModuleDeclaration(fullStart, decorators, modifiers) {
                  var flags = modifiers ? modifiers.flags : 0;
                  if (parseOptional(118)) {
                      flags |= 32768;
                  }
                  else {
                      parseExpected(117);
                      if (token === 8) {
                          return parseAmbientExternalModuleDeclaration(fullStart, decorators, modifiers);
                      }
                  }
                  return parseModuleOrNamespaceDeclaration(fullStart, decorators, modifiers, flags);
              }
              function isExternalModuleReference() {
                  return token === 119 &&
                      lookAhead(nextTokenIsOpenParen);
              }
              function nextTokenIsOpenParen() {
                  return nextToken() === 16;
              }
              function nextTokenIsCommaOrFromKeyword() {
                  nextToken();
                  return token === 23 ||
                      token === 125;
              }
              function parseImportDeclarationOrImportEqualsDeclaration(fullStart, decorators, modifiers) {
                  parseExpected(85);
                  var afterImportPos = scanner.getStartPos();
                  var identifier;
                  if (isIdentifier()) {
                      identifier = parseIdentifier();
                      if (token !== 23 && token !== 125) {
                          var importEqualsDeclaration = createNode(209, fullStart);
                          importEqualsDeclaration.decorators = decorators;
                          setModifiers(importEqualsDeclaration, modifiers);
                          importEqualsDeclaration.name = identifier;
                          parseExpected(53);
                          importEqualsDeclaration.moduleReference = parseModuleReference();
                          parseSemicolon();
                          return finishNode(importEqualsDeclaration);
                      }
                  }
                  var importDeclaration = createNode(210, fullStart);
                  importDeclaration.decorators = decorators;
                  setModifiers(importDeclaration, modifiers);
                  if (identifier ||
                      token === 35 ||
                      token === 14) {
                      importDeclaration.importClause = parseImportClause(identifier, afterImportPos);
                      parseExpected(125);
                  }
                  importDeclaration.moduleSpecifier = parseModuleSpecifier();
                  parseSemicolon();
                  return finishNode(importDeclaration);
              }
              function parseImportClause(identifier, fullStart) {
                  //ImportClause:
                  //  ImportedDefaultBinding
                  //  NameSpaceImport
                  //  NamedImports
                  //  ImportedDefaultBinding, NameSpaceImport
                  //  ImportedDefaultBinding, NamedImports
                  var importClause = createNode(211, fullStart);
                  if (identifier) {
                      importClause.name = identifier;
                  }
                  if (!importClause.name ||
                      parseOptional(23)) {
                      importClause.namedBindings = token === 35 ? parseNamespaceImport() : parseNamedImportsOrExports(213);
                  }
                  return finishNode(importClause);
              }
              function parseModuleReference() {
                  return isExternalModuleReference()
                      ? parseExternalModuleReference()
                      : parseEntityName(false);
              }
              function parseExternalModuleReference() {
                  var node = createNode(220);
                  parseExpected(119);
                  parseExpected(16);
                  node.expression = parseModuleSpecifier();
                  parseExpected(17);
                  return finishNode(node);
              }
              function parseModuleSpecifier() {
                  var result = parseExpression();
                  if (result.kind === 8) {
                      internIdentifier(result.text);
                  }
                  return result;
              }
              function parseNamespaceImport() {
                  var namespaceImport = createNode(212);
                  parseExpected(35);
                  parseExpected(111);
                  namespaceImport.name = parseIdentifier();
                  return finishNode(namespaceImport);
              }
              function parseNamedImportsOrExports(kind) {
                  var node = createNode(kind);
                  node.elements = parseBracketedList(20, kind === 213 ? parseImportSpecifier : parseExportSpecifier, 14, 15);
                  return finishNode(node);
              }
              function parseExportSpecifier() {
                  return parseImportOrExportSpecifier(218);
              }
              function parseImportSpecifier() {
                  return parseImportOrExportSpecifier(214);
              }
              function parseImportOrExportSpecifier(kind) {
                  var node = createNode(kind);
                  var checkIdentifierIsKeyword = ts.isKeyword(token) && !isIdentifier();
                  var checkIdentifierStart = scanner.getTokenPos();
                  var checkIdentifierEnd = scanner.getTextPos();
                  var identifierName = parseIdentifierName();
                  if (token === 111) {
                      node.propertyName = identifierName;
                      parseExpected(111);
                      checkIdentifierIsKeyword = ts.isKeyword(token) && !isIdentifier();
                      checkIdentifierStart = scanner.getTokenPos();
                      checkIdentifierEnd = scanner.getTextPos();
                      node.name = parseIdentifierName();
                  }
                  else {
                      node.name = identifierName;
                  }
                  if (kind === 214 && checkIdentifierIsKeyword) {
                      parseErrorAtPosition(checkIdentifierStart, checkIdentifierEnd - checkIdentifierStart, ts.Diagnostics.Identifier_expected);
                  }
                  return finishNode(node);
              }
              function parseExportDeclaration(fullStart, decorators, modifiers) {
                  var node = createNode(216, fullStart);
                  node.decorators = decorators;
                  setModifiers(node, modifiers);
                  if (parseOptional(35)) {
                      parseExpected(125);
                      node.moduleSpecifier = parseModuleSpecifier();
                  }
                  else {
                      node.exportClause = parseNamedImportsOrExports(217);
                      if (parseOptional(125)) {
                          node.moduleSpecifier = parseModuleSpecifier();
                      }
                  }
                  parseSemicolon();
                  return finishNode(node);
              }
              function parseExportAssignment(fullStart, decorators, modifiers) {
                  var node = createNode(215, fullStart);
                  node.decorators = decorators;
                  setModifiers(node, modifiers);
                  if (parseOptional(53)) {
                      node.isExportEquals = true;
                  }
                  else {
                      parseExpected(73);
                  }
                  node.expression = parseAssignmentExpressionOrHigher();
                  parseSemicolon();
                  return finishNode(node);
              }
              function isLetDeclaration() {
                  return inStrictModeContext() || lookAhead(nextTokenIsIdentifierOrStartOfDestructuringOnTheSameLine);
              }
              function isDeclarationStart(followsModifier) {
                  switch (token) {
                      case 98:
                      case 70:
                      case 83:
                          return true;
                      case 104:
                          return isLetDeclaration();
                      case 69:
                      case 103:
                      case 77:
                      case 124:
                          return lookAhead(nextTokenIsIdentifierOrKeyword);
                      case 85:
                          return lookAhead(nextTokenCanFollowImportKeyword);
                      case 117:
                      case 118:
                          return lookAhead(nextTokenIsIdentifierOrKeywordOrStringLiteral);
                      case 78:
                          return lookAhead(nextTokenCanFollowExportKeyword);
                      case 115:
                      case 108:
                      case 106:
                      case 107:
                      case 109:
                          return lookAhead(nextTokenIsDeclarationStart);
                      case 52:
                          return !followsModifier;
                  }
              }
              function isIdentifierOrKeyword() {
                  return token >= 65;
              }
              function nextTokenIsIdentifierOrKeyword() {
                  nextToken();
                  return isIdentifierOrKeyword();
              }
              function nextTokenIsIdentifierOrKeywordOrStringLiteral() {
                  nextToken();
                  return isIdentifierOrKeyword() || token === 8;
              }
              function nextTokenCanFollowImportKeyword() {
                  nextToken();
                  return isIdentifierOrKeyword() || token === 8 ||
                      token === 35 || token === 14;
              }
              function nextTokenCanFollowExportKeyword() {
                  nextToken();
                  return token === 53 || token === 35 ||
                      token === 14 || token === 73 || isDeclarationStart(true);
              }
              function nextTokenIsDeclarationStart() {
                  nextToken();
                  return isDeclarationStart(true);
              }
              function nextTokenIsAsKeyword() {
                  return nextToken() === 111;
              }
              function parseDeclaration() {
                  var fullStart = getNodePos();
                  var decorators = parseDecorators();
                  var modifiers = parseModifiers();
                  if (token === 78) {
                      nextToken();
                      if (token === 73 || token === 53) {
                          return parseExportAssignment(fullStart, decorators, modifiers);
                      }
                      if (token === 35 || token === 14) {
                          return parseExportDeclaration(fullStart, decorators, modifiers);
                      }
                  }
                  switch (token) {
                      case 98:
                      case 104:
                      case 70:
                          return parseVariableStatement(fullStart, decorators, modifiers);
                      case 83:
                          return parseFunctionDeclaration(fullStart, decorators, modifiers);
                      case 69:
                          return parseClassDeclaration(fullStart, decorators, modifiers);
                      case 103:
                          return parseInterfaceDeclaration(fullStart, decorators, modifiers);
                      case 124:
                          return parseTypeAliasDeclaration(fullStart, decorators, modifiers);
                      case 77:
                          return parseEnumDeclaration(fullStart, decorators, modifiers);
                      case 117:
                      case 118:
                          return parseModuleDeclaration(fullStart, decorators, modifiers);
                      case 85:
                          return parseImportDeclarationOrImportEqualsDeclaration(fullStart, decorators, modifiers);
                      default:
                          if (decorators) {
                              var node = createMissingNode(219, true, ts.Diagnostics.Declaration_expected);
                              node.pos = fullStart;
                              node.decorators = decorators;
                              setModifiers(node, modifiers);
                              return finishNode(node);
                          }
                          ts.Debug.fail("Mismatch between isDeclarationStart and parseDeclaration");
                  }
              }
              function isSourceElement(inErrorRecovery) {
                  return isDeclarationStart() || isStartOfStatement(inErrorRecovery);
              }
              function parseSourceElement() {
                  return parseSourceElementOrModuleElement();
              }
              function parseModuleElement() {
                  return parseSourceElementOrModuleElement();
              }
              function parseSourceElementOrModuleElement() {
                  return isDeclarationStart()
                      ? parseDeclaration()
                      : parseStatement();
              }
              function processReferenceComments(sourceFile) {
                  var triviaScanner = ts.createScanner(sourceFile.languageVersion, false, sourceText);
                  var referencedFiles = [];
                  var amdDependencies = [];
                  var amdModuleName;
                  while (true) {
                      var kind = triviaScanner.scan();
                      if (kind === 5 || kind === 4 || kind === 3) {
                          continue;
                      }
                      if (kind !== 2) {
                          break;
                      }
                      var range = { pos: triviaScanner.getTokenPos(), end: triviaScanner.getTextPos(), kind: triviaScanner.getToken() };
                      var comment = sourceText.substring(range.pos, range.end);
                      var referencePathMatchResult = ts.getFileReferenceFromReferencePath(comment, range);
                      if (referencePathMatchResult) {
                          var fileReference = referencePathMatchResult.fileReference;
                          sourceFile.hasNoDefaultLib = referencePathMatchResult.isNoDefaultLib;
                          var diagnosticMessage = referencePathMatchResult.diagnosticMessage;
                          if (fileReference) {
                              referencedFiles.push(fileReference);
                          }
                          if (diagnosticMessage) {
                              sourceFile.parseDiagnostics.push(ts.createFileDiagnostic(sourceFile, range.pos, range.end - range.pos, diagnosticMessage));
                          }
                      }
                      else {
                          var amdModuleNameRegEx = /^\/\/\/\s*<amd-module\s+name\s*=\s*('|")(.+?)\1/gim;
                          var amdModuleNameMatchResult = amdModuleNameRegEx.exec(comment);
                          if (amdModuleNameMatchResult) {
                              if (amdModuleName) {
                                  sourceFile.parseDiagnostics.push(ts.createFileDiagnostic(sourceFile, range.pos, range.end - range.pos, ts.Diagnostics.An_AMD_module_cannot_have_multiple_name_assignments));
                              }
                              amdModuleName = amdModuleNameMatchResult[2];
                          }
                          var amdDependencyRegEx = /^\/\/\/\s*<amd-dependency\s/gim;
                          var pathRegex = /\spath\s*=\s*('|")(.+?)\1/gim;
                          var nameRegex = /\sname\s*=\s*('|")(.+?)\1/gim;
                          var amdDependencyMatchResult = amdDependencyRegEx.exec(comment);
                          if (amdDependencyMatchResult) {
                              var pathMatchResult = pathRegex.exec(comment);
                              var nameMatchResult = nameRegex.exec(comment);
                              if (pathMatchResult) {
                                  var amdDependency = { path: pathMatchResult[2], name: nameMatchResult ? nameMatchResult[2] : undefined };
                                  amdDependencies.push(amdDependency);
                              }
                          }
                      }
                  }
                  sourceFile.referencedFiles = referencedFiles;
                  sourceFile.amdDependencies = amdDependencies;
                  sourceFile.amdModuleName = amdModuleName;
              }
              function setExternalModuleIndicator(sourceFile) {
                  sourceFile.externalModuleIndicator = ts.forEach(sourceFile.statements, function (node) {
                      return node.flags & 1
                          || node.kind === 209 && node.moduleReference.kind === 220
                          || node.kind === 210
                          || node.kind === 215
                          || node.kind === 216
                          ? node
                          : undefined;
                  });
              }
          })(Parser || (Parser = {}));
          var IncrementalParser;
          (function (IncrementalParser) {
              function updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks) {
                  aggressiveChecks = aggressiveChecks || ts.Debug.shouldAssert(2);
                  checkChangeRange(sourceFile, newText, textChangeRange, aggressiveChecks);
                  if (ts.textChangeRangeIsUnchanged(textChangeRange)) {
                      return sourceFile;
                  }
                  if (sourceFile.statements.length === 0) {
                      return Parser.parseSourceFile(sourceFile.fileName, newText, sourceFile.languageVersion, undefined, true);
                  }
                  var incrementalSourceFile = sourceFile;
                  ts.Debug.assert(!incrementalSourceFile.hasBeenIncrementallyParsed);
                  incrementalSourceFile.hasBeenIncrementallyParsed = true;
                  var oldText = sourceFile.text;
                  var syntaxCursor = createSyntaxCursor(sourceFile);
                  var changeRange = extendToAffectedRange(sourceFile, textChangeRange);
                  checkChangeRange(sourceFile, newText, changeRange, aggressiveChecks);
                  ts.Debug.assert(changeRange.span.start <= textChangeRange.span.start);
                  ts.Debug.assert(ts.textSpanEnd(changeRange.span) === ts.textSpanEnd(textChangeRange.span));
                  ts.Debug.assert(ts.textSpanEnd(ts.textChangeRangeNewSpan(changeRange)) === ts.textSpanEnd(ts.textChangeRangeNewSpan(textChangeRange)));
                  var delta = ts.textChangeRangeNewSpan(changeRange).length - changeRange.span.length;
                  updateTokenPositionsAndMarkElements(incrementalSourceFile, changeRange.span.start, ts.textSpanEnd(changeRange.span), ts.textSpanEnd(ts.textChangeRangeNewSpan(changeRange)), delta, oldText, newText, aggressiveChecks);
                  var result = Parser.parseSourceFile(sourceFile.fileName, newText, sourceFile.languageVersion, syntaxCursor, true);
                  return result;
              }
              IncrementalParser.updateSourceFile = updateSourceFile;
              function moveElementEntirelyPastChangeRange(element, isArray, delta, oldText, newText, aggressiveChecks) {
                  if (isArray) {
                      visitArray(element);
                  }
                  else {
                      visitNode(element);
                  }
                  return;
                  function visitNode(node) {
                      if (aggressiveChecks && shouldCheckNode(node)) {
                          var text = oldText.substring(node.pos, node.end);
                      }
                      node._children = undefined;
                      node.pos += delta;
                      node.end += delta;
                      if (aggressiveChecks && shouldCheckNode(node)) {
                          ts.Debug.assert(text === newText.substring(node.pos, node.end));
                      }
                      forEachChild(node, visitNode, visitArray);
                      checkNodePositions(node, aggressiveChecks);
                  }
                  function visitArray(array) {
                      array._children = undefined;
                      array.pos += delta;
                      array.end += delta;
                      for (var _i = 0; _i < array.length; _i++) {
                          var node = array[_i];
                          visitNode(node);
                      }
                  }
              }
              function shouldCheckNode(node) {
                  switch (node.kind) {
                      case 8:
                      case 7:
                      case 65:
                          return true;
                  }
                  return false;
              }
              function adjustIntersectingElement(element, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta) {
                  ts.Debug.assert(element.end >= changeStart, "Adjusting an element that was entirely before the change range");
                  ts.Debug.assert(element.pos <= changeRangeOldEnd, "Adjusting an element that was entirely after the change range");
                  ts.Debug.assert(element.pos <= element.end);
                  element.pos = Math.min(element.pos, changeRangeNewEnd);
                  if (element.end >= changeRangeOldEnd) {
                      element.end += delta;
                  }
                  else {
                      element.end = Math.min(element.end, changeRangeNewEnd);
                  }
                  ts.Debug.assert(element.pos <= element.end);
                  if (element.parent) {
                      ts.Debug.assert(element.pos >= element.parent.pos);
                      ts.Debug.assert(element.end <= element.parent.end);
                  }
              }
              function checkNodePositions(node, aggressiveChecks) {
                  if (aggressiveChecks) {
                      var pos = node.pos;
                      forEachChild(node, function (child) {
                          ts.Debug.assert(child.pos >= pos);
                          pos = child.end;
                      });
                      ts.Debug.assert(pos <= node.end);
                  }
              }
              function updateTokenPositionsAndMarkElements(sourceFile, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta, oldText, newText, aggressiveChecks) {
                  visitNode(sourceFile);
                  return;
                  function visitNode(child) {
                      ts.Debug.assert(child.pos <= child.end);
                      if (child.pos > changeRangeOldEnd) {
                          moveElementEntirelyPastChangeRange(child, false, delta, oldText, newText, aggressiveChecks);
                          return;
                      }
                      var fullEnd = child.end;
                      if (fullEnd >= changeStart) {
                          child.intersectsChange = true;
                          child._children = undefined;
                          adjustIntersectingElement(child, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta);
                          forEachChild(child, visitNode, visitArray);
                          checkNodePositions(child, aggressiveChecks);
                          return;
                      }
                      ts.Debug.assert(fullEnd < changeStart);
                  }
                  function visitArray(array) {
                      ts.Debug.assert(array.pos <= array.end);
                      if (array.pos > changeRangeOldEnd) {
                          moveElementEntirelyPastChangeRange(array, true, delta, oldText, newText, aggressiveChecks);
                          return;
                      }
                      var fullEnd = array.end;
                      if (fullEnd >= changeStart) {
                          array.intersectsChange = true;
                          array._children = undefined;
                          adjustIntersectingElement(array, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta);
                          for (var _i = 0; _i < array.length; _i++) {
                              var node = array[_i];
                              visitNode(node);
                          }
                          return;
                      }
                      ts.Debug.assert(fullEnd < changeStart);
                  }
              }
              function extendToAffectedRange(sourceFile, changeRange) {
                  var maxLookahead = 1;
                  var start = changeRange.span.start;
                  for (var i = 0; start > 0 && i <= maxLookahead; i++) {
                      var nearestNode = findNearestNodeStartingBeforeOrAtPosition(sourceFile, start);
                      ts.Debug.assert(nearestNode.pos <= start);
                      var position = nearestNode.pos;
                      start = Math.max(0, position - 1);
                  }
                  var finalSpan = ts.createTextSpanFromBounds(start, ts.textSpanEnd(changeRange.span));
                  var finalLength = changeRange.newLength + (changeRange.span.start - start);
                  return ts.createTextChangeRange(finalSpan, finalLength);
              }
              function findNearestNodeStartingBeforeOrAtPosition(sourceFile, position) {
                  var bestResult = sourceFile;
                  var lastNodeEntirelyBeforePosition;
                  forEachChild(sourceFile, visit);
                  if (lastNodeEntirelyBeforePosition) {
                      var lastChildOfLastEntireNodeBeforePosition = getLastChild(lastNodeEntirelyBeforePosition);
                      if (lastChildOfLastEntireNodeBeforePosition.pos > bestResult.pos) {
                          bestResult = lastChildOfLastEntireNodeBeforePosition;
                      }
                  }
                  return bestResult;
                  function getLastChild(node) {
                      while (true) {
                          var lastChild = getLastChildWorker(node);
                          if (lastChild) {
                              node = lastChild;
                          }
                          else {
                              return node;
                          }
                      }
                  }
                  function getLastChildWorker(node) {
                      var last = undefined;
                      forEachChild(node, function (child) {
                          if (ts.nodeIsPresent(child)) {
                              last = child;
                          }
                      });
                      return last;
                  }
                  function visit(child) {
                      if (ts.nodeIsMissing(child)) {
                          return;
                      }
                      if (child.pos <= position) {
                          if (child.pos >= bestResult.pos) {
                              bestResult = child;
                          }
                          if (position < child.end) {
                              forEachChild(child, visit);
                              return true;
                          }
                          else {
                              ts.Debug.assert(child.end <= position);
                              lastNodeEntirelyBeforePosition = child;
                          }
                      }
                      else {
                          ts.Debug.assert(child.pos > position);
                          return true;
                      }
                  }
              }
              function checkChangeRange(sourceFile, newText, textChangeRange, aggressiveChecks) {
                  var oldText = sourceFile.text;
                  if (textChangeRange) {
                      ts.Debug.assert((oldText.length - textChangeRange.span.length + textChangeRange.newLength) === newText.length);
                      if (aggressiveChecks || ts.Debug.shouldAssert(3)) {
                          var oldTextPrefix = oldText.substr(0, textChangeRange.span.start);
                          var newTextPrefix = newText.substr(0, textChangeRange.span.start);
                          ts.Debug.assert(oldTextPrefix === newTextPrefix);
                          var oldTextSuffix = oldText.substring(ts.textSpanEnd(textChangeRange.span), oldText.length);
                          var newTextSuffix = newText.substring(ts.textSpanEnd(ts.textChangeRangeNewSpan(textChangeRange)), newText.length);
                          ts.Debug.assert(oldTextSuffix === newTextSuffix);
                      }
                  }
              }
              function createSyntaxCursor(sourceFile) {
                  var currentArray = sourceFile.statements;
                  var currentArrayIndex = 0;
                  ts.Debug.assert(currentArrayIndex < currentArray.length);
                  var current = currentArray[currentArrayIndex];
                  var lastQueriedPosition = -1;
                  return {
                      currentNode: function (position) {
                          if (position !== lastQueriedPosition) {
                              if (current && current.end === position && currentArrayIndex < (currentArray.length - 1)) {
                                  currentArrayIndex++;
                                  current = currentArray[currentArrayIndex];
                              }
                              if (!current || current.pos !== position) {
                                  findHighestListElementThatStartsAtPosition(position);
                              }
                          }
                          lastQueriedPosition = position;
                          ts.Debug.assert(!current || current.pos === position);
                          return current;
                      }
                  };
                  function findHighestListElementThatStartsAtPosition(position) {
                      currentArray = undefined;
                      currentArrayIndex = -1;
                      current = undefined;
                      forEachChild(sourceFile, visitNode, visitArray);
                      return;
                      function visitNode(node) {
                          if (position >= node.pos && position < node.end) {
                              forEachChild(node, visitNode, visitArray);
                              return true;
                          }
                          return false;
                      }
                      function visitArray(array) {
                          if (position >= array.pos && position < array.end) {
                              for (var i = 0, n = array.length; i < n; i++) {
                                  var child = array[i];
                                  if (child) {
                                      if (child.pos === position) {
                                          currentArray = array;
                                          currentArrayIndex = i;
                                          current = child;
                                          return true;
                                      }
                                      else {
                                          if (child.pos < position && position < child.end) {
                                              forEachChild(child, visitNode, visitArray);
                                              return true;
                                          }
                                      }
                                  }
                              }
                          }
                          return false;
                      }
                  }
              }
          })(IncrementalParser || (IncrementalParser = {}));
      })(ts || (ts = {}));
      /// <reference path="binder.ts"/>
      var ts;
      (function (ts) {
          var nextSymbolId = 1;
          var nextNodeId = 1;
          var nextMergeId = 1;
          function getNodeId(node) {
              if (!node.id)
                  node.id = nextNodeId++;
              return node.id;
          }
          ts.getNodeId = getNodeId;
          ts.checkTime = 0;
          function getSymbolId(symbol) {
              if (!symbol.id) {
                  symbol.id = nextSymbolId++;
              }
              return symbol.id;
          }
          ts.getSymbolId = getSymbolId;
          function createTypeChecker(host, produceDiagnostics) {
              var Symbol = ts.objectAllocator.getSymbolConstructor();
              var Type = ts.objectAllocator.getTypeConstructor();
              var Signature = ts.objectAllocator.getSignatureConstructor();
              var typeCount = 0;
              var emptyArray = [];
              var emptySymbols = {};
              var compilerOptions = host.getCompilerOptions();
              var languageVersion = compilerOptions.target || 0;
              var emitResolver = createResolver();
              var undefinedSymbol = createSymbol(4 | 67108864, "undefined");
              var argumentsSymbol = createSymbol(4 | 67108864, "arguments");
              var checker = {
                  getNodeCount: function () { return ts.sum(host.getSourceFiles(), "nodeCount"); },
                  getIdentifierCount: function () { return ts.sum(host.getSourceFiles(), "identifierCount"); },
                  getSymbolCount: function () { return ts.sum(host.getSourceFiles(), "symbolCount"); },
                  getTypeCount: function () { return typeCount; },
                  isUndefinedSymbol: function (symbol) { return symbol === undefinedSymbol; },
                  isArgumentsSymbol: function (symbol) { return symbol === argumentsSymbol; },
                  getDiagnostics: getDiagnostics,
                  getGlobalDiagnostics: getGlobalDiagnostics,
                  getTypeOfSymbolAtLocation: getTypeOfSymbolAtLocation,
                  getDeclaredTypeOfSymbol: getDeclaredTypeOfSymbol,
                  getPropertiesOfType: getPropertiesOfType,
                  getPropertyOfType: getPropertyOfType,
                  getSignaturesOfType: getSignaturesOfType,
                  getIndexTypeOfType: getIndexTypeOfType,
                  getReturnTypeOfSignature: getReturnTypeOfSignature,
                  getSymbolsInScope: getSymbolsInScope,
                  getSymbolAtLocation: getSymbolAtLocation,
                  getShorthandAssignmentValueSymbol: getShorthandAssignmentValueSymbol,
                  getTypeAtLocation: getTypeAtLocation,
                  typeToString: typeToString,
                  getSymbolDisplayBuilder: getSymbolDisplayBuilder,
                  symbolToString: symbolToString,
                  getAugmentedPropertiesOfType: getAugmentedPropertiesOfType,
                  getRootSymbols: getRootSymbols,
                  getContextualType: getContextualType,
                  getFullyQualifiedName: getFullyQualifiedName,
                  getResolvedSignature: getResolvedSignature,
                  getConstantValue: getConstantValue,
                  isValidPropertyAccess: isValidPropertyAccess,
                  getSignatureFromDeclaration: getSignatureFromDeclaration,
                  isImplementationOfOverload: isImplementationOfOverload,
                  getAliasedSymbol: resolveAlias,
                  getEmitResolver: getEmitResolver,
                  getExportsOfModule: getExportsOfModuleAsArray
              };
              var unknownSymbol = createSymbol(4 | 67108864, "unknown");
              var resolvingSymbol = createSymbol(67108864, "__resolving__");
              var anyType = createIntrinsicType(1, "any");
              var stringType = createIntrinsicType(2, "string");
              var numberType = createIntrinsicType(4, "number");
              var booleanType = createIntrinsicType(8, "boolean");
              var esSymbolType = createIntrinsicType(1048576, "symbol");
              var voidType = createIntrinsicType(16, "void");
              var undefinedType = createIntrinsicType(32 | 262144, "undefined");
              var nullType = createIntrinsicType(64 | 262144, "null");
              var unknownType = createIntrinsicType(1, "unknown");
              var emptyObjectType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined);
              var anyFunctionType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined);
              var noConstraintType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined);
              var anySignature = createSignature(undefined, undefined, emptyArray, anyType, 0, false, false);
              var unknownSignature = createSignature(undefined, undefined, emptyArray, unknownType, 0, false, false);
              var globals = {};
              var globalArraySymbol;
              var globalESSymbolConstructorSymbol;
              var globalObjectType;
              var globalFunctionType;
              var globalArrayType;
              var globalStringType;
              var globalNumberType;
              var globalBooleanType;
              var globalRegExpType;
              var globalTemplateStringsArrayType;
              var globalESSymbolType;
              var globalIterableType;
              var anyArrayType;
              var getGlobalClassDecoratorType;
              var getGlobalParameterDecoratorType;
              var getGlobalPropertyDecoratorType;
              var getGlobalMethodDecoratorType;
              var tupleTypes = {};
              var unionTypes = {};
              var stringLiteralTypes = {};
              var emitExtends = false;
              var emitDecorate = false;
              var emitParam = false;
              var resolutionTargets = [];
              var resolutionResults = [];
              var mergedSymbols = [];
              var symbolLinks = [];
              var nodeLinks = [];
              var potentialThisCollisions = [];
              var diagnostics = ts.createDiagnosticCollection();
              var primitiveTypeInfo = {
                  "string": {
                      type: stringType,
                      flags: 258
                  },
                  "number": {
                      type: numberType,
                      flags: 132
                  },
                  "boolean": {
                      type: booleanType,
                      flags: 8
                  },
                  "symbol": {
                      type: esSymbolType,
                      flags: 1048576
                  }
              };
              function getEmitResolver(sourceFile) {
                  getDiagnostics(sourceFile);
                  return emitResolver;
              }
              function error(location, message, arg0, arg1, arg2) {
                  var diagnostic = location
                      ? ts.createDiagnosticForNode(location, message, arg0, arg1, arg2)
                      : ts.createCompilerDiagnostic(message, arg0, arg1, arg2);
                  diagnostics.add(diagnostic);
              }
              function createSymbol(flags, name) {
                  return new Symbol(flags, name);
              }
              function getExcludedSymbolFlags(flags) {
                  var result = 0;
                  if (flags & 2)
                      result |= 107455;
                  if (flags & 1)
                      result |= 107454;
                  if (flags & 4)
                      result |= 107455;
                  if (flags & 8)
                      result |= 107455;
                  if (flags & 16)
                      result |= 106927;
                  if (flags & 32)
                      result |= 899583;
                  if (flags & 64)
                      result |= 792992;
                  if (flags & 256)
                      result |= 899327;
                  if (flags & 128)
                      result |= 899967;
                  if (flags & 512)
                      result |= 106639;
                  if (flags & 8192)
                      result |= 99263;
                  if (flags & 32768)
                      result |= 41919;
                  if (flags & 65536)
                      result |= 74687;
                  if (flags & 262144)
                      result |= 530912;
                  if (flags & 524288)
                      result |= 793056;
                  if (flags & 8388608)
                      result |= 8388608;
                  return result;
              }
              function recordMergedSymbol(target, source) {
                  if (!source.mergeId)
                      source.mergeId = nextMergeId++;
                  mergedSymbols[source.mergeId] = target;
              }
              function cloneSymbol(symbol) {
                  var result = createSymbol(symbol.flags | 33554432, symbol.name);
                  result.declarations = symbol.declarations.slice(0);
                  result.parent = symbol.parent;
                  if (symbol.valueDeclaration)
                      result.valueDeclaration = symbol.valueDeclaration;
                  if (symbol.constEnumOnlyModule)
                      result.constEnumOnlyModule = true;
                  if (symbol.members)
                      result.members = cloneSymbolTable(symbol.members);
                  if (symbol.exports)
                      result.exports = cloneSymbolTable(symbol.exports);
                  recordMergedSymbol(result, symbol);
                  return result;
              }
              function mergeSymbol(target, source) {
                  if (!(target.flags & getExcludedSymbolFlags(source.flags))) {
                      if (source.flags & 512 && target.flags & 512 && target.constEnumOnlyModule && !source.constEnumOnlyModule) {
                          target.constEnumOnlyModule = false;
                      }
                      target.flags |= source.flags;
                      if (!target.valueDeclaration && source.valueDeclaration)
                          target.valueDeclaration = source.valueDeclaration;
                      ts.forEach(source.declarations, function (node) {
                          target.declarations.push(node);
                      });
                      if (source.members) {
                          if (!target.members)
                              target.members = {};
                          mergeSymbolTable(target.members, source.members);
                      }
                      if (source.exports) {
                          if (!target.exports)
                              target.exports = {};
                          mergeSymbolTable(target.exports, source.exports);
                      }
                      recordMergedSymbol(target, source);
                  }
                  else {
                      var message = target.flags & 2 || source.flags & 2
                          ? ts.Diagnostics.Cannot_redeclare_block_scoped_variable_0 : ts.Diagnostics.Duplicate_identifier_0;
                      ts.forEach(source.declarations, function (node) {
                          error(node.name ? node.name : node, message, symbolToString(source));
                      });
                      ts.forEach(target.declarations, function (node) {
                          error(node.name ? node.name : node, message, symbolToString(source));
                      });
                  }
              }
              function cloneSymbolTable(symbolTable) {
                  var result = {};
                  for (var id in symbolTable) {
                      if (ts.hasProperty(symbolTable, id)) {
                          result[id] = symbolTable[id];
                      }
                  }
                  return result;
              }
              function mergeSymbolTable(target, source) {
                  for (var id in source) {
                      if (ts.hasProperty(source, id)) {
                          if (!ts.hasProperty(target, id)) {
                              target[id] = source[id];
                          }
                          else {
                              var symbol = target[id];
                              if (!(symbol.flags & 33554432)) {
                                  target[id] = symbol = cloneSymbol(symbol);
                              }
                              mergeSymbol(symbol, source[id]);
                          }
                      }
                  }
              }
              function getSymbolLinks(symbol) {
                  if (symbol.flags & 67108864)
                      return symbol;
                  var id = getSymbolId(symbol);
                  return symbolLinks[id] || (symbolLinks[id] = {});
              }
              function getNodeLinks(node) {
                  var nodeId = getNodeId(node);
                  return nodeLinks[nodeId] || (nodeLinks[nodeId] = {});
              }
              function getSourceFile(node) {
                  return ts.getAncestor(node, 228);
              }
              function isGlobalSourceFile(node) {
                  return node.kind === 228 && !ts.isExternalModule(node);
              }
              function getSymbol(symbols, name, meaning) {
                  if (meaning && ts.hasProperty(symbols, name)) {
                      var symbol = symbols[name];
                      ts.Debug.assert((symbol.flags & 16777216) === 0, "Should never get an instantiated symbol here.");
                      if (symbol.flags & meaning) {
                          return symbol;
                      }
                      if (symbol.flags & 8388608) {
                          var target = resolveAlias(symbol);
                          if (target === unknownSymbol || target.flags & meaning) {
                              return symbol;
                          }
                      }
                  }
              }
              function isDefinedBefore(node1, node2) {
                  var file1 = ts.getSourceFileOfNode(node1);
                  var file2 = ts.getSourceFileOfNode(node2);
                  if (file1 === file2) {
                      return node1.pos <= node2.pos;
                  }
                  if (!compilerOptions.out) {
                      return true;
                  }
                  var sourceFiles = host.getSourceFiles();
                  return sourceFiles.indexOf(file1) <= sourceFiles.indexOf(file2);
              }
              function resolveName(location, name, meaning, nameNotFoundMessage, nameArg) {
                  var result;
                  var lastLocation;
                  var propertyWithInvalidInitializer;
                  var errorLocation = location;
                  var grandparent;
                  loop: while (location) {
                      if (location.locals && !isGlobalSourceFile(location)) {
                          if (result = getSymbol(location.locals, name, meaning)) {
                              break loop;
                          }
                      }
                      switch (location.kind) {
                          case 228:
                              if (!ts.isExternalModule(location))
                                  break;
                          case 206:
                              if (result = getSymbol(getSymbolOfNode(location).exports, name, meaning & 8914931)) {
                                  if (result.flags & meaning || !(result.flags & 8388608 && getDeclarationOfAliasSymbol(result).kind === 218)) {
                                      break loop;
                                  }
                                  result = undefined;
                              }
                              else if (location.kind === 228 ||
                                  (location.kind === 206 && location.name.kind === 8)) {
                                  result = getSymbolOfNode(location).exports["default"];
                                  var localSymbol = ts.getLocalSymbolForExportDefault(result);
                                  if (result && localSymbol && (result.flags & meaning) && localSymbol.name === name) {
                                      break loop;
                                  }
                                  result = undefined;
                              }
                              break;
                          case 205:
                              if (result = getSymbol(getSymbolOfNode(location).exports, name, meaning & 8)) {
                                  break loop;
                              }
                              break;
                          case 133:
                          case 132:
                              if (location.parent.kind === 202 && !(location.flags & 128)) {
                                  var ctor = findConstructorDeclaration(location.parent);
                                  if (ctor && ctor.locals) {
                                      if (getSymbol(ctor.locals, name, meaning & 107455)) {
                                          propertyWithInvalidInitializer = location;
                                      }
                                  }
                              }
                              break;
                          case 202:
                          case 203:
                              if (result = getSymbol(getSymbolOfNode(location).members, name, meaning & 793056)) {
                                  if (lastLocation && lastLocation.flags & 128) {
                                      error(errorLocation, ts.Diagnostics.Static_members_cannot_reference_class_type_parameters);
                                      return undefined;
                                  }
                                  break loop;
                              }
                              break;
                          case 128:
                              grandparent = location.parent.parent;
                              if (grandparent.kind === 202 || grandparent.kind === 203) {
                                  if (result = getSymbol(getSymbolOfNode(grandparent).members, name, meaning & 793056)) {
                                      error(errorLocation, ts.Diagnostics.A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type);
                                      return undefined;
                                  }
                              }
                              break;
                          case 135:
                          case 134:
                          case 136:
                          case 137:
                          case 138:
                          case 201:
                          case 164:
                              if (name === "arguments") {
                                  result = argumentsSymbol;
                                  break loop;
                              }
                              break;
                          case 163:
                              if (name === "arguments") {
                                  result = argumentsSymbol;
                                  break loop;
                              }
                              var functionName = location.name;
                              if (functionName && name === functionName.text) {
                                  result = location.symbol;
                                  break loop;
                              }
                              break;
                          case 175:
                              var className = location.name;
                              if (className && name === className.text) {
                                  result = location.symbol;
                                  break loop;
                              }
                              break;
                          case 131:
                              if (location.parent && location.parent.kind === 130) {
                                  location = location.parent;
                              }
                              if (location.parent && ts.isClassElement(location.parent)) {
                                  location = location.parent;
                              }
                              break;
                      }
                      lastLocation = location;
                      location = location.parent;
                  }
                  if (!result) {
                      result = getSymbol(globals, name, meaning);
                  }
                  if (!result) {
                      if (nameNotFoundMessage) {
                          error(errorLocation, nameNotFoundMessage, typeof nameArg === "string" ? nameArg : ts.declarationNameToString(nameArg));
                      }
                      return undefined;
                  }
                  if (nameNotFoundMessage) {
                      if (propertyWithInvalidInitializer) {
                          var propertyName = propertyWithInvalidInitializer.name;
                          error(errorLocation, ts.Diagnostics.Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor, ts.declarationNameToString(propertyName), typeof nameArg === "string" ? nameArg : ts.declarationNameToString(nameArg));
                          return undefined;
                      }
                      if (result.flags & 2) {
                          checkResolvedBlockScopedVariable(result, errorLocation);
                      }
                  }
                  return result;
              }
              function checkResolvedBlockScopedVariable(result, errorLocation) {
                  ts.Debug.assert((result.flags & 2) !== 0);
                  var declaration = ts.forEach(result.declarations, function (d) { return ts.isBlockOrCatchScoped(d) ? d : undefined; });
                  ts.Debug.assert(declaration !== undefined, "Block-scoped variable declaration is undefined");
                  var isUsedBeforeDeclaration = !isDefinedBefore(declaration, errorLocation);
                  if (!isUsedBeforeDeclaration) {
                      var variableDeclaration = ts.getAncestor(declaration, 199);
                      var container = ts.getEnclosingBlockScopeContainer(variableDeclaration);
                      if (variableDeclaration.parent.parent.kind === 181 ||
                          variableDeclaration.parent.parent.kind === 187) {
                          isUsedBeforeDeclaration = isSameScopeDescendentOf(errorLocation, variableDeclaration, container);
                      }
                      else if (variableDeclaration.parent.parent.kind === 189 ||
                          variableDeclaration.parent.parent.kind === 188) {
                          var expression = variableDeclaration.parent.parent.expression;
                          isUsedBeforeDeclaration = isSameScopeDescendentOf(errorLocation, expression, container);
                      }
                  }
                  if (isUsedBeforeDeclaration) {
                      error(errorLocation, ts.Diagnostics.Block_scoped_variable_0_used_before_its_declaration, ts.declarationNameToString(declaration.name));
                  }
              }
              function isSameScopeDescendentOf(initial, parent, stopAt) {
                  if (!parent) {
                      return false;
                  }
                  for (var current = initial; current && current !== stopAt && !ts.isFunctionLike(current); current = current.parent) {
                      if (current === parent) {
                          return true;
                      }
                  }
                  return false;
              }
              function getAnyImportSyntax(node) {
                  if (ts.isAliasSymbolDeclaration(node)) {
                      if (node.kind === 209) {
                          return node;
                      }
                      while (node && node.kind !== 210) {
                          node = node.parent;
                      }
                      return node;
                  }
              }
              function getDeclarationOfAliasSymbol(symbol) {
                  return ts.forEach(symbol.declarations, function (d) { return ts.isAliasSymbolDeclaration(d) ? d : undefined; });
              }
              function getTargetOfImportEqualsDeclaration(node) {
                  if (node.moduleReference.kind === 220) {
                      return resolveExternalModuleSymbol(resolveExternalModuleName(node, ts.getExternalModuleImportEqualsDeclarationExpression(node)));
                  }
                  return getSymbolOfPartOfRightHandSideOfImportEquals(node.moduleReference, node);
              }
              function getTargetOfImportClause(node) {
                  var moduleSymbol = resolveExternalModuleName(node, node.parent.moduleSpecifier);
                  if (moduleSymbol) {
                      var exportDefaultSymbol = resolveSymbol(moduleSymbol.exports["default"]);
                      if (!exportDefaultSymbol) {
                          error(node.name, ts.Diagnostics.Module_0_has_no_default_export, symbolToString(moduleSymbol));
                      }
                      return exportDefaultSymbol;
                  }
              }
              function getTargetOfNamespaceImport(node) {
                  var moduleSpecifier = node.parent.parent.moduleSpecifier;
                  return resolveESModuleSymbol(resolveExternalModuleName(node, moduleSpecifier), moduleSpecifier);
              }
              function getMemberOfModuleVariable(moduleSymbol, name) {
                  if (moduleSymbol.flags & 3) {
                      var typeAnnotation = moduleSymbol.valueDeclaration.type;
                      if (typeAnnotation) {
                          return getPropertyOfType(getTypeFromTypeNode(typeAnnotation), name);
                      }
                  }
              }
              function combineValueAndTypeSymbols(valueSymbol, typeSymbol) {
                  if (valueSymbol.flags & (793056 | 1536)) {
                      return valueSymbol;
                  }
                  var result = createSymbol(valueSymbol.flags | typeSymbol.flags, valueSymbol.name);
                  result.declarations = ts.concatenate(valueSymbol.declarations, typeSymbol.declarations);
                  result.parent = valueSymbol.parent || typeSymbol.parent;
                  if (valueSymbol.valueDeclaration)
                      result.valueDeclaration = valueSymbol.valueDeclaration;
                  if (typeSymbol.members)
                      result.members = typeSymbol.members;
                  if (valueSymbol.exports)
                      result.exports = valueSymbol.exports;
                  return result;
              }
              function getExportOfModule(symbol, name) {
                  if (symbol.flags & 1536) {
                      var exports = getExportsOfSymbol(symbol);
                      if (ts.hasProperty(exports, name)) {
                          return resolveSymbol(exports[name]);
                      }
                  }
              }
              function getPropertyOfVariable(symbol, name) {
                  if (symbol.flags & 3) {
                      var typeAnnotation = symbol.valueDeclaration.type;
                      if (typeAnnotation) {
                          return resolveSymbol(getPropertyOfType(getTypeFromTypeNode(typeAnnotation), name));
                      }
                  }
              }
              function getExternalModuleMember(node, specifier) {
                  var moduleSymbol = resolveExternalModuleName(node, node.moduleSpecifier);
                  var targetSymbol = resolveESModuleSymbol(moduleSymbol, node.moduleSpecifier);
                  if (targetSymbol) {
                      var name_4 = specifier.propertyName || specifier.name;
                      if (name_4.text) {
                          var symbolFromModule = getExportOfModule(targetSymbol, name_4.text);
                          var symbolFromVariable = getPropertyOfVariable(targetSymbol, name_4.text);
                          var symbol = symbolFromModule && symbolFromVariable ?
                              combineValueAndTypeSymbols(symbolFromVariable, symbolFromModule) :
                              symbolFromModule || symbolFromVariable;
                          if (!symbol) {
                              error(name_4, ts.Diagnostics.Module_0_has_no_exported_member_1, getFullyQualifiedName(moduleSymbol), ts.declarationNameToString(name_4));
                          }
                          return symbol;
                      }
                  }
              }
              function getTargetOfImportSpecifier(node) {
                  return getExternalModuleMember(node.parent.parent.parent, node);
              }
              function getTargetOfExportSpecifier(node) {
                  return node.parent.parent.moduleSpecifier ?
                      getExternalModuleMember(node.parent.parent, node) :
                      resolveEntityName(node.propertyName || node.name, 107455 | 793056 | 1536);
              }
              function getTargetOfExportAssignment(node) {
                  return resolveEntityName(node.expression, 107455 | 793056 | 1536);
              }
              function getTargetOfAliasDeclaration(node) {
                  switch (node.kind) {
                      case 209:
                          return getTargetOfImportEqualsDeclaration(node);
                      case 211:
                          return getTargetOfImportClause(node);
                      case 212:
                          return getTargetOfNamespaceImport(node);
                      case 214:
                          return getTargetOfImportSpecifier(node);
                      case 218:
                          return getTargetOfExportSpecifier(node);
                      case 215:
                          return getTargetOfExportAssignment(node);
                  }
              }
              function resolveSymbol(symbol) {
                  return symbol && symbol.flags & 8388608 && !(symbol.flags & (107455 | 793056 | 1536)) ? resolveAlias(symbol) : symbol;
              }
              function resolveAlias(symbol) {
                  ts.Debug.assert((symbol.flags & 8388608) !== 0, "Should only get Alias here.");
                  var links = getSymbolLinks(symbol);
                  if (!links.target) {
                      links.target = resolvingSymbol;
                      var node = getDeclarationOfAliasSymbol(symbol);
                      var target = getTargetOfAliasDeclaration(node);
                      if (links.target === resolvingSymbol) {
                          links.target = target || unknownSymbol;
                      }
                      else {
                          error(node, ts.Diagnostics.Circular_definition_of_import_alias_0, symbolToString(symbol));
                      }
                  }
                  else if (links.target === resolvingSymbol) {
                      links.target = unknownSymbol;
                  }
                  return links.target;
              }
              function markExportAsReferenced(node) {
                  var symbol = getSymbolOfNode(node);
                  var target = resolveAlias(symbol);
                  if (target) {
                      var markAlias = (target === unknownSymbol && compilerOptions.separateCompilation) ||
                          (target !== unknownSymbol && (target.flags & 107455) && !isConstEnumOrConstEnumOnlyModule(target));
                      if (markAlias) {
                          markAliasSymbolAsReferenced(symbol);
                      }
                  }
              }
              function markAliasSymbolAsReferenced(symbol) {
                  var links = getSymbolLinks(symbol);
                  if (!links.referenced) {
                      links.referenced = true;
                      var node = getDeclarationOfAliasSymbol(symbol);
                      if (node.kind === 215) {
                          checkExpressionCached(node.expression);
                      }
                      else if (node.kind === 218) {
                          checkExpressionCached(node.propertyName || node.name);
                      }
                      else if (ts.isInternalModuleImportEqualsDeclaration(node)) {
                          checkExpressionCached(node.moduleReference);
                      }
                  }
              }
              function getSymbolOfPartOfRightHandSideOfImportEquals(entityName, importDeclaration) {
                  if (!importDeclaration) {
                      importDeclaration = ts.getAncestor(entityName, 209);
                      ts.Debug.assert(importDeclaration !== undefined);
                  }
                  if (entityName.kind === 65 && ts.isRightSideOfQualifiedNameOrPropertyAccess(entityName)) {
                      entityName = entityName.parent;
                  }
                  if (entityName.kind === 65 || entityName.parent.kind === 127) {
                      return resolveEntityName(entityName, 1536);
                  }
                  else {
                      ts.Debug.assert(entityName.parent.kind === 209);
                      return resolveEntityName(entityName, 107455 | 793056 | 1536);
                  }
              }
              function getFullyQualifiedName(symbol) {
                  return symbol.parent ? getFullyQualifiedName(symbol.parent) + "." + symbolToString(symbol) : symbolToString(symbol);
              }
              function resolveEntityName(name, meaning) {
                  if (ts.nodeIsMissing(name)) {
                      return undefined;
                  }
                  var symbol;
                  if (name.kind === 65) {
                      var message = meaning === 1536 ? ts.Diagnostics.Cannot_find_namespace_0 : ts.Diagnostics.Cannot_find_name_0;
                      symbol = resolveName(name, name.text, meaning, message, name);
                      if (!symbol) {
                          return undefined;
                      }
                  }
                  else if (name.kind === 127 || name.kind === 156) {
                      var left = name.kind === 127 ? name.left : name.expression;
                      var right = name.kind === 127 ? name.right : name.name;
                      var namespace = resolveEntityName(left, 1536);
                      if (!namespace || namespace === unknownSymbol || ts.nodeIsMissing(right)) {
                          return undefined;
                      }
                      symbol = getSymbol(getExportsOfSymbol(namespace), right.text, meaning);
                      if (!symbol) {
                          error(right, ts.Diagnostics.Module_0_has_no_exported_member_1, getFullyQualifiedName(namespace), ts.declarationNameToString(right));
                          return undefined;
                      }
                  }
                  else {
                      ts.Debug.fail("Unknown entity name kind.");
                  }
                  ts.Debug.assert((symbol.flags & 16777216) === 0, "Should never get an instantiated symbol here.");
                  return symbol.flags & meaning ? symbol : resolveAlias(symbol);
              }
              function isExternalModuleNameRelative(moduleName) {
                  return moduleName.substr(0, 2) === "./" || moduleName.substr(0, 3) === "../" || moduleName.substr(0, 2) === ".\\" || moduleName.substr(0, 3) === "..\\";
              }
              function resolveExternalModuleName(location, moduleReferenceExpression) {
                  if (moduleReferenceExpression.kind !== 8) {
                      return;
                  }
                  var moduleReferenceLiteral = moduleReferenceExpression;
                  var searchPath = ts.getDirectoryPath(getSourceFile(location).fileName);
                  var moduleName = ts.escapeIdentifier(moduleReferenceLiteral.text);
                  if (!moduleName)
                      return;
                  var isRelative = isExternalModuleNameRelative(moduleName);
                  if (!isRelative) {
                      var symbol = getSymbol(globals, '"' + moduleName + '"', 512);
                      if (symbol) {
                          return symbol;
                      }
                  }
                  var fileName;
                  var sourceFile;
                  while (true) {
                      fileName = ts.normalizePath(ts.combinePaths(searchPath, moduleName));
                      sourceFile = ts.forEach(ts.supportedExtensions, function (extension) { return host.getSourceFile(fileName + extension); });
                      if (sourceFile || isRelative) {
                          break;
                      }
                      var parentPath = ts.getDirectoryPath(searchPath);
                      if (parentPath === searchPath) {
                          break;
                      }
                      searchPath = parentPath;
                  }
                  if (sourceFile) {
                      if (sourceFile.symbol) {
                          return sourceFile.symbol;
                      }
                      error(moduleReferenceLiteral, ts.Diagnostics.File_0_is_not_a_module, sourceFile.fileName);
                      return;
                  }
                  error(moduleReferenceLiteral, ts.Diagnostics.Cannot_find_module_0, moduleName);
              }
              function resolveExternalModuleSymbol(moduleSymbol) {
                  return moduleSymbol && resolveSymbol(moduleSymbol.exports["export="]) || moduleSymbol;
              }
              function resolveESModuleSymbol(moduleSymbol, moduleReferenceExpression) {
                  var symbol = resolveExternalModuleSymbol(moduleSymbol);
                  if (symbol && !(symbol.flags & (1536 | 3))) {
                      error(moduleReferenceExpression, ts.Diagnostics.Module_0_resolves_to_a_non_module_entity_and_cannot_be_imported_using_this_construct, symbolToString(moduleSymbol));
                      symbol = undefined;
                  }
                  return symbol;
              }
              function getExportAssignmentSymbol(moduleSymbol) {
                  return moduleSymbol.exports["export="];
              }
              function getExportsOfModuleAsArray(moduleSymbol) {
                  return symbolsToArray(getExportsOfModule(moduleSymbol));
              }
              function getExportsOfSymbol(symbol) {
                  return symbol.flags & 1536 ? getExportsOfModule(symbol) : symbol.exports || emptySymbols;
              }
              function getExportsOfModule(moduleSymbol) {
                  var links = getSymbolLinks(moduleSymbol);
                  return links.resolvedExports || (links.resolvedExports = getExportsForModule(moduleSymbol));
              }
              function extendExportSymbols(target, source) {
                  for (var id in source) {
                      if (id !== "default" && !ts.hasProperty(target, id)) {
                          target[id] = source[id];
                      }
                  }
              }
              function getExportsForModule(moduleSymbol) {
                  var result;
                  var visitedSymbols = [];
                  visit(moduleSymbol);
                  return result || moduleSymbol.exports;
                  function visit(symbol) {
                      if (symbol && symbol.flags & 1952 && !ts.contains(visitedSymbols, symbol)) {
                          visitedSymbols.push(symbol);
                          if (symbol !== moduleSymbol) {
                              if (!result) {
                                  result = cloneSymbolTable(moduleSymbol.exports);
                              }
                              extendExportSymbols(result, symbol.exports);
                          }
                          var exportStars = symbol.exports["__export"];
                          if (exportStars) {
                              for (var _i = 0, _a = exportStars.declarations; _i < _a.length; _i++) {
                                  var node = _a[_i];
                                  visit(resolveExternalModuleName(node, node.moduleSpecifier));
                              }
                          }
                      }
                  }
              }
              function getMergedSymbol(symbol) {
                  var merged;
                  return symbol && symbol.mergeId && (merged = mergedSymbols[symbol.mergeId]) ? merged : symbol;
              }
              function getSymbolOfNode(node) {
                  return getMergedSymbol(node.symbol);
              }
              function getParentOfSymbol(symbol) {
                  return getMergedSymbol(symbol.parent);
              }
              function getExportSymbolOfValueSymbolIfExported(symbol) {
                  return symbol && (symbol.flags & 1048576) !== 0
                      ? getMergedSymbol(symbol.exportSymbol)
                      : symbol;
              }
              function symbolIsValue(symbol) {
                  if (symbol.flags & 16777216) {
                      return symbolIsValue(getSymbolLinks(symbol).target);
                  }
                  if (symbol.flags & 107455) {
                      return true;
                  }
                  if (symbol.flags & 8388608) {
                      return (resolveAlias(symbol).flags & 107455) !== 0;
                  }
                  return false;
              }
              function findConstructorDeclaration(node) {
                  var members = node.members;
                  for (var _i = 0; _i < members.length; _i++) {
                      var member = members[_i];
                      if (member.kind === 136 && ts.nodeIsPresent(member.body)) {
                          return member;
                      }
                  }
              }
              function createType(flags) {
                  var result = new Type(checker, flags);
                  result.id = typeCount++;
                  return result;
              }
              function createIntrinsicType(kind, intrinsicName) {
                  var type = createType(kind);
                  type.intrinsicName = intrinsicName;
                  return type;
              }
              function createObjectType(kind, symbol) {
                  var type = createType(kind);
                  type.symbol = symbol;
                  return type;
              }
              function isReservedMemberName(name) {
                  return name.charCodeAt(0) === 95 &&
                      name.charCodeAt(1) === 95 &&
                      name.charCodeAt(2) !== 95 &&
                      name.charCodeAt(2) !== 64;
              }
              function getNamedMembers(members) {
                  var result;
                  for (var id in members) {
                      if (ts.hasProperty(members, id)) {
                          if (!isReservedMemberName(id)) {
                              if (!result)
                                  result = [];
                              var symbol = members[id];
                              if (symbolIsValue(symbol)) {
                                  result.push(symbol);
                              }
                          }
                      }
                  }
                  return result || emptyArray;
              }
              function setObjectTypeMembers(type, members, callSignatures, constructSignatures, stringIndexType, numberIndexType) {
                  type.members = members;
                  type.properties = getNamedMembers(members);
                  type.callSignatures = callSignatures;
                  type.constructSignatures = constructSignatures;
                  if (stringIndexType)
                      type.stringIndexType = stringIndexType;
                  if (numberIndexType)
                      type.numberIndexType = numberIndexType;
                  return type;
              }
              function createAnonymousType(symbol, members, callSignatures, constructSignatures, stringIndexType, numberIndexType) {
                  return setObjectTypeMembers(createObjectType(32768, symbol), members, callSignatures, constructSignatures, stringIndexType, numberIndexType);
              }
              function forEachSymbolTableInScope(enclosingDeclaration, callback) {
                  var result;
                  for (var location_1 = enclosingDeclaration; location_1; location_1 = location_1.parent) {
                      if (location_1.locals && !isGlobalSourceFile(location_1)) {
                          if (result = callback(location_1.locals)) {
                              return result;
                          }
                      }
                      switch (location_1.kind) {
                          case 228:
                              if (!ts.isExternalModule(location_1)) {
                                  break;
                              }
                          case 206:
                              if (result = callback(getSymbolOfNode(location_1).exports)) {
                                  return result;
                              }
                              break;
                          case 202:
                          case 203:
                              if (result = callback(getSymbolOfNode(location_1).members)) {
                                  return result;
                              }
                              break;
                      }
                  }
                  return callback(globals);
              }
              function getQualifiedLeftMeaning(rightMeaning) {
                  return rightMeaning === 107455 ? 107455 : 1536;
              }
              function getAccessibleSymbolChain(symbol, enclosingDeclaration, meaning, useOnlyExternalAliasing) {
                  function getAccessibleSymbolChainFromSymbolTable(symbols) {
                      function canQualifySymbol(symbolFromSymbolTable, meaning) {
                          if (!needsQualification(symbolFromSymbolTable, enclosingDeclaration, meaning)) {
                              return true;
                          }
                          var accessibleParent = getAccessibleSymbolChain(symbolFromSymbolTable.parent, enclosingDeclaration, getQualifiedLeftMeaning(meaning), useOnlyExternalAliasing);
                          return !!accessibleParent;
                      }
                      function isAccessible(symbolFromSymbolTable, resolvedAliasSymbol) {
                          if (symbol === (resolvedAliasSymbol || symbolFromSymbolTable)) {
                              return !ts.forEach(symbolFromSymbolTable.declarations, hasExternalModuleSymbol) &&
                                  canQualifySymbol(symbolFromSymbolTable, meaning);
                          }
                      }
                      if (isAccessible(ts.lookUp(symbols, symbol.name))) {
                          return [symbol];
                      }
                      return ts.forEachValue(symbols, function (symbolFromSymbolTable) {
                          if (symbolFromSymbolTable.flags & 8388608 && symbolFromSymbolTable.name !== "export=") {
                              if (!useOnlyExternalAliasing ||
                                  ts.forEach(symbolFromSymbolTable.declarations, ts.isExternalModuleImportEqualsDeclaration)) {
                                  var resolvedImportedSymbol = resolveAlias(symbolFromSymbolTable);
                                  if (isAccessible(symbolFromSymbolTable, resolveAlias(symbolFromSymbolTable))) {
                                      return [symbolFromSymbolTable];
                                  }
                                  var accessibleSymbolsFromExports = resolvedImportedSymbol.exports ? getAccessibleSymbolChainFromSymbolTable(resolvedImportedSymbol.exports) : undefined;
                                  if (accessibleSymbolsFromExports && canQualifySymbol(symbolFromSymbolTable, getQualifiedLeftMeaning(meaning))) {
                                      return [symbolFromSymbolTable].concat(accessibleSymbolsFromExports);
                                  }
                              }
                          }
                      });
                  }
                  if (symbol) {
                      return forEachSymbolTableInScope(enclosingDeclaration, getAccessibleSymbolChainFromSymbolTable);
                  }
              }
              function needsQualification(symbol, enclosingDeclaration, meaning) {
                  var qualify = false;
                  forEachSymbolTableInScope(enclosingDeclaration, function (symbolTable) {
                      if (!ts.hasProperty(symbolTable, symbol.name)) {
                          return false;
                      }
                      var symbolFromSymbolTable = symbolTable[symbol.name];
                      if (symbolFromSymbolTable === symbol) {
                          return true;
                      }
                      symbolFromSymbolTable = (symbolFromSymbolTable.flags & 8388608) ? resolveAlias(symbolFromSymbolTable) : symbolFromSymbolTable;
                      if (symbolFromSymbolTable.flags & meaning) {
                          qualify = true;
                          return true;
                      }
                      return false;
                  });
                  return qualify;
              }
              function isSymbolAccessible(symbol, enclosingDeclaration, meaning) {
                  if (symbol && enclosingDeclaration && !(symbol.flags & 262144)) {
                      var initialSymbol = symbol;
                      var meaningToLook = meaning;
                      while (symbol) {
                          var accessibleSymbolChain = getAccessibleSymbolChain(symbol, enclosingDeclaration, meaningToLook, false);
                          if (accessibleSymbolChain) {
                              var hasAccessibleDeclarations = hasVisibleDeclarations(accessibleSymbolChain[0]);
                              if (!hasAccessibleDeclarations) {
                                  return {
                                      accessibility: 1,
                                      errorSymbolName: symbolToString(initialSymbol, enclosingDeclaration, meaning),
                                      errorModuleName: symbol !== initialSymbol ? symbolToString(symbol, enclosingDeclaration, 1536) : undefined
                                  };
                              }
                              return hasAccessibleDeclarations;
                          }
                          meaningToLook = getQualifiedLeftMeaning(meaning);
                          symbol = getParentOfSymbol(symbol);
                      }
                      var symbolExternalModule = ts.forEach(initialSymbol.declarations, getExternalModuleContainer);
                      if (symbolExternalModule) {
                          var enclosingExternalModule = getExternalModuleContainer(enclosingDeclaration);
                          if (symbolExternalModule !== enclosingExternalModule) {
                              return {
                                  accessibility: 2,
                                  errorSymbolName: symbolToString(initialSymbol, enclosingDeclaration, meaning),
                                  errorModuleName: symbolToString(symbolExternalModule)
                              };
                          }
                      }
                      return {
                          accessibility: 1,
                          errorSymbolName: symbolToString(initialSymbol, enclosingDeclaration, meaning)
                      };
                  }
                  return { accessibility: 0 };
                  function getExternalModuleContainer(declaration) {
                      for (; declaration; declaration = declaration.parent) {
                          if (hasExternalModuleSymbol(declaration)) {
                              return getSymbolOfNode(declaration);
                          }
                      }
                  }
              }
              function hasExternalModuleSymbol(declaration) {
                  return (declaration.kind === 206 && declaration.name.kind === 8) ||
                      (declaration.kind === 228 && ts.isExternalModule(declaration));
              }
              function hasVisibleDeclarations(symbol) {
                  var aliasesToMakeVisible;
                  if (ts.forEach(symbol.declarations, function (declaration) { return !getIsDeclarationVisible(declaration); })) {
                      return undefined;
                  }
                  return { accessibility: 0, aliasesToMakeVisible: aliasesToMakeVisible };
                  function getIsDeclarationVisible(declaration) {
                      if (!isDeclarationVisible(declaration)) {
                          var anyImportSyntax = getAnyImportSyntax(declaration);
                          if (anyImportSyntax &&
                              !(anyImportSyntax.flags & 1) &&
                              isDeclarationVisible(anyImportSyntax.parent)) {
                              getNodeLinks(declaration).isVisible = true;
                              if (aliasesToMakeVisible) {
                                  if (!ts.contains(aliasesToMakeVisible, anyImportSyntax)) {
                                      aliasesToMakeVisible.push(anyImportSyntax);
                                  }
                              }
                              else {
                                  aliasesToMakeVisible = [anyImportSyntax];
                              }
                              return true;
                          }
                          return false;
                      }
                      return true;
                  }
              }
              function isEntityNameVisible(entityName, enclosingDeclaration) {
                  var meaning;
                  if (entityName.parent.kind === 145) {
                      meaning = 107455 | 1048576;
                  }
                  else if (entityName.kind === 127 || entityName.kind === 156 ||
                      entityName.parent.kind === 209) {
                      meaning = 1536;
                  }
                  else {
                      meaning = 793056;
                  }
                  var firstIdentifier = getFirstIdentifier(entityName);
                  var symbol = resolveName(enclosingDeclaration, firstIdentifier.text, meaning, undefined, undefined);
                  return (symbol && hasVisibleDeclarations(symbol)) || {
                      accessibility: 1,
                      errorSymbolName: ts.getTextOfNode(firstIdentifier),
                      errorNode: firstIdentifier
                  };
              }
              function writeKeyword(writer, kind) {
                  writer.writeKeyword(ts.tokenToString(kind));
              }
              function writePunctuation(writer, kind) {
                  writer.writePunctuation(ts.tokenToString(kind));
              }
              function writeSpace(writer) {
                  writer.writeSpace(" ");
              }
              function symbolToString(symbol, enclosingDeclaration, meaning) {
                  var writer = ts.getSingleLineStringWriter();
                  getSymbolDisplayBuilder().buildSymbolDisplay(symbol, writer, enclosingDeclaration, meaning);
                  var result = writer.string();
                  ts.releaseStringWriter(writer);
                  return result;
              }
              function typeToString(type, enclosingDeclaration, flags) {
                  var writer = ts.getSingleLineStringWriter();
                  getSymbolDisplayBuilder().buildTypeDisplay(type, writer, enclosingDeclaration, flags);
                  var result = writer.string();
                  ts.releaseStringWriter(writer);
                  var maxLength = compilerOptions.noErrorTruncation || flags & 4 ? undefined : 100;
                  if (maxLength && result.length >= maxLength) {
                      result = result.substr(0, maxLength - "...".length) + "...";
                  }
                  return result;
              }
              function getTypeAliasForTypeLiteral(type) {
                  if (type.symbol && type.symbol.flags & 2048) {
                      var node = type.symbol.declarations[0].parent;
                      while (node.kind === 150) {
                          node = node.parent;
                      }
                      if (node.kind === 204) {
                          return getSymbolOfNode(node);
                      }
                  }
                  return undefined;
              }
              var _displayBuilder;
              function getSymbolDisplayBuilder() {
                  function appendSymbolNameOnly(symbol, writer) {
                      if (symbol.declarations && symbol.declarations.length > 0) {
                          var declaration = symbol.declarations[0];
                          if (declaration.name) {
                              writer.writeSymbol(ts.declarationNameToString(declaration.name), symbol);
                              return;
                          }
                      }
                      writer.writeSymbol(symbol.name, symbol);
                  }
                  function buildSymbolDisplay(symbol, writer, enclosingDeclaration, meaning, flags, typeFlags) {
                      var parentSymbol;
                      function appendParentTypeArgumentsAndSymbolName(symbol) {
                          if (parentSymbol) {
                              if (flags & 1) {
                                  if (symbol.flags & 16777216) {
                                      buildDisplayForTypeArgumentsAndDelimiters(getTypeParametersOfClassOrInterface(parentSymbol), symbol.mapper, writer, enclosingDeclaration);
                                  }
                                  else {
                                      buildTypeParameterDisplayFromSymbol(parentSymbol, writer, enclosingDeclaration);
                                  }
                              }
                              writePunctuation(writer, 20);
                          }
                          parentSymbol = symbol;
                          appendSymbolNameOnly(symbol, writer);
                      }
                      writer.trackSymbol(symbol, enclosingDeclaration, meaning);
                      function walkSymbol(symbol, meaning) {
                          if (symbol) {
                              var accessibleSymbolChain = getAccessibleSymbolChain(symbol, enclosingDeclaration, meaning, !!(flags & 2));
                              if (!accessibleSymbolChain ||
                                  needsQualification(accessibleSymbolChain[0], enclosingDeclaration, accessibleSymbolChain.length === 1 ? meaning : getQualifiedLeftMeaning(meaning))) {
                                  walkSymbol(getParentOfSymbol(accessibleSymbolChain ? accessibleSymbolChain[0] : symbol), getQualifiedLeftMeaning(meaning));
                              }
                              if (accessibleSymbolChain) {
                                  for (var _i = 0; _i < accessibleSymbolChain.length; _i++) {
                                      var accessibleSymbol = accessibleSymbolChain[_i];
                                      appendParentTypeArgumentsAndSymbolName(accessibleSymbol);
                                  }
                              }
                              else {
                                  if (!parentSymbol && ts.forEach(symbol.declarations, hasExternalModuleSymbol)) {
                                      return;
                                  }
                                  if (symbol.flags & 2048 || symbol.flags & 4096) {
                                      return;
                                  }
                                  appendParentTypeArgumentsAndSymbolName(symbol);
                              }
                          }
                      }
                      var isTypeParameter = symbol.flags & 262144;
                      var typeFormatFlag = 128 & typeFlags;
                      if (!isTypeParameter && (enclosingDeclaration || typeFormatFlag)) {
                          walkSymbol(symbol, meaning);
                          return;
                      }
                      return appendParentTypeArgumentsAndSymbolName(symbol);
                  }
                  function buildTypeDisplay(type, writer, enclosingDeclaration, globalFlags, typeStack) {
                      var globalFlagsToPass = globalFlags & 16;
                      return writeType(type, globalFlags);
                      function writeType(type, flags) {
                          if (type.flags & 1048703) {
                              writer.writeKeyword(!(globalFlags & 16) &&
                                  (type.flags & 1) ? "any" : type.intrinsicName);
                          }
                          else if (type.flags & 4096) {
                              writeTypeReference(type, flags);
                          }
                          else if (type.flags & (1024 | 2048 | 128 | 512)) {
                              buildSymbolDisplay(type.symbol, writer, enclosingDeclaration, 793056, 0, flags);
                          }
                          else if (type.flags & 8192) {
                              writeTupleType(type);
                          }
                          else if (type.flags & 16384) {
                              writeUnionType(type, flags);
                          }
                          else if (type.flags & 32768) {
                              writeAnonymousType(type, flags);
                          }
                          else if (type.flags & 256) {
                              writer.writeStringLiteral(type.text);
                          }
                          else {
                              writePunctuation(writer, 14);
                              writeSpace(writer);
                              writePunctuation(writer, 21);
                              writeSpace(writer);
                              writePunctuation(writer, 15);
                          }
                      }
                      function writeTypeList(types, union) {
                          for (var i = 0; i < types.length; i++) {
                              if (i > 0) {
                                  if (union) {
                                      writeSpace(writer);
                                  }
                                  writePunctuation(writer, union ? 44 : 23);
                                  writeSpace(writer);
                              }
                              writeType(types[i], union ? 64 : 0);
                          }
                      }
                      function writeTypeReference(type, flags) {
                          if (type.target === globalArrayType && !(flags & 1)) {
                              writeType(type.typeArguments[0], 64);
                              writePunctuation(writer, 18);
                              writePunctuation(writer, 19);
                          }
                          else {
                              buildSymbolDisplay(type.target.symbol, writer, enclosingDeclaration, 793056);
                              writePunctuation(writer, 24);
                              writeTypeList(type.typeArguments, false);
                              writePunctuation(writer, 25);
                          }
                      }
                      function writeTupleType(type) {
                          writePunctuation(writer, 18);
                          writeTypeList(type.elementTypes, false);
                          writePunctuation(writer, 19);
                      }
                      function writeUnionType(type, flags) {
                          if (flags & 64) {
                              writePunctuation(writer, 16);
                          }
                          writeTypeList(type.types, true);
                          if (flags & 64) {
                              writePunctuation(writer, 17);
                          }
                      }
                      function writeAnonymousType(type, flags) {
                          if (type.symbol && type.symbol.flags & (32 | 384 | 512)) {
                              writeTypeofSymbol(type, flags);
                          }
                          else if (shouldWriteTypeOfFunctionSymbol()) {
                              writeTypeofSymbol(type, flags);
                          }
                          else if (typeStack && ts.contains(typeStack, type)) {
                              var typeAlias = getTypeAliasForTypeLiteral(type);
                              if (typeAlias) {
                                  buildSymbolDisplay(typeAlias, writer, enclosingDeclaration, 793056, 0, flags);
                              }
                              else {
                                  writeKeyword(writer, 112);
                              }
                          }
                          else {
                              if (!typeStack) {
                                  typeStack = [];
                              }
                              typeStack.push(type);
                              writeLiteralType(type, flags);
                              typeStack.pop();
                          }
                          function shouldWriteTypeOfFunctionSymbol() {
                              if (type.symbol) {
                                  var isStaticMethodSymbol = !!(type.symbol.flags & 8192 &&
                                      ts.forEach(type.symbol.declarations, function (declaration) { return declaration.flags & 128; }));
                                  var isNonLocalFunctionSymbol = !!(type.symbol.flags & 16) &&
                                      (type.symbol.parent ||
                                          ts.forEach(type.symbol.declarations, function (declaration) {
                                              return declaration.parent.kind === 228 || declaration.parent.kind === 207;
                                          }));
                                  if (isStaticMethodSymbol || isNonLocalFunctionSymbol) {
                                      return !!(flags & 2) ||
                                          (typeStack && ts.contains(typeStack, type));
                                  }
                              }
                          }
                      }
                      function writeTypeofSymbol(type, typeFormatFlags) {
                          writeKeyword(writer, 97);
                          writeSpace(writer);
                          buildSymbolDisplay(type.symbol, writer, enclosingDeclaration, 107455, 0, typeFormatFlags);
                      }
                      function getIndexerParameterName(type, indexKind, fallbackName) {
                          var declaration = getIndexDeclarationOfSymbol(type.symbol, indexKind);
                          if (!declaration) {
                              return fallbackName;
                          }
                          ts.Debug.assert(declaration.parameters.length !== 0);
                          return ts.declarationNameToString(declaration.parameters[0].name);
                      }
                      function writeLiteralType(type, flags) {
                          var resolved = resolveObjectOrUnionTypeMembers(type);
                          if (!resolved.properties.length && !resolved.stringIndexType && !resolved.numberIndexType) {
                              if (!resolved.callSignatures.length && !resolved.constructSignatures.length) {
                                  writePunctuation(writer, 14);
                                  writePunctuation(writer, 15);
                                  return;
                              }
                              if (resolved.callSignatures.length === 1 && !resolved.constructSignatures.length) {
                                  if (flags & 64) {
                                      writePunctuation(writer, 16);
                                  }
                                  buildSignatureDisplay(resolved.callSignatures[0], writer, enclosingDeclaration, globalFlagsToPass | 8, typeStack);
                                  if (flags & 64) {
                                      writePunctuation(writer, 17);
                                  }
                                  return;
                              }
                              if (resolved.constructSignatures.length === 1 && !resolved.callSignatures.length) {
                                  if (flags & 64) {
                                      writePunctuation(writer, 16);
                                  }
                                  writeKeyword(writer, 88);
                                  writeSpace(writer);
                                  buildSignatureDisplay(resolved.constructSignatures[0], writer, enclosingDeclaration, globalFlagsToPass | 8, typeStack);
                                  if (flags & 64) {
                                      writePunctuation(writer, 17);
                                  }
                                  return;
                              }
                          }
                          writePunctuation(writer, 14);
                          writer.writeLine();
                          writer.increaseIndent();
                          for (var _i = 0, _a = resolved.callSignatures; _i < _a.length; _i++) {
                              var signature = _a[_i];
                              buildSignatureDisplay(signature, writer, enclosingDeclaration, globalFlagsToPass, typeStack);
                              writePunctuation(writer, 22);
                              writer.writeLine();
                          }
                          for (var _b = 0, _c = resolved.constructSignatures; _b < _c.length; _b++) {
                              var signature = _c[_b];
                              writeKeyword(writer, 88);
                              writeSpace(writer);
                              buildSignatureDisplay(signature, writer, enclosingDeclaration, globalFlagsToPass, typeStack);
                              writePunctuation(writer, 22);
                              writer.writeLine();
                          }
                          if (resolved.stringIndexType) {
                              writePunctuation(writer, 18);
                              writer.writeParameter(getIndexerParameterName(resolved, 0, "x"));
                              writePunctuation(writer, 51);
                              writeSpace(writer);
                              writeKeyword(writer, 122);
                              writePunctuation(writer, 19);
                              writePunctuation(writer, 51);
                              writeSpace(writer);
                              writeType(resolved.stringIndexType, 0);
                              writePunctuation(writer, 22);
                              writer.writeLine();
                          }
                          if (resolved.numberIndexType) {
                              writePunctuation(writer, 18);
                              writer.writeParameter(getIndexerParameterName(resolved, 1, "x"));
                              writePunctuation(writer, 51);
                              writeSpace(writer);
                              writeKeyword(writer, 120);
                              writePunctuation(writer, 19);
                              writePunctuation(writer, 51);
                              writeSpace(writer);
                              writeType(resolved.numberIndexType, 0);
                              writePunctuation(writer, 22);
                              writer.writeLine();
                          }
                          for (var _d = 0, _e = resolved.properties; _d < _e.length; _d++) {
                              var p = _e[_d];
                              var t = getTypeOfSymbol(p);
                              if (p.flags & (16 | 8192) && !getPropertiesOfObjectType(t).length) {
                                  var signatures = getSignaturesOfType(t, 0);
                                  for (var _f = 0; _f < signatures.length; _f++) {
                                      var signature = signatures[_f];
                                      buildSymbolDisplay(p, writer);
                                      if (p.flags & 536870912) {
                                          writePunctuation(writer, 50);
                                      }
                                      buildSignatureDisplay(signature, writer, enclosingDeclaration, globalFlagsToPass, typeStack);
                                      writePunctuation(writer, 22);
                                      writer.writeLine();
                                  }
                              }
                              else {
                                  buildSymbolDisplay(p, writer);
                                  if (p.flags & 536870912) {
                                      writePunctuation(writer, 50);
                                  }
                                  writePunctuation(writer, 51);
                                  writeSpace(writer);
                                  writeType(t, 0);
                                  writePunctuation(writer, 22);
                                  writer.writeLine();
                              }
                          }
                          writer.decreaseIndent();
                          writePunctuation(writer, 15);
                      }
                  }
                  function buildTypeParameterDisplayFromSymbol(symbol, writer, enclosingDeclaraiton, flags) {
                      var targetSymbol = getTargetSymbol(symbol);
                      if (targetSymbol.flags & 32 || targetSymbol.flags & 64) {
                          buildDisplayForTypeParametersAndDelimiters(getTypeParametersOfClassOrInterface(symbol), writer, enclosingDeclaraiton, flags);
                      }
                  }
                  function buildTypeParameterDisplay(tp, writer, enclosingDeclaration, flags, typeStack) {
                      appendSymbolNameOnly(tp.symbol, writer);
                      var constraint = getConstraintOfTypeParameter(tp);
                      if (constraint) {
                          writeSpace(writer);
                          writeKeyword(writer, 79);
                          writeSpace(writer);
                          buildTypeDisplay(constraint, writer, enclosingDeclaration, flags, typeStack);
                      }
                  }
                  function buildParameterDisplay(p, writer, enclosingDeclaration, flags, typeStack) {
                      if (ts.hasDotDotDotToken(p.valueDeclaration)) {
                          writePunctuation(writer, 21);
                      }
                      appendSymbolNameOnly(p, writer);
                      if (ts.hasQuestionToken(p.valueDeclaration) || p.valueDeclaration.initializer) {
                          writePunctuation(writer, 50);
                      }
                      writePunctuation(writer, 51);
                      writeSpace(writer);
                      buildTypeDisplay(getTypeOfSymbol(p), writer, enclosingDeclaration, flags, typeStack);
                  }
                  function buildDisplayForTypeParametersAndDelimiters(typeParameters, writer, enclosingDeclaration, flags, typeStack) {
                      if (typeParameters && typeParameters.length) {
                          writePunctuation(writer, 24);
                          for (var i = 0; i < typeParameters.length; i++) {
                              if (i > 0) {
                                  writePunctuation(writer, 23);
                                  writeSpace(writer);
                              }
                              buildTypeParameterDisplay(typeParameters[i], writer, enclosingDeclaration, flags, typeStack);
                          }
                          writePunctuation(writer, 25);
                      }
                  }
                  function buildDisplayForTypeArgumentsAndDelimiters(typeParameters, mapper, writer, enclosingDeclaration, flags, typeStack) {
                      if (typeParameters && typeParameters.length) {
                          writePunctuation(writer, 24);
                          for (var i = 0; i < typeParameters.length; i++) {
                              if (i > 0) {
                                  writePunctuation(writer, 23);
                                  writeSpace(writer);
                              }
                              buildTypeDisplay(mapper(typeParameters[i]), writer, enclosingDeclaration, 0);
                          }
                          writePunctuation(writer, 25);
                      }
                  }
                  function buildDisplayForParametersAndDelimiters(parameters, writer, enclosingDeclaration, flags, typeStack) {
                      writePunctuation(writer, 16);
                      for (var i = 0; i < parameters.length; i++) {
                          if (i > 0) {
                              writePunctuation(writer, 23);
                              writeSpace(writer);
                          }
                          buildParameterDisplay(parameters[i], writer, enclosingDeclaration, flags, typeStack);
                      }
                      writePunctuation(writer, 17);
                  }
                  function buildReturnTypeDisplay(signature, writer, enclosingDeclaration, flags, typeStack) {
                      if (flags & 8) {
                          writeSpace(writer);
                          writePunctuation(writer, 32);
                      }
                      else {
                          writePunctuation(writer, 51);
                      }
                      writeSpace(writer);
                      buildTypeDisplay(getReturnTypeOfSignature(signature), writer, enclosingDeclaration, flags, typeStack);
                  }
                  function buildSignatureDisplay(signature, writer, enclosingDeclaration, flags, typeStack) {
                      if (signature.target && (flags & 32)) {
                          buildDisplayForTypeArgumentsAndDelimiters(signature.target.typeParameters, signature.mapper, writer, enclosingDeclaration);
                      }
                      else {
                          buildDisplayForTypeParametersAndDelimiters(signature.typeParameters, writer, enclosingDeclaration, flags, typeStack);
                      }
                      buildDisplayForParametersAndDelimiters(signature.parameters, writer, enclosingDeclaration, flags, typeStack);
                      buildReturnTypeDisplay(signature, writer, enclosingDeclaration, flags, typeStack);
                  }
                  return _displayBuilder || (_displayBuilder = {
                      symbolToString: symbolToString,
                      typeToString: typeToString,
                      buildSymbolDisplay: buildSymbolDisplay,
                      buildTypeDisplay: buildTypeDisplay,
                      buildTypeParameterDisplay: buildTypeParameterDisplay,
                      buildParameterDisplay: buildParameterDisplay,
                      buildDisplayForParametersAndDelimiters: buildDisplayForParametersAndDelimiters,
                      buildDisplayForTypeParametersAndDelimiters: buildDisplayForTypeParametersAndDelimiters,
                      buildDisplayForTypeArgumentsAndDelimiters: buildDisplayForTypeArgumentsAndDelimiters,
                      buildTypeParameterDisplayFromSymbol: buildTypeParameterDisplayFromSymbol,
                      buildSignatureDisplay: buildSignatureDisplay,
                      buildReturnTypeDisplay: buildReturnTypeDisplay
                  });
              }
              function isDeclarationVisible(node) {
                  function getContainingExternalModule(node) {
                      for (; node; node = node.parent) {
                          if (node.kind === 206) {
                              if (node.name.kind === 8) {
                                  return node;
                              }
                          }
                          else if (node.kind === 228) {
                              return ts.isExternalModule(node) ? node : undefined;
                          }
                      }
                      ts.Debug.fail("getContainingModule cant reach here");
                  }
                  function isUsedInExportAssignment(node) {
                      var externalModule = getContainingExternalModule(node);
                      var exportAssignmentSymbol;
                      var resolvedExportSymbol;
                      if (externalModule) {
                          var externalModuleSymbol = getSymbolOfNode(externalModule);
                          exportAssignmentSymbol = getExportAssignmentSymbol(externalModuleSymbol);
                          var symbolOfNode = getSymbolOfNode(node);
                          if (isSymbolUsedInExportAssignment(symbolOfNode)) {
                              return true;
                          }
                          if (symbolOfNode.flags & 8388608) {
                              return isSymbolUsedInExportAssignment(resolveAlias(symbolOfNode));
                          }
                      }
                      function isSymbolUsedInExportAssignment(symbol) {
                          if (exportAssignmentSymbol === symbol) {
                              return true;
                          }
                          if (exportAssignmentSymbol && !!(exportAssignmentSymbol.flags & 8388608)) {
                              resolvedExportSymbol = resolvedExportSymbol || resolveAlias(exportAssignmentSymbol);
                              if (resolvedExportSymbol === symbol) {
                                  return true;
                              }
                              return ts.forEach(resolvedExportSymbol.declarations, function (current) {
                                  while (current) {
                                      if (current === node) {
                                          return true;
                                      }
                                      current = current.parent;
                                  }
                              });
                          }
                      }
                  }
                  function determineIfDeclarationIsVisible() {
                      switch (node.kind) {
                          case 153:
                              return isDeclarationVisible(node.parent.parent);
                          case 199:
                              if (ts.isBindingPattern(node.name) &&
                                  !node.name.elements.length) {
                                  return false;
                              }
                          case 206:
                          case 202:
                          case 203:
                          case 204:
                          case 201:
                          case 205:
                          case 209:
                              var parent_2 = getDeclarationContainer(node);
                              if (!(ts.getCombinedNodeFlags(node) & 1) &&
                                  !(node.kind !== 209 && parent_2.kind !== 228 && ts.isInAmbientContext(parent_2))) {
                                  return isGlobalSourceFile(parent_2);
                              }
                              return isDeclarationVisible(parent_2);
                          case 133:
                          case 132:
                          case 137:
                          case 138:
                          case 135:
                          case 134:
                              if (node.flags & (32 | 64)) {
                                  return false;
                              }
                          case 136:
                          case 140:
                          case 139:
                          case 141:
                          case 130:
                          case 207:
                          case 143:
                          case 144:
                          case 146:
                          case 142:
                          case 147:
                          case 148:
                          case 149:
                          case 150:
                              return isDeclarationVisible(node.parent);
                          case 211:
                          case 212:
                          case 214:
                              return false;
                          case 129:
                          case 228:
                              return true;
                          case 215:
                              return false;
                          default:
                              ts.Debug.fail("isDeclarationVisible unknown: SyntaxKind: " + node.kind);
                      }
                  }
                  if (node) {
                      var links = getNodeLinks(node);
                      if (links.isVisible === undefined) {
                          links.isVisible = !!determineIfDeclarationIsVisible();
                      }
                      return links.isVisible;
                  }
              }
              function collectLinkedAliases(node) {
                  var exportSymbol;
                  if (node.parent && node.parent.kind === 215) {
                      exportSymbol = resolveName(node.parent, node.text, 107455 | 793056 | 1536, ts.Diagnostics.Cannot_find_name_0, node);
                  }
                  else if (node.parent.kind === 218) {
                      exportSymbol = getTargetOfExportSpecifier(node.parent);
                  }
                  var result = [];
                  if (exportSymbol) {
                      buildVisibleNodeList(exportSymbol.declarations);
                  }
                  return result;
                  function buildVisibleNodeList(declarations) {
                      ts.forEach(declarations, function (declaration) {
                          getNodeLinks(declaration).isVisible = true;
                          var resultNode = getAnyImportSyntax(declaration) || declaration;
                          if (!ts.contains(result, resultNode)) {
                              result.push(resultNode);
                          }
                          if (ts.isInternalModuleImportEqualsDeclaration(declaration)) {
                              var internalModuleReference = declaration.moduleReference;
                              var firstIdentifier = getFirstIdentifier(internalModuleReference);
                              var importSymbol = resolveName(declaration, firstIdentifier.text, 107455 | 793056 | 1536, ts.Diagnostics.Cannot_find_name_0, firstIdentifier);
                              buildVisibleNodeList(importSymbol.declarations);
                          }
                      });
                  }
              }
              function pushTypeResolution(target) {
                  var i = 0;
                  var count = resolutionTargets.length;
                  while (i < count && resolutionTargets[i] !== target) {
                      i++;
                  }
                  if (i < count) {
                      do {
                          resolutionResults[i++] = false;
                      } while (i < count);
                      return false;
                  }
                  resolutionTargets.push(target);
                  resolutionResults.push(true);
                  return true;
              }
              function popTypeResolution() {
                  resolutionTargets.pop();
                  return resolutionResults.pop();
              }
              function getDeclarationContainer(node) {
                  node = ts.getRootDeclaration(node);
                  return node.kind === 199 ? node.parent.parent.parent : node.parent;
              }
              function getTypeOfPrototypeProperty(prototype) {
                  var classType = getDeclaredTypeOfSymbol(prototype.parent);
                  return classType.typeParameters ? createTypeReference(classType, ts.map(classType.typeParameters, function (_) { return anyType; })) : classType;
              }
              function getTypeOfPropertyOfType(type, name) {
                  var prop = getPropertyOfType(type, name);
                  return prop ? getTypeOfSymbol(prop) : undefined;
              }
              function getTypeForBindingElement(declaration) {
                  var pattern = declaration.parent;
                  var parentType = getTypeForVariableLikeDeclaration(pattern.parent);
                  if (parentType === unknownType) {
                      return unknownType;
                  }
                  if (!parentType || parentType === anyType) {
                      if (declaration.initializer) {
                          return checkExpressionCached(declaration.initializer);
                      }
                      return parentType;
                  }
                  var type;
                  if (pattern.kind === 151) {
                      var name_5 = declaration.propertyName || declaration.name;
                      type = getTypeOfPropertyOfType(parentType, name_5.text) ||
                          isNumericLiteralName(name_5.text) && getIndexTypeOfType(parentType, 1) ||
                          getIndexTypeOfType(parentType, 0);
                      if (!type) {
                          error(name_5, ts.Diagnostics.Type_0_has_no_property_1_and_no_string_index_signature, typeToString(parentType), ts.declarationNameToString(name_5));
                          return unknownType;
                      }
                  }
                  else {
                      var elementType = checkIteratedTypeOrElementType(parentType, pattern, false);
                      if (!declaration.dotDotDotToken) {
                          if (elementType.flags & 1) {
                              return elementType;
                          }
                          var propName = "" + ts.indexOf(pattern.elements, declaration);
                          type = isTupleLikeType(parentType)
                              ? getTypeOfPropertyOfType(parentType, propName)
                              : elementType;
                          if (!type) {
                              if (isTupleType(parentType)) {
                                  error(declaration, ts.Diagnostics.Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2, typeToString(parentType), parentType.elementTypes.length, pattern.elements.length);
                              }
                              else {
                                  error(declaration, ts.Diagnostics.Type_0_has_no_property_1, typeToString(parentType), propName);
                              }
                              return unknownType;
                          }
                      }
                      else {
                          type = createArrayType(elementType);
                      }
                  }
                  return type;
              }
              function getTypeForVariableLikeDeclaration(declaration) {
                  if (declaration.parent.parent.kind === 188) {
                      return anyType;
                  }
                  if (declaration.parent.parent.kind === 189) {
                      return checkRightHandSideOfForOf(declaration.parent.parent.expression) || anyType;
                  }
                  if (ts.isBindingPattern(declaration.parent)) {
                      return getTypeForBindingElement(declaration);
                  }
                  if (declaration.type) {
                      return getTypeFromTypeNode(declaration.type);
                  }
                  if (declaration.kind === 130) {
                      var func = declaration.parent;
                      if (func.kind === 138 && !ts.hasDynamicName(func)) {
                          var getter = ts.getDeclarationOfKind(declaration.parent.symbol, 137);
                          if (getter) {
                              return getReturnTypeOfSignature(getSignatureFromDeclaration(getter));
                          }
                      }
                      var type = getContextuallyTypedParameterType(declaration);
                      if (type) {
                          return type;
                      }
                  }
                  if (declaration.initializer) {
                      return checkExpressionCached(declaration.initializer);
                  }
                  if (declaration.kind === 226) {
                      return checkIdentifier(declaration.name);
                  }
                  return undefined;
              }
              function getTypeFromBindingElement(element) {
                  if (element.initializer) {
                      return getWidenedType(checkExpressionCached(element.initializer));
                  }
                  if (ts.isBindingPattern(element.name)) {
                      return getTypeFromBindingPattern(element.name);
                  }
                  return anyType;
              }
              function getTypeFromObjectBindingPattern(pattern) {
                  var members = {};
                  ts.forEach(pattern.elements, function (e) {
                      var flags = 4 | 67108864 | (e.initializer ? 536870912 : 0);
                      var name = e.propertyName || e.name;
                      var symbol = createSymbol(flags, name.text);
                      symbol.type = getTypeFromBindingElement(e);
                      members[symbol.name] = symbol;
                  });
                  return createAnonymousType(undefined, members, emptyArray, emptyArray, undefined, undefined);
              }
              function getTypeFromArrayBindingPattern(pattern) {
                  var hasSpreadElement = false;
                  var elementTypes = [];
                  ts.forEach(pattern.elements, function (e) {
                      elementTypes.push(e.kind === 176 || e.dotDotDotToken ? anyType : getTypeFromBindingElement(e));
                      if (e.dotDotDotToken) {
                          hasSpreadElement = true;
                      }
                  });
                  if (!elementTypes.length) {
                      return languageVersion >= 2 ? createIterableType(anyType) : anyArrayType;
                  }
                  else if (hasSpreadElement) {
                      var unionOfElements = getUnionType(elementTypes);
                      return languageVersion >= 2 ? createIterableType(unionOfElements) : createArrayType(unionOfElements);
                  }
                  return createTupleType(elementTypes);
              }
              function getTypeFromBindingPattern(pattern) {
                  return pattern.kind === 151
                      ? getTypeFromObjectBindingPattern(pattern)
                      : getTypeFromArrayBindingPattern(pattern);
              }
              function getWidenedTypeForVariableLikeDeclaration(declaration, reportErrors) {
                  var type = getTypeForVariableLikeDeclaration(declaration);
                  if (type) {
                      if (reportErrors) {
                          reportErrorsFromWidening(declaration, type);
                      }
                      return declaration.kind !== 225 ? getWidenedType(type) : type;
                  }
                  if (ts.isBindingPattern(declaration.name)) {
                      return getTypeFromBindingPattern(declaration.name);
                  }
                  type = declaration.dotDotDotToken ? anyArrayType : anyType;
                  if (reportErrors && compilerOptions.noImplicitAny) {
                      var root = ts.getRootDeclaration(declaration);
                      if (!isPrivateWithinAmbient(root) && !(root.kind === 130 && isPrivateWithinAmbient(root.parent))) {
                          reportImplicitAnyError(declaration, type);
                      }
                  }
                  return type;
              }
              function getTypeOfVariableOrParameterOrProperty(symbol) {
                  var links = getSymbolLinks(symbol);
                  if (!links.type) {
                      if (symbol.flags & 134217728) {
                          return links.type = getTypeOfPrototypeProperty(symbol);
                      }
                      var declaration = symbol.valueDeclaration;
                      if (declaration.parent.kind === 224) {
                          return links.type = anyType;
                      }
                      if (declaration.kind === 215) {
                          return links.type = checkExpression(declaration.expression);
                      }
                      if (!pushTypeResolution(symbol)) {
                          return unknownType;
                      }
                      var type = getWidenedTypeForVariableLikeDeclaration(declaration, true);
                      if (!popTypeResolution()) {
                          if (symbol.valueDeclaration.type) {
                              type = unknownType;
                              error(symbol.valueDeclaration, ts.Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol));
                          }
                          else {
                              type = anyType;
                              if (compilerOptions.noImplicitAny) {
                                  error(symbol.valueDeclaration, ts.Diagnostics._0_implicitly_has_type_any_because_it_is_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer, symbolToString(symbol));
                              }
                          }
                      }
                      links.type = type;
                  }
                  return links.type;
              }
              function getSetAccessorTypeAnnotationNode(accessor) {
                  return accessor && accessor.parameters.length > 0 && accessor.parameters[0].type;
              }
              function getAnnotatedAccessorType(accessor) {
                  if (accessor) {
                      if (accessor.kind === 137) {
                          return accessor.type && getTypeFromTypeNode(accessor.type);
                      }
                      else {
                          var setterTypeAnnotation = getSetAccessorTypeAnnotationNode(accessor);
                          return setterTypeAnnotation && getTypeFromTypeNode(setterTypeAnnotation);
                      }
                  }
                  return undefined;
              }
              function getTypeOfAccessors(symbol) {
                  var links = getSymbolLinks(symbol);
                  if (!links.type) {
                      if (!pushTypeResolution(symbol)) {
                          return unknownType;
                      }
                      var getter = ts.getDeclarationOfKind(symbol, 137);
                      var setter = ts.getDeclarationOfKind(symbol, 138);
                      var type;
                      var getterReturnType = getAnnotatedAccessorType(getter);
                      if (getterReturnType) {
                          type = getterReturnType;
                      }
                      else {
                          var setterParameterType = getAnnotatedAccessorType(setter);
                          if (setterParameterType) {
                              type = setterParameterType;
                          }
                          else {
                              if (getter && getter.body) {
                                  type = getReturnTypeFromBody(getter);
                              }
                              else {
                                  if (compilerOptions.noImplicitAny) {
                                      error(setter, ts.Diagnostics.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_type_annotation, symbolToString(symbol));
                                  }
                                  type = anyType;
                              }
                          }
                      }
                      if (!popTypeResolution()) {
                          type = anyType;
                          if (compilerOptions.noImplicitAny) {
                              var getter_1 = ts.getDeclarationOfKind(symbol, 137);
                              error(getter_1, ts.Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions, symbolToString(symbol));
                          }
                      }
                      links.type = type;
                  }
                  return links.type;
              }
              function getTypeOfFuncClassEnumModule(symbol) {
                  var links = getSymbolLinks(symbol);
                  if (!links.type) {
                      links.type = createObjectType(32768, symbol);
                  }
                  return links.type;
              }
              function getTypeOfEnumMember(symbol) {
                  var links = getSymbolLinks(symbol);
                  if (!links.type) {
                      links.type = getDeclaredTypeOfEnum(getParentOfSymbol(symbol));
                  }
                  return links.type;
              }
              function getTypeOfAlias(symbol) {
                  var links = getSymbolLinks(symbol);
                  if (!links.type) {
                      var targetSymbol = resolveAlias(symbol);
                      links.type = targetSymbol.flags & 107455
                          ? getTypeOfSymbol(targetSymbol)
                          : unknownType;
                  }
                  return links.type;
              }
              function getTypeOfInstantiatedSymbol(symbol) {
                  var links = getSymbolLinks(symbol);
                  if (!links.type) {
                      links.type = instantiateType(getTypeOfSymbol(links.target), links.mapper);
                  }
                  return links.type;
              }
              function getTypeOfSymbol(symbol) {
                  if (symbol.flags & 16777216) {
                      return getTypeOfInstantiatedSymbol(symbol);
                  }
                  if (symbol.flags & (3 | 4)) {
                      return getTypeOfVariableOrParameterOrProperty(symbol);
                  }
                  if (symbol.flags & (16 | 8192 | 32 | 384 | 512)) {
                      return getTypeOfFuncClassEnumModule(symbol);
                  }
                  if (symbol.flags & 8) {
                      return getTypeOfEnumMember(symbol);
                  }
                  if (symbol.flags & 98304) {
                      return getTypeOfAccessors(symbol);
                  }
                  if (symbol.flags & 8388608) {
                      return getTypeOfAlias(symbol);
                  }
                  return unknownType;
              }
              function getTargetType(type) {
                  return type.flags & 4096 ? type.target : type;
              }
              function hasBaseType(type, checkBase) {
                  return check(type);
                  function check(type) {
                      var target = getTargetType(type);
                      return target === checkBase || ts.forEach(getBaseTypes(target), check);
                  }
              }
              function getTypeParametersOfClassOrInterface(symbol) {
                  var result;
                  ts.forEach(symbol.declarations, function (node) {
                      if (node.kind === 203 || node.kind === 202) {
                          var declaration = node;
                          if (declaration.typeParameters && declaration.typeParameters.length) {
                              ts.forEach(declaration.typeParameters, function (node) {
                                  var tp = getDeclaredTypeOfTypeParameter(getSymbolOfNode(node));
                                  if (!result) {
                                      result = [tp];
                                  }
                                  else if (!ts.contains(result, tp)) {
                                      result.push(tp);
                                  }
                              });
                          }
                      }
                  });
                  return result;
              }
              function getBaseTypes(type) {
                  var typeWithBaseTypes = type;
                  if (!typeWithBaseTypes.baseTypes) {
                      if (type.symbol.flags & 32) {
                          resolveBaseTypesOfClass(typeWithBaseTypes);
                      }
                      else if (type.symbol.flags & 64) {
                          resolveBaseTypesOfInterface(typeWithBaseTypes);
                      }
                      else {
                          ts.Debug.fail("type must be class or interface");
                      }
                  }
                  return typeWithBaseTypes.baseTypes;
              }
              function resolveBaseTypesOfClass(type) {
                  type.baseTypes = [];
                  var declaration = ts.getDeclarationOfKind(type.symbol, 202);
                  var baseTypeNode = ts.getClassExtendsHeritageClauseElement(declaration);
                  if (baseTypeNode) {
                      var baseType = getTypeFromTypeNode(baseTypeNode);
                      if (baseType !== unknownType) {
                          if (getTargetType(baseType).flags & 1024) {
                              if (type !== baseType && !hasBaseType(baseType, type)) {
                                  type.baseTypes.push(baseType);
                              }
                              else {
                                  error(declaration, ts.Diagnostics.Type_0_recursively_references_itself_as_a_base_type, typeToString(type, undefined, 1));
                              }
                          }
                          else {
                              error(baseTypeNode, ts.Diagnostics.A_class_may_only_extend_another_class);
                          }
                      }
                  }
              }
              function resolveBaseTypesOfInterface(type) {
                  type.baseTypes = [];
                  for (var _i = 0, _a = type.symbol.declarations; _i < _a.length; _i++) {
                      var declaration = _a[_i];
                      if (declaration.kind === 203 && ts.getInterfaceBaseTypeNodes(declaration)) {
                          for (var _b = 0, _c = ts.getInterfaceBaseTypeNodes(declaration); _b < _c.length; _b++) {
                              var node = _c[_b];
                              var baseType = getTypeFromTypeNode(node);
                              if (baseType !== unknownType) {
                                  if (getTargetType(baseType).flags & (1024 | 2048)) {
                                      if (type !== baseType && !hasBaseType(baseType, type)) {
                                          type.baseTypes.push(baseType);
                                      }
                                      else {
                                          error(declaration, ts.Diagnostics.Type_0_recursively_references_itself_as_a_base_type, typeToString(type, undefined, 1));
                                      }
                                  }
                                  else {
                                      error(node, ts.Diagnostics.An_interface_may_only_extend_a_class_or_another_interface);
                                  }
                              }
                          }
                      }
                  }
              }
              function getDeclaredTypeOfClassOrInterface(symbol) {
                  var links = getSymbolLinks(symbol);
                  if (!links.declaredType) {
                      var kind = symbol.flags & 32 ? 1024 : 2048;
                      var type = links.declaredType = createObjectType(kind, symbol);
                      var typeParameters = getTypeParametersOfClassOrInterface(symbol);
                      if (typeParameters) {
                          type.flags |= 4096;
                          type.typeParameters = typeParameters;
                          type.instantiations = {};
                          type.instantiations[getTypeListId(type.typeParameters)] = type;
                          type.target = type;
                          type.typeArguments = type.typeParameters;
                      }
                  }
                  return links.declaredType;
              }
              function getDeclaredTypeOfTypeAlias(symbol) {
                  var links = getSymbolLinks(symbol);
                  if (!links.declaredType) {
                      if (!pushTypeResolution(links)) {
                          return unknownType;
                      }
                      var declaration = ts.getDeclarationOfKind(symbol, 204);
                      var type = getTypeFromTypeNode(declaration.type);
                      if (!popTypeResolution()) {
                          type = unknownType;
                          error(declaration.name, ts.Diagnostics.Type_alias_0_circularly_references_itself, symbolToString(symbol));
                      }
                      links.declaredType = type;
                  }
                  return links.declaredType;
              }
              function getDeclaredTypeOfEnum(symbol) {
                  var links = getSymbolLinks(symbol);
                  if (!links.declaredType) {
                      var type = createType(128);
                      type.symbol = symbol;
                      links.declaredType = type;
                  }
                  return links.declaredType;
              }
              function getDeclaredTypeOfTypeParameter(symbol) {
                  var links = getSymbolLinks(symbol);
                  if (!links.declaredType) {
                      var type = createType(512);
                      type.symbol = symbol;
                      if (!ts.getDeclarationOfKind(symbol, 129).constraint) {
                          type.constraint = noConstraintType;
                      }
                      links.declaredType = type;
                  }
                  return links.declaredType;
              }
              function getDeclaredTypeOfAlias(symbol) {
                  var links = getSymbolLinks(symbol);
                  if (!links.declaredType) {
                      links.declaredType = getDeclaredTypeOfSymbol(resolveAlias(symbol));
                  }
                  return links.declaredType;
              }
              function getDeclaredTypeOfSymbol(symbol) {
                  ts.Debug.assert((symbol.flags & 16777216) === 0);
                  if (symbol.flags & (32 | 64)) {
                      return getDeclaredTypeOfClassOrInterface(symbol);
                  }
                  if (symbol.flags & 524288) {
                      return getDeclaredTypeOfTypeAlias(symbol);
                  }
                  if (symbol.flags & 384) {
                      return getDeclaredTypeOfEnum(symbol);
                  }
                  if (symbol.flags & 262144) {
                      return getDeclaredTypeOfTypeParameter(symbol);
                  }
                  if (symbol.flags & 8388608) {
                      return getDeclaredTypeOfAlias(symbol);
                  }
                  return unknownType;
              }
              function createSymbolTable(symbols) {
                  var result = {};
                  for (var _i = 0; _i < symbols.length; _i++) {
                      var symbol = symbols[_i];
                      result[symbol.name] = symbol;
                  }
                  return result;
              }
              function createInstantiatedSymbolTable(symbols, mapper) {
                  var result = {};
                  for (var _i = 0; _i < symbols.length; _i++) {
                      var symbol = symbols[_i];
                      result[symbol.name] = instantiateSymbol(symbol, mapper);
                  }
                  return result;
              }
              function addInheritedMembers(symbols, baseSymbols) {
                  for (var _i = 0; _i < baseSymbols.length; _i++) {
                      var s = baseSymbols[_i];
                      if (!ts.hasProperty(symbols, s.name)) {
                          symbols[s.name] = s;
                      }
                  }
              }
              function addInheritedSignatures(signatures, baseSignatures) {
                  if (baseSignatures) {
                      for (var _i = 0; _i < baseSignatures.length; _i++) {
                          var signature = baseSignatures[_i];
                          signatures.push(signature);
                      }
                  }
              }
              function resolveDeclaredMembers(type) {
                  if (!type.declaredProperties) {
                      var symbol = type.symbol;
                      type.declaredProperties = getNamedMembers(symbol.members);
                      type.declaredCallSignatures = getSignaturesOfSymbol(symbol.members["__call"]);
                      type.declaredConstructSignatures = getSignaturesOfSymbol(symbol.members["__new"]);
                      type.declaredStringIndexType = getIndexTypeOfSymbol(symbol, 0);
                      type.declaredNumberIndexType = getIndexTypeOfSymbol(symbol, 1);
                  }
                  return type;
              }
              function resolveClassOrInterfaceMembers(type) {
                  var target = resolveDeclaredMembers(type);
                  var members = target.symbol.members;
                  var callSignatures = target.declaredCallSignatures;
                  var constructSignatures = target.declaredConstructSignatures;
                  var stringIndexType = target.declaredStringIndexType;
                  var numberIndexType = target.declaredNumberIndexType;
                  var baseTypes = getBaseTypes(target);
                  if (baseTypes.length) {
                      members = createSymbolTable(target.declaredProperties);
                      for (var _i = 0; _i < baseTypes.length; _i++) {
                          var baseType = baseTypes[_i];
                          addInheritedMembers(members, getPropertiesOfObjectType(baseType));
                          callSignatures = ts.concatenate(callSignatures, getSignaturesOfType(baseType, 0));
                          constructSignatures = ts.concatenate(constructSignatures, getSignaturesOfType(baseType, 1));
                          stringIndexType = stringIndexType || getIndexTypeOfType(baseType, 0);
                          numberIndexType = numberIndexType || getIndexTypeOfType(baseType, 1);
                      }
                  }
                  setObjectTypeMembers(type, members, callSignatures, constructSignatures, stringIndexType, numberIndexType);
              }
              function resolveTypeReferenceMembers(type) {
                  var target = resolveDeclaredMembers(type.target);
                  var mapper = createTypeMapper(target.typeParameters, type.typeArguments);
                  var members = createInstantiatedSymbolTable(target.declaredProperties, mapper);
                  var callSignatures = instantiateList(target.declaredCallSignatures, mapper, instantiateSignature);
                  var constructSignatures = instantiateList(target.declaredConstructSignatures, mapper, instantiateSignature);
                  var stringIndexType = target.declaredStringIndexType ? instantiateType(target.declaredStringIndexType, mapper) : undefined;
                  var numberIndexType = target.declaredNumberIndexType ? instantiateType(target.declaredNumberIndexType, mapper) : undefined;
                  ts.forEach(getBaseTypes(target), function (baseType) {
                      var instantiatedBaseType = instantiateType(baseType, mapper);
                      addInheritedMembers(members, getPropertiesOfObjectType(instantiatedBaseType));
                      callSignatures = ts.concatenate(callSignatures, getSignaturesOfType(instantiatedBaseType, 0));
                      constructSignatures = ts.concatenate(constructSignatures, getSignaturesOfType(instantiatedBaseType, 1));
                      stringIndexType = stringIndexType || getIndexTypeOfType(instantiatedBaseType, 0);
                      numberIndexType = numberIndexType || getIndexTypeOfType(instantiatedBaseType, 1);
                  });
                  setObjectTypeMembers(type, members, callSignatures, constructSignatures, stringIndexType, numberIndexType);
              }
              function createSignature(declaration, typeParameters, parameters, resolvedReturnType, minArgumentCount, hasRestParameter, hasStringLiterals) {
                  var sig = new Signature(checker);
                  sig.declaration = declaration;
                  sig.typeParameters = typeParameters;
                  sig.parameters = parameters;
                  sig.resolvedReturnType = resolvedReturnType;
                  sig.minArgumentCount = minArgumentCount;
                  sig.hasRestParameter = hasRestParameter;
                  sig.hasStringLiterals = hasStringLiterals;
                  return sig;
              }
              function cloneSignature(sig) {
                  return createSignature(sig.declaration, sig.typeParameters, sig.parameters, sig.resolvedReturnType, sig.minArgumentCount, sig.hasRestParameter, sig.hasStringLiterals);
              }
              function getDefaultConstructSignatures(classType) {
                  var baseTypes = getBaseTypes(classType);
                  if (baseTypes.length) {
                      var baseType = baseTypes[0];
                      var baseSignatures = getSignaturesOfType(getTypeOfSymbol(baseType.symbol), 1);
                      return ts.map(baseSignatures, function (baseSignature) {
                          var signature = baseType.flags & 4096 ?
                              getSignatureInstantiation(baseSignature, baseType.typeArguments) : cloneSignature(baseSignature);
                          signature.typeParameters = classType.typeParameters;
                          signature.resolvedReturnType = classType;
                          return signature;
                      });
                  }
                  return [createSignature(undefined, classType.typeParameters, emptyArray, classType, 0, false, false)];
              }
              function createTupleTypeMemberSymbols(memberTypes) {
                  var members = {};
                  for (var i = 0; i < memberTypes.length; i++) {
                      var symbol = createSymbol(4 | 67108864, "" + i);
                      symbol.type = memberTypes[i];
                      members[i] = symbol;
                  }
                  return members;
              }
              function resolveTupleTypeMembers(type) {
                  var arrayType = resolveObjectOrUnionTypeMembers(createArrayType(getUnionType(type.elementTypes)));
                  var members = createTupleTypeMemberSymbols(type.elementTypes);
                  addInheritedMembers(members, arrayType.properties);
                  setObjectTypeMembers(type, members, arrayType.callSignatures, arrayType.constructSignatures, arrayType.stringIndexType, arrayType.numberIndexType);
              }
              function signatureListsIdentical(s, t) {
                  if (s.length !== t.length) {
                      return false;
                  }
                  for (var i = 0; i < s.length; i++) {
                      if (!compareSignatures(s[i], t[i], false, compareTypes)) {
                          return false;
                      }
                  }
                  return true;
              }
              function getUnionSignatures(types, kind) {
                  var signatureLists = ts.map(types, function (t) { return getSignaturesOfType(t, kind); });
                  var signatures = signatureLists[0];
                  for (var _i = 0; _i < signatures.length; _i++) {
                      var signature = signatures[_i];
                      if (signature.typeParameters) {
                          return emptyArray;
                      }
                  }
                  for (var i_1 = 1; i_1 < signatureLists.length; i_1++) {
                      if (!signatureListsIdentical(signatures, signatureLists[i_1])) {
                          return emptyArray;
                      }
                  }
                  var result = ts.map(signatures, cloneSignature);
                  for (var i = 0; i < result.length; i++) {
                      var s = result[i];
                      s.resolvedReturnType = undefined;
                      s.unionSignatures = ts.map(signatureLists, function (signatures) { return signatures[i]; });
                  }
                  return result;
              }
              function getUnionIndexType(types, kind) {
                  var indexTypes = [];
                  for (var _i = 0; _i < types.length; _i++) {
                      var type = types[_i];
                      var indexType = getIndexTypeOfType(type, kind);
                      if (!indexType) {
                          return undefined;
                      }
                      indexTypes.push(indexType);
                  }
                  return getUnionType(indexTypes);
              }
              function resolveUnionTypeMembers(type) {
                  var callSignatures = getUnionSignatures(type.types, 0);
                  var constructSignatures = getUnionSignatures(type.types, 1);
                  var stringIndexType = getUnionIndexType(type.types, 0);
                  var numberIndexType = getUnionIndexType(type.types, 1);
                  setObjectTypeMembers(type, emptySymbols, callSignatures, constructSignatures, stringIndexType, numberIndexType);
              }
              function resolveAnonymousTypeMembers(type) {
                  var symbol = type.symbol;
                  var members;
                  var callSignatures;
                  var constructSignatures;
                  var stringIndexType;
                  var numberIndexType;
                  if (symbol.flags & 2048) {
                      members = symbol.members;
                      callSignatures = getSignaturesOfSymbol(members["__call"]);
                      constructSignatures = getSignaturesOfSymbol(members["__new"]);
                      stringIndexType = getIndexTypeOfSymbol(symbol, 0);
                      numberIndexType = getIndexTypeOfSymbol(symbol, 1);
                  }
                  else {
                      members = emptySymbols;
                      callSignatures = emptyArray;
                      constructSignatures = emptyArray;
                      if (symbol.flags & 1952) {
                          members = getExportsOfSymbol(symbol);
                      }
                      if (symbol.flags & (16 | 8192)) {
                          callSignatures = getSignaturesOfSymbol(symbol);
                      }
                      if (symbol.flags & 32) {
                          var classType = getDeclaredTypeOfClassOrInterface(symbol);
                          constructSignatures = getSignaturesOfSymbol(symbol.members["__constructor"]);
                          if (!constructSignatures.length) {
                              constructSignatures = getDefaultConstructSignatures(classType);
                          }
                          var baseTypes = getBaseTypes(classType);
                          if (baseTypes.length) {
                              members = createSymbolTable(getNamedMembers(members));
                              addInheritedMembers(members, getPropertiesOfObjectType(getTypeOfSymbol(baseTypes[0].symbol)));
                          }
                      }
                      stringIndexType = undefined;
                      numberIndexType = (symbol.flags & 384) ? stringType : undefined;
                  }
                  setObjectTypeMembers(type, members, callSignatures, constructSignatures, stringIndexType, numberIndexType);
              }
              function resolveObjectOrUnionTypeMembers(type) {
                  if (!type.members) {
                      if (type.flags & (1024 | 2048)) {
                          resolveClassOrInterfaceMembers(type);
                      }
                      else if (type.flags & 32768) {
                          resolveAnonymousTypeMembers(type);
                      }
                      else if (type.flags & 8192) {
                          resolveTupleTypeMembers(type);
                      }
                      else if (type.flags & 16384) {
                          resolveUnionTypeMembers(type);
                      }
                      else {
                          resolveTypeReferenceMembers(type);
                      }
                  }
                  return type;
              }
              function getPropertiesOfObjectType(type) {
                  if (type.flags & 48128) {
                      return resolveObjectOrUnionTypeMembers(type).properties;
                  }
                  return emptyArray;
              }
              function getPropertyOfObjectType(type, name) {
                  if (type.flags & 48128) {
                      var resolved = resolveObjectOrUnionTypeMembers(type);
                      if (ts.hasProperty(resolved.members, name)) {
                          var symbol = resolved.members[name];
                          if (symbolIsValue(symbol)) {
                              return symbol;
                          }
                      }
                  }
              }
              function getPropertiesOfUnionType(type) {
                  var result = [];
                  ts.forEach(getPropertiesOfType(type.types[0]), function (prop) {
                      var unionProp = getPropertyOfUnionType(type, prop.name);
                      if (unionProp) {
                          result.push(unionProp);
                      }
                  });
                  return result;
              }
              function getPropertiesOfType(type) {
                  type = getApparentType(type);
                  return type.flags & 16384 ? getPropertiesOfUnionType(type) : getPropertiesOfObjectType(type);
              }
              function getApparentType(type) {
                  if (type.flags & 16384) {
                      type = getReducedTypeOfUnionType(type);
                  }
                  if (type.flags & 512) {
                      do {
                          type = getConstraintOfTypeParameter(type);
                      } while (type && type.flags & 512);
                      if (!type) {
                          type = emptyObjectType;
                      }
                  }
                  if (type.flags & 258) {
                      type = globalStringType;
                  }
                  else if (type.flags & 132) {
                      type = globalNumberType;
                  }
                  else if (type.flags & 8) {
                      type = globalBooleanType;
                  }
                  else if (type.flags & 1048576) {
                      type = globalESSymbolType;
                  }
                  return type;
              }
              function createUnionProperty(unionType, name) {
                  var types = unionType.types;
                  var props;
                  for (var _i = 0; _i < types.length; _i++) {
                      var current = types[_i];
                      var type = getApparentType(current);
                      if (type !== unknownType) {
                          var prop = getPropertyOfType(type, name);
                          if (!prop || getDeclarationFlagsFromSymbol(prop) & (32 | 64)) {
                              return undefined;
                          }
                          if (!props) {
                              props = [prop];
                          }
                          else {
                              props.push(prop);
                          }
                      }
                  }
                  var propTypes = [];
                  var declarations = [];
                  for (var _a = 0; _a < props.length; _a++) {
                      var prop = props[_a];
                      if (prop.declarations) {
                          declarations.push.apply(declarations, prop.declarations);
                      }
                      propTypes.push(getTypeOfSymbol(prop));
                  }
                  var result = createSymbol(4 | 67108864 | 268435456, name);
                  result.unionType = unionType;
                  result.declarations = declarations;
                  result.type = getUnionType(propTypes);
                  return result;
              }
              function getPropertyOfUnionType(type, name) {
                  var properties = type.resolvedProperties || (type.resolvedProperties = {});
                  if (ts.hasProperty(properties, name)) {
                      return properties[name];
                  }
                  var property = createUnionProperty(type, name);
                  if (property) {
                      properties[name] = property;
                  }
                  return property;
              }
              function getPropertyOfType(type, name) {
                  type = getApparentType(type);
                  if (type.flags & 48128) {
                      var resolved = resolveObjectOrUnionTypeMembers(type);
                      if (ts.hasProperty(resolved.members, name)) {
                          var symbol = resolved.members[name];
                          if (symbolIsValue(symbol)) {
                              return symbol;
                          }
                      }
                      if (resolved === anyFunctionType || resolved.callSignatures.length || resolved.constructSignatures.length) {
                          var symbol = getPropertyOfObjectType(globalFunctionType, name);
                          if (symbol) {
                              return symbol;
                          }
                      }
                      return getPropertyOfObjectType(globalObjectType, name);
                  }
                  if (type.flags & 16384) {
                      return getPropertyOfUnionType(type, name);
                  }
                  return undefined;
              }
              function getSignaturesOfObjectOrUnionType(type, kind) {
                  if (type.flags & (48128 | 16384)) {
                      var resolved = resolveObjectOrUnionTypeMembers(type);
                      return kind === 0 ? resolved.callSignatures : resolved.constructSignatures;
                  }
                  return emptyArray;
              }
              function getSignaturesOfType(type, kind) {
                  return getSignaturesOfObjectOrUnionType(getApparentType(type), kind);
              }
              function typeHasCallOrConstructSignatures(type) {
                  var apparentType = getApparentType(type);
                  if (apparentType.flags & (48128 | 16384)) {
                      var resolved = resolveObjectOrUnionTypeMembers(type);
                      return resolved.callSignatures.length > 0
                          || resolved.constructSignatures.length > 0;
                  }
                  return false;
              }
              function getIndexTypeOfObjectOrUnionType(type, kind) {
                  if (type.flags & (48128 | 16384)) {
                      var resolved = resolveObjectOrUnionTypeMembers(type);
                      return kind === 0 ? resolved.stringIndexType : resolved.numberIndexType;
                  }
              }
              function getIndexTypeOfType(type, kind) {
                  return getIndexTypeOfObjectOrUnionType(getApparentType(type), kind);
              }
              function getTypeParametersFromDeclaration(typeParameterDeclarations) {
                  var result = [];
                  ts.forEach(typeParameterDeclarations, function (node) {
                      var tp = getDeclaredTypeOfTypeParameter(node.symbol);
                      if (!ts.contains(result, tp)) {
                          result.push(tp);
                      }
                  });
                  return result;
              }
              function symbolsToArray(symbols) {
                  var result = [];
                  for (var id in symbols) {
                      if (!isReservedMemberName(id)) {
                          result.push(symbols[id]);
                      }
                  }
                  return result;
              }
              function getSignatureFromDeclaration(declaration) {
                  var links = getNodeLinks(declaration);
                  if (!links.resolvedSignature) {
                      var classType = declaration.kind === 136 ? getDeclaredTypeOfClassOrInterface(declaration.parent.symbol) : undefined;
                      var typeParameters = classType ? classType.typeParameters :
                          declaration.typeParameters ? getTypeParametersFromDeclaration(declaration.typeParameters) : undefined;
                      var parameters = [];
                      var hasStringLiterals = false;
                      var minArgumentCount = -1;
                      for (var i = 0, n = declaration.parameters.length; i < n; i++) {
                          var param = declaration.parameters[i];
                          parameters.push(param.symbol);
                          if (param.type && param.type.kind === 8) {
                              hasStringLiterals = true;
                          }
                          if (minArgumentCount < 0) {
                              if (param.initializer || param.questionToken || param.dotDotDotToken) {
                                  minArgumentCount = i;
                              }
                          }
                      }
                      if (minArgumentCount < 0) {
                          minArgumentCount = declaration.parameters.length;
                      }
                      var returnType;
                      if (classType) {
                          returnType = classType;
                      }
                      else if (declaration.type) {
                          returnType = getTypeFromTypeNode(declaration.type);
                      }
                      else {
                          if (declaration.kind === 137 && !ts.hasDynamicName(declaration)) {
                              var setter = ts.getDeclarationOfKind(declaration.symbol, 138);
                              returnType = getAnnotatedAccessorType(setter);
                          }
                          if (!returnType && ts.nodeIsMissing(declaration.body)) {
                              returnType = anyType;
                          }
                      }
                      links.resolvedSignature = createSignature(declaration, typeParameters, parameters, returnType, minArgumentCount, ts.hasRestParameters(declaration), hasStringLiterals);
                  }
                  return links.resolvedSignature;
              }
              function getSignaturesOfSymbol(symbol) {
                  if (!symbol)
                      return emptyArray;
                  var result = [];
                  for (var i = 0, len = symbol.declarations.length; i < len; i++) {
                      var node = symbol.declarations[i];
                      switch (node.kind) {
                          case 143:
                          case 144:
                          case 201:
                          case 135:
                          case 134:
                          case 136:
                          case 139:
                          case 140:
                          case 141:
                          case 137:
                          case 138:
                          case 163:
                          case 164:
                              if (i > 0 && node.body) {
                                  var previous = symbol.declarations[i - 1];
                                  if (node.parent === previous.parent && node.kind === previous.kind && node.pos === previous.end) {
                                      break;
                                  }
                              }
                              result.push(getSignatureFromDeclaration(node));
                      }
                  }
                  return result;
              }
              function getReturnTypeOfSignature(signature) {
                  if (!signature.resolvedReturnType) {
                      if (!pushTypeResolution(signature)) {
                          return unknownType;
                      }
                      var type;
                      if (signature.target) {
                          type = instantiateType(getReturnTypeOfSignature(signature.target), signature.mapper);
                      }
                      else if (signature.unionSignatures) {
                          type = getUnionType(ts.map(signature.unionSignatures, getReturnTypeOfSignature));
                      }
                      else {
                          type = getReturnTypeFromBody(signature.declaration);
                      }
                      if (!popTypeResolution()) {
                          type = anyType;
                          if (compilerOptions.noImplicitAny) {
                              var declaration = signature.declaration;
                              if (declaration.name) {
                                  error(declaration.name, ts.Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions, ts.declarationNameToString(declaration.name));
                              }
                              else {
                                  error(declaration, ts.Diagnostics.Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions);
                              }
                          }
                      }
                      signature.resolvedReturnType = type;
                  }
                  return signature.resolvedReturnType;
              }
              function getRestTypeOfSignature(signature) {
                  if (signature.hasRestParameter) {
                      var type = getTypeOfSymbol(ts.lastOrUndefined(signature.parameters));
                      if (type.flags & 4096 && type.target === globalArrayType) {
                          return type.typeArguments[0];
                      }
                  }
                  return anyType;
              }
              function getSignatureInstantiation(signature, typeArguments) {
                  return instantiateSignature(signature, createTypeMapper(signature.typeParameters, typeArguments), true);
              }
              function getErasedSignature(signature) {
                  if (!signature.typeParameters)
                      return signature;
                  if (!signature.erasedSignatureCache) {
                      if (signature.target) {
                          signature.erasedSignatureCache = instantiateSignature(getErasedSignature(signature.target), signature.mapper);
                      }
                      else {
                          signature.erasedSignatureCache = instantiateSignature(signature, createTypeEraser(signature.typeParameters), true);
                      }
                  }
                  return signature.erasedSignatureCache;
              }
              function getOrCreateTypeFromSignature(signature) {
                  if (!signature.isolatedSignatureType) {
                      var isConstructor = signature.declaration.kind === 136 || signature.declaration.kind === 140;
                      var type = createObjectType(32768 | 65536);
                      type.members = emptySymbols;
                      type.properties = emptyArray;
                      type.callSignatures = !isConstructor ? [signature] : emptyArray;
                      type.constructSignatures = isConstructor ? [signature] : emptyArray;
                      signature.isolatedSignatureType = type;
                  }
                  return signature.isolatedSignatureType;
              }
              function getIndexSymbol(symbol) {
                  return symbol.members["__index"];
              }
              function getIndexDeclarationOfSymbol(symbol, kind) {
                  var syntaxKind = kind === 1 ? 120 : 122;
                  var indexSymbol = getIndexSymbol(symbol);
                  if (indexSymbol) {
                      var len = indexSymbol.declarations.length;
                      for (var _i = 0, _a = indexSymbol.declarations; _i < _a.length; _i++) {
                          var decl = _a[_i];
                          var node = decl;
                          if (node.parameters.length === 1) {
                              var parameter = node.parameters[0];
                              if (parameter && parameter.type && parameter.type.kind === syntaxKind) {
                                  return node;
                              }
                          }
                      }
                  }
                  return undefined;
              }
              function getIndexTypeOfSymbol(symbol, kind) {
                  var declaration = getIndexDeclarationOfSymbol(symbol, kind);
                  return declaration
                      ? declaration.type ? getTypeFromTypeNode(declaration.type) : anyType
                      : undefined;
              }
              function getConstraintOfTypeParameter(type) {
                  if (!type.constraint) {
                      if (type.target) {
                          var targetConstraint = getConstraintOfTypeParameter(type.target);
                          type.constraint = targetConstraint ? instantiateType(targetConstraint, type.mapper) : noConstraintType;
                      }
                      else {
                          type.constraint = getTypeFromTypeNode(ts.getDeclarationOfKind(type.symbol, 129).constraint);
                      }
                  }
                  return type.constraint === noConstraintType ? undefined : type.constraint;
              }
              function getTypeListId(types) {
                  switch (types.length) {
                      case 1:
                          return "" + types[0].id;
                      case 2:
                          return types[0].id + "," + types[1].id;
                      default:
                          var result = "";
                          for (var i = 0; i < types.length; i++) {
                              if (i > 0) {
                                  result += ",";
                              }
                              result += types[i].id;
                          }
                          return result;
                  }
              }
              function getWideningFlagsOfTypes(types) {
                  var result = 0;
                  for (var _i = 0; _i < types.length; _i++) {
                      var type = types[_i];
                      result |= type.flags;
                  }
                  return result & 786432;
              }
              function createTypeReference(target, typeArguments) {
                  var id = getTypeListId(typeArguments);
                  var type = target.instantiations[id];
                  if (!type) {
                      var flags = 4096 | getWideningFlagsOfTypes(typeArguments);
                      type = target.instantiations[id] = createObjectType(flags, target.symbol);
                      type.target = target;
                      type.typeArguments = typeArguments;
                  }
                  return type;
              }
              function isTypeParameterReferenceIllegalInConstraint(typeReferenceNode, typeParameterSymbol) {
                  var links = getNodeLinks(typeReferenceNode);
                  if (links.isIllegalTypeReferenceInConstraint !== undefined) {
                      return links.isIllegalTypeReferenceInConstraint;
                  }
                  var currentNode = typeReferenceNode;
                  while (!ts.forEach(typeParameterSymbol.declarations, function (d) { return d.parent === currentNode.parent; })) {
                      currentNode = currentNode.parent;
                  }
                  links.isIllegalTypeReferenceInConstraint = currentNode.kind === 129;
                  return links.isIllegalTypeReferenceInConstraint;
              }
              function checkTypeParameterHasIllegalReferencesInConstraint(typeParameter) {
                  var typeParameterSymbol;
                  function check(n) {
                      if (n.kind === 142 && n.typeName.kind === 65) {
                          var links = getNodeLinks(n);
                          if (links.isIllegalTypeReferenceInConstraint === undefined) {
                              var symbol = resolveName(typeParameter, n.typeName.text, 793056, undefined, undefined);
                              if (symbol && (symbol.flags & 262144)) {
                                  links.isIllegalTypeReferenceInConstraint = ts.forEach(symbol.declarations, function (d) { return d.parent == typeParameter.parent; });
                              }
                          }
                          if (links.isIllegalTypeReferenceInConstraint) {
                              error(typeParameter, ts.Diagnostics.Constraint_of_a_type_parameter_cannot_reference_any_type_parameter_from_the_same_type_parameter_list);
                          }
                      }
                      ts.forEachChild(n, check);
                  }
                  if (typeParameter.constraint) {
                      typeParameterSymbol = getSymbolOfNode(typeParameter);
                      check(typeParameter.constraint);
                  }
              }
              function getTypeFromTypeReferenceOrExpressionWithTypeArguments(node) {
                  var links = getNodeLinks(node);
                  if (!links.resolvedType) {
                      var type;
                      if (node.kind !== 177 || ts.isSupportedExpressionWithTypeArguments(node)) {
                          var typeNameOrExpression = node.kind === 142
                              ? node.typeName
                              : node.expression;
                          var symbol = resolveEntityName(typeNameOrExpression, 793056);
                          if (symbol) {
                              if ((symbol.flags & 262144) && isTypeParameterReferenceIllegalInConstraint(node, symbol)) {
                                  type = unknownType;
                              }
                              else {
                                  type = getDeclaredTypeOfSymbol(symbol);
                                  if (type.flags & (1024 | 2048) && type.flags & 4096) {
                                      var typeParameters = type.typeParameters;
                                      if (node.typeArguments && node.typeArguments.length === typeParameters.length) {
                                          type = createTypeReference(type, ts.map(node.typeArguments, getTypeFromTypeNode));
                                      }
                                      else {
                                          error(node, ts.Diagnostics.Generic_type_0_requires_1_type_argument_s, typeToString(type, undefined, 1), typeParameters.length);
                                          type = undefined;
                                      }
                                  }
                                  else {
                                      if (node.typeArguments) {
                                          error(node, ts.Diagnostics.Type_0_is_not_generic, typeToString(type));
                                          type = undefined;
                                      }
                                  }
                              }
                          }
                      }
                      links.resolvedType = type || unknownType;
                  }
                  return links.resolvedType;
              }
              function getTypeFromTypeQueryNode(node) {
                  var links = getNodeLinks(node);
                  if (!links.resolvedType) {
                      links.resolvedType = getWidenedType(checkExpressionOrQualifiedName(node.exprName));
                  }
                  return links.resolvedType;
              }
              function getTypeOfGlobalSymbol(symbol, arity) {
                  function getTypeDeclaration(symbol) {
                      var declarations = symbol.declarations;
                      for (var _i = 0; _i < declarations.length; _i++) {
                          var declaration = declarations[_i];
                          switch (declaration.kind) {
                              case 202:
                              case 203:
                              case 205:
                                  return declaration;
                          }
                      }
                  }
                  if (!symbol) {
                      return emptyObjectType;
                  }
                  var type = getDeclaredTypeOfSymbol(symbol);
                  if (!(type.flags & 48128)) {
                      error(getTypeDeclaration(symbol), ts.Diagnostics.Global_type_0_must_be_a_class_or_interface_type, symbol.name);
                      return emptyObjectType;
                  }
                  if ((type.typeParameters ? type.typeParameters.length : 0) !== arity) {
                      error(getTypeDeclaration(symbol), ts.Diagnostics.Global_type_0_must_have_1_type_parameter_s, symbol.name, arity);
                      return emptyObjectType;
                  }
                  return type;
              }
              function getGlobalValueSymbol(name) {
                  return getGlobalSymbol(name, 107455, ts.Diagnostics.Cannot_find_global_value_0);
              }
              function getGlobalTypeSymbol(name) {
                  return getGlobalSymbol(name, 793056, ts.Diagnostics.Cannot_find_global_type_0);
              }
              function getGlobalSymbol(name, meaning, diagnostic) {
                  return resolveName(undefined, name, meaning, diagnostic, name);
              }
              function getGlobalType(name, arity) {
                  if (arity === void 0) { arity = 0; }
                  return getTypeOfGlobalSymbol(getGlobalTypeSymbol(name), arity);
              }
              function getGlobalESSymbolConstructorSymbol() {
                  return globalESSymbolConstructorSymbol || (globalESSymbolConstructorSymbol = getGlobalValueSymbol("Symbol"));
              }
              function createIterableType(elementType) {
                  return globalIterableType !== emptyObjectType ? createTypeReference(globalIterableType, [elementType]) : emptyObjectType;
              }
              function createArrayType(elementType) {
                  var arrayType = globalArrayType || getDeclaredTypeOfSymbol(globalArraySymbol);
                  return arrayType !== emptyObjectType ? createTypeReference(arrayType, [elementType]) : emptyObjectType;
              }
              function getTypeFromArrayTypeNode(node) {
                  var links = getNodeLinks(node);
                  if (!links.resolvedType) {
                      links.resolvedType = createArrayType(getTypeFromTypeNode(node.elementType));
                  }
                  return links.resolvedType;
              }
              function createTupleType(elementTypes) {
                  var id = getTypeListId(elementTypes);
                  var type = tupleTypes[id];
                  if (!type) {
                      type = tupleTypes[id] = createObjectType(8192);
                      type.elementTypes = elementTypes;
                  }
                  return type;
              }
              function getTypeFromTupleTypeNode(node) {
                  var links = getNodeLinks(node);
                  if (!links.resolvedType) {
                      links.resolvedType = createTupleType(ts.map(node.elementTypes, getTypeFromTypeNode));
                  }
                  return links.resolvedType;
              }
              function addTypeToSortedSet(sortedSet, type) {
                  if (type.flags & 16384) {
                      addTypesToSortedSet(sortedSet, type.types);
                  }
                  else {
                      var i = 0;
                      var id = type.id;
                      while (i < sortedSet.length && sortedSet[i].id < id) {
                          i++;
                      }
                      if (i === sortedSet.length || sortedSet[i].id !== id) {
                          sortedSet.splice(i, 0, type);
                      }
                  }
              }
              function addTypesToSortedSet(sortedTypes, types) {
                  for (var _i = 0; _i < types.length; _i++) {
                      var type = types[_i];
                      addTypeToSortedSet(sortedTypes, type);
                  }
              }
              function isSubtypeOfAny(candidate, types) {
                  for (var _i = 0; _i < types.length; _i++) {
                      var type = types[_i];
                      if (candidate !== type && isTypeSubtypeOf(candidate, type)) {
                          return true;
                      }
                  }
                  return false;
              }
              var removeSubtypesStack = [];
              function removeSubtypes(types) {
                  var typeListId = getTypeListId(types);
                  if (removeSubtypesStack.lastIndexOf(typeListId) >= 0) {
                      return;
                  }
                  removeSubtypesStack.push(typeListId);
                  var i = types.length;
                  while (i > 0) {
                      i--;
                      if (isSubtypeOfAny(types[i], types)) {
                          types.splice(i, 1);
                      }
                  }
                  removeSubtypesStack.pop();
              }
              function containsAnyType(types) {
                  for (var _i = 0; _i < types.length; _i++) {
                      var type = types[_i];
                      if (type.flags & 1) {
                          return true;
                      }
                  }
                  return false;
              }
              function removeAllButLast(types, typeToRemove) {
                  var i = types.length;
                  while (i > 0 && types.length > 1) {
                      i--;
                      if (types[i] === typeToRemove) {
                          types.splice(i, 1);
                      }
                  }
              }
              function getUnionType(types, noSubtypeReduction) {
                  if (types.length === 0) {
                      return emptyObjectType;
                  }
                  var sortedTypes = [];
                  addTypesToSortedSet(sortedTypes, types);
                  if (noSubtypeReduction) {
                      if (containsAnyType(sortedTypes)) {
                          return anyType;
                      }
                      removeAllButLast(sortedTypes, undefinedType);
                      removeAllButLast(sortedTypes, nullType);
                  }
                  else {
                      removeSubtypes(sortedTypes);
                  }
                  if (sortedTypes.length === 1) {
                      return sortedTypes[0];
                  }
                  var id = getTypeListId(sortedTypes);
                  var type = unionTypes[id];
                  if (!type) {
                      type = unionTypes[id] = createObjectType(16384 | getWideningFlagsOfTypes(sortedTypes));
                      type.types = sortedTypes;
                      type.reducedType = noSubtypeReduction ? undefined : type;
                  }
                  return type;
              }
              function getReducedTypeOfUnionType(type) {
                  if (!type.reducedType) {
                      type.reducedType = getUnionType(type.types, false);
                  }
                  return type.reducedType;
              }
              function getTypeFromUnionTypeNode(node) {
                  var links = getNodeLinks(node);
                  if (!links.resolvedType) {
                      links.resolvedType = getUnionType(ts.map(node.types, getTypeFromTypeNode), true);
                  }
                  return links.resolvedType;
              }
              function getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node) {
                  var links = getNodeLinks(node);
                  if (!links.resolvedType) {
                      links.resolvedType = createObjectType(32768, node.symbol);
                  }
                  return links.resolvedType;
              }
              function getStringLiteralType(node) {
                  if (ts.hasProperty(stringLiteralTypes, node.text)) {
                      return stringLiteralTypes[node.text];
                  }
                  var type = stringLiteralTypes[node.text] = createType(256);
                  type.text = ts.getTextOfNode(node);
                  return type;
              }
              function getTypeFromStringLiteral(node) {
                  var links = getNodeLinks(node);
                  if (!links.resolvedType) {
                      links.resolvedType = getStringLiteralType(node);
                  }
                  return links.resolvedType;
              }
              function getTypeFromTypeNode(node) {
                  switch (node.kind) {
                      case 112:
                          return anyType;
                      case 122:
                          return stringType;
                      case 120:
                          return numberType;
                      case 113:
                          return booleanType;
                      case 123:
                          return esSymbolType;
                      case 99:
                          return voidType;
                      case 8:
                          return getTypeFromStringLiteral(node);
                      case 142:
                          return getTypeFromTypeReferenceOrExpressionWithTypeArguments(node);
                      case 177:
                          return getTypeFromTypeReferenceOrExpressionWithTypeArguments(node);
                      case 145:
                          return getTypeFromTypeQueryNode(node);
                      case 147:
                          return getTypeFromArrayTypeNode(node);
                      case 148:
                          return getTypeFromTupleTypeNode(node);
                      case 149:
                          return getTypeFromUnionTypeNode(node);
                      case 150:
                          return getTypeFromTypeNode(node.type);
                      case 143:
                      case 144:
                      case 146:
                          return getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node);
                      case 65:
                      case 127:
                          var symbol = getSymbolInfo(node);
                          return symbol && getDeclaredTypeOfSymbol(symbol);
                      default:
                          return unknownType;
                  }
              }
              function instantiateList(items, mapper, instantiator) {
                  if (items && items.length) {
                      var result = [];
                      for (var _i = 0; _i < items.length; _i++) {
                          var v = items[_i];
                          result.push(instantiator(v, mapper));
                      }
                      return result;
                  }
                  return items;
              }
              function createUnaryTypeMapper(source, target) {
                  return function (t) { return t === source ? target : t; };
              }
              function createBinaryTypeMapper(source1, target1, source2, target2) {
                  return function (t) { return t === source1 ? target1 : t === source2 ? target2 : t; };
              }
              function createTypeMapper(sources, targets) {
                  switch (sources.length) {
                      case 1: return createUnaryTypeMapper(sources[0], targets[0]);
                      case 2: return createBinaryTypeMapper(sources[0], targets[0], sources[1], targets[1]);
                  }
                  return function (t) {
                      for (var i = 0; i < sources.length; i++) {
                          if (t === sources[i]) {
                              return targets[i];
                          }
                      }
                      return t;
                  };
              }
              function createUnaryTypeEraser(source) {
                  return function (t) { return t === source ? anyType : t; };
              }
              function createBinaryTypeEraser(source1, source2) {
                  return function (t) { return t === source1 || t === source2 ? anyType : t; };
              }
              function createTypeEraser(sources) {
                  switch (sources.length) {
                      case 1: return createUnaryTypeEraser(sources[0]);
                      case 2: return createBinaryTypeEraser(sources[0], sources[1]);
                  }
                  return function (t) {
                      for (var _i = 0; _i < sources.length; _i++) {
                          var source = sources[_i];
                          if (t === source) {
                              return anyType;
                          }
                      }
                      return t;
                  };
              }
              function createInferenceMapper(context) {
                  return function (t) {
                      for (var i = 0; i < context.typeParameters.length; i++) {
                          if (t === context.typeParameters[i]) {
                              context.inferences[i].isFixed = true;
                              return getInferredType(context, i);
                          }
                      }
                      return t;
                  };
              }
              function identityMapper(type) {
                  return type;
              }
              function combineTypeMappers(mapper1, mapper2) {
                  return function (t) { return instantiateType(mapper1(t), mapper2); };
              }
              function instantiateTypeParameter(typeParameter, mapper) {
                  var result = createType(512);
                  result.symbol = typeParameter.symbol;
                  if (typeParameter.constraint) {
                      result.constraint = instantiateType(typeParameter.constraint, mapper);
                  }
                  else {
                      result.target = typeParameter;
                      result.mapper = mapper;
                  }
                  return result;
              }
              function instantiateSignature(signature, mapper, eraseTypeParameters) {
                  var freshTypeParameters;
                  if (signature.typeParameters && !eraseTypeParameters) {
                      freshTypeParameters = instantiateList(signature.typeParameters, mapper, instantiateTypeParameter);
                      mapper = combineTypeMappers(createTypeMapper(signature.typeParameters, freshTypeParameters), mapper);
                  }
                  var result = createSignature(signature.declaration, freshTypeParameters, instantiateList(signature.parameters, mapper, instantiateSymbol), signature.resolvedReturnType ? instantiateType(signature.resolvedReturnType, mapper) : undefined, signature.minArgumentCount, signature.hasRestParameter, signature.hasStringLiterals);
                  result.target = signature;
                  result.mapper = mapper;
                  return result;
              }
              function instantiateSymbol(symbol, mapper) {
                  if (symbol.flags & 16777216) {
                      var links = getSymbolLinks(symbol);
                      symbol = links.target;
                      mapper = combineTypeMappers(links.mapper, mapper);
                  }
                  var result = createSymbol(16777216 | 67108864 | symbol.flags, symbol.name);
                  result.declarations = symbol.declarations;
                  result.parent = symbol.parent;
                  result.target = symbol;
                  result.mapper = mapper;
                  if (symbol.valueDeclaration) {
                      result.valueDeclaration = symbol.valueDeclaration;
                  }
                  return result;
              }
              function instantiateAnonymousType(type, mapper) {
                  var result = createObjectType(32768, type.symbol);
                  result.properties = instantiateList(getPropertiesOfObjectType(type), mapper, instantiateSymbol);
                  result.members = createSymbolTable(result.properties);
                  result.callSignatures = instantiateList(getSignaturesOfType(type, 0), mapper, instantiateSignature);
                  result.constructSignatures = instantiateList(getSignaturesOfType(type, 1), mapper, instantiateSignature);
                  var stringIndexType = getIndexTypeOfType(type, 0);
                  var numberIndexType = getIndexTypeOfType(type, 1);
                  if (stringIndexType)
                      result.stringIndexType = instantiateType(stringIndexType, mapper);
                  if (numberIndexType)
                      result.numberIndexType = instantiateType(numberIndexType, mapper);
                  return result;
              }
              function instantiateType(type, mapper) {
                  if (mapper !== identityMapper) {
                      if (type.flags & 512) {
                          return mapper(type);
                      }
                      if (type.flags & 32768) {
                          return type.symbol && type.symbol.flags & (16 | 8192 | 2048 | 4096) ?
                              instantiateAnonymousType(type, mapper) : type;
                      }
                      if (type.flags & 4096) {
                          return createTypeReference(type.target, instantiateList(type.typeArguments, mapper, instantiateType));
                      }
                      if (type.flags & 8192) {
                          return createTupleType(instantiateList(type.elementTypes, mapper, instantiateType));
                      }
                      if (type.flags & 16384) {
                          return getUnionType(instantiateList(type.types, mapper, instantiateType), true);
                      }
                  }
                  return type;
              }
              function isContextSensitive(node) {
                  ts.Debug.assert(node.kind !== 135 || ts.isObjectLiteralMethod(node));
                  switch (node.kind) {
                      case 163:
                      case 164:
                          return isContextSensitiveFunctionLikeDeclaration(node);
                      case 155:
                          return ts.forEach(node.properties, isContextSensitive);
                      case 154:
                          return ts.forEach(node.elements, isContextSensitive);
                      case 171:
                          return isContextSensitive(node.whenTrue) ||
                              isContextSensitive(node.whenFalse);
                      case 170:
                          return node.operatorToken.kind === 49 &&
                              (isContextSensitive(node.left) || isContextSensitive(node.right));
                      case 225:
                          return isContextSensitive(node.initializer);
                      case 135:
                      case 134:
                          return isContextSensitiveFunctionLikeDeclaration(node);
                      case 162:
                          return isContextSensitive(node.expression);
                  }
                  return false;
              }
              function isContextSensitiveFunctionLikeDeclaration(node) {
                  return !node.typeParameters && node.parameters.length && !ts.forEach(node.parameters, function (p) { return p.type; });
              }
              function getTypeWithoutConstructors(type) {
                  if (type.flags & 48128) {
                      var resolved = resolveObjectOrUnionTypeMembers(type);
                      if (resolved.constructSignatures.length) {
                          var result = createObjectType(32768, type.symbol);
                          result.members = resolved.members;
                          result.properties = resolved.properties;
                          result.callSignatures = resolved.callSignatures;
                          result.constructSignatures = emptyArray;
                          type = result;
                      }
                  }
                  return type;
              }
              var subtypeRelation = {};
              var assignableRelation = {};
              var identityRelation = {};
              function isTypeIdenticalTo(source, target) {
                  return checkTypeRelatedTo(source, target, identityRelation, undefined);
              }
              function compareTypes(source, target) {
                  return checkTypeRelatedTo(source, target, identityRelation, undefined) ? -1 : 0;
              }
              function isTypeSubtypeOf(source, target) {
                  return checkTypeSubtypeOf(source, target, undefined);
              }
              function isTypeAssignableTo(source, target) {
                  return checkTypeAssignableTo(source, target, undefined);
              }
              function checkTypeSubtypeOf(source, target, errorNode, headMessage, containingMessageChain) {
                  return checkTypeRelatedTo(source, target, subtypeRelation, errorNode, headMessage, containingMessageChain);
              }
              function checkTypeAssignableTo(source, target, errorNode, headMessage) {
                  return checkTypeRelatedTo(source, target, assignableRelation, errorNode, headMessage);
              }
              function isSignatureAssignableTo(source, target) {
                  var sourceType = getOrCreateTypeFromSignature(source);
                  var targetType = getOrCreateTypeFromSignature(target);
                  return checkTypeRelatedTo(sourceType, targetType, assignableRelation, undefined);
              }
              function checkTypeRelatedTo(source, target, relation, errorNode, headMessage, containingMessageChain) {
                  var errorInfo;
                  var sourceStack;
                  var targetStack;
                  var maybeStack;
                  var expandingFlags;
                  var depth = 0;
                  var overflow = false;
                  var elaborateErrors = false;
                  ts.Debug.assert(relation !== identityRelation || !errorNode, "no error reporting in identity checking");
                  var result = isRelatedTo(source, target, errorNode !== undefined, headMessage);
                  if (overflow) {
                      error(errorNode, ts.Diagnostics.Excessive_stack_depth_comparing_types_0_and_1, typeToString(source), typeToString(target));
                  }
                  else if (errorInfo) {
                      if (errorInfo.next === undefined) {
                          errorInfo = undefined;
                          elaborateErrors = true;
                          isRelatedTo(source, target, errorNode !== undefined, headMessage);
                      }
                      if (containingMessageChain) {
                          errorInfo = ts.concatenateDiagnosticMessageChains(containingMessageChain, errorInfo);
                      }
                      diagnostics.add(ts.createDiagnosticForNodeFromMessageChain(errorNode, errorInfo));
                  }
                  return result !== 0;
                  function reportError(message, arg0, arg1, arg2) {
                      errorInfo = ts.chainDiagnosticMessages(errorInfo, message, arg0, arg1, arg2);
                  }
                  function isRelatedTo(source, target, reportErrors, headMessage) {
                      var result;
                      if (source === target)
                          return -1;
                      if (relation !== identityRelation) {
                          if (target.flags & 1)
                              return -1;
                          if (source === undefinedType)
                              return -1;
                          if (source === nullType && target !== undefinedType)
                              return -1;
                          if (source.flags & 128 && target === numberType)
                              return -1;
                          if (source.flags & 256 && target === stringType)
                              return -1;
                          if (relation === assignableRelation) {
                              if (source.flags & 1)
                                  return -1;
                              if (source === numberType && target.flags & 128)
                                  return -1;
                          }
                      }
                      var saveErrorInfo = errorInfo;
                      if (source.flags & 16384 || target.flags & 16384) {
                          if (relation === identityRelation) {
                              if (source.flags & 16384 && target.flags & 16384) {
                                  if (result = unionTypeRelatedToUnionType(source, target)) {
                                      if (result &= unionTypeRelatedToUnionType(target, source)) {
                                          return result;
                                      }
                                  }
                              }
                              else if (source.flags & 16384) {
                                  if (result = unionTypeRelatedToType(source, target, reportErrors)) {
                                      return result;
                                  }
                              }
                              else {
                                  if (result = unionTypeRelatedToType(target, source, reportErrors)) {
                                      return result;
                                  }
                              }
                          }
                          else {
                              if (source.flags & 16384) {
                                  if (result = unionTypeRelatedToType(source, target, reportErrors)) {
                                      return result;
                                  }
                              }
                              else {
                                  if (result = typeRelatedToUnionType(source, target, reportErrors)) {
                                      return result;
                                  }
                              }
                          }
                      }
                      else if (source.flags & 512 && target.flags & 512) {
                          if (result = typeParameterRelatedTo(source, target, reportErrors)) {
                              return result;
                          }
                      }
                      else if (source.flags & 4096 && target.flags & 4096 && source.target === target.target) {
                          if (result = typesRelatedTo(source.typeArguments, target.typeArguments, reportErrors)) {
                              return result;
                          }
                      }
                      var reportStructuralErrors = reportErrors && errorInfo === saveErrorInfo;
                      var sourceOrApparentType = relation === identityRelation ? source : getApparentType(source);
                      if (sourceOrApparentType.flags & 48128 && target.flags & 48128) {
                          if (result = objectTypeRelatedTo(sourceOrApparentType, target, reportStructuralErrors)) {
                              errorInfo = saveErrorInfo;
                              return result;
                          }
                      }
                      else if (source.flags & 512 && sourceOrApparentType.flags & 16384) {
                          errorInfo = saveErrorInfo;
                          if (result = isRelatedTo(sourceOrApparentType, target, reportErrors)) {
                              return result;
                          }
                      }
                      if (reportErrors) {
                          headMessage = headMessage || ts.Diagnostics.Type_0_is_not_assignable_to_type_1;
                          var sourceType = typeToString(source);
                          var targetType = typeToString(target);
                          if (sourceType === targetType) {
                              sourceType = typeToString(source, undefined, 128);
                              targetType = typeToString(target, undefined, 128);
                          }
                          reportError(headMessage, sourceType, targetType);
                      }
                      return 0;
                  }
                  function unionTypeRelatedToUnionType(source, target) {
                      var result = -1;
                      var sourceTypes = source.types;
                      for (var _i = 0; _i < sourceTypes.length; _i++) {
                          var sourceType = sourceTypes[_i];
                          var related = typeRelatedToUnionType(sourceType, target, false);
                          if (!related) {
                              return 0;
                          }
                          result &= related;
                      }
                      return result;
                  }
                  function typeRelatedToUnionType(source, target, reportErrors) {
                      var targetTypes = target.types;
                      for (var i = 0, len = targetTypes.length; i < len; i++) {
                          var related = isRelatedTo(source, targetTypes[i], reportErrors && i === len - 1);
                          if (related) {
                              return related;
                          }
                      }
                      return 0;
                  }
                  function unionTypeRelatedToType(source, target, reportErrors) {
                      var result = -1;
                      var sourceTypes = source.types;
                      for (var _i = 0; _i < sourceTypes.length; _i++) {
                          var sourceType = sourceTypes[_i];
                          var related = isRelatedTo(sourceType, target, reportErrors);
                          if (!related) {
                              return 0;
                          }
                          result &= related;
                      }
                      return result;
                  }
                  function typesRelatedTo(sources, targets, reportErrors) {
                      var result = -1;
                      for (var i = 0, len = sources.length; i < len; i++) {
                          var related = isRelatedTo(sources[i], targets[i], reportErrors);
                          if (!related) {
                              return 0;
                          }
                          result &= related;
                      }
                      return result;
                  }
                  function typeParameterRelatedTo(source, target, reportErrors) {
                      if (relation === identityRelation) {
                          if (source.symbol.name !== target.symbol.name) {
                              return 0;
                          }
                          if (source.constraint === target.constraint) {
                              return -1;
                          }
                          if (source.constraint === noConstraintType || target.constraint === noConstraintType) {
                              return 0;
                          }
                          return isRelatedTo(source.constraint, target.constraint, reportErrors);
                      }
                      else {
                          while (true) {
                              var constraint = getConstraintOfTypeParameter(source);
                              if (constraint === target)
                                  return -1;
                              if (!(constraint && constraint.flags & 512))
                                  break;
                              source = constraint;
                          }
                          return 0;
                      }
                  }
                  function objectTypeRelatedTo(source, target, reportErrors) {
                      if (overflow) {
                          return 0;
                      }
                      var id = relation !== identityRelation || source.id < target.id ? source.id + "," + target.id : target.id + "," + source.id;
                      var related = relation[id];
                      if (related !== undefined) {
                          if (!elaborateErrors || (related === 3)) {
                              return related === 1 ? -1 : 0;
                          }
                      }
                      if (depth > 0) {
                          for (var i = 0; i < depth; i++) {
                              if (maybeStack[i][id]) {
                                  return 1;
                              }
                          }
                          if (depth === 100) {
                              overflow = true;
                              return 0;
                          }
                      }
                      else {
                          sourceStack = [];
                          targetStack = [];
                          maybeStack = [];
                          expandingFlags = 0;
                      }
                      sourceStack[depth] = source;
                      targetStack[depth] = target;
                      maybeStack[depth] = {};
                      maybeStack[depth][id] = 1;
                      depth++;
                      var saveExpandingFlags = expandingFlags;
                      if (!(expandingFlags & 1) && isDeeplyNestedGeneric(source, sourceStack))
                          expandingFlags |= 1;
                      if (!(expandingFlags & 2) && isDeeplyNestedGeneric(target, targetStack))
                          expandingFlags |= 2;
                      var result;
                      if (expandingFlags === 3) {
                          result = 1;
                      }
                      else {
                          result = propertiesRelatedTo(source, target, reportErrors);
                          if (result) {
                              result &= signaturesRelatedTo(source, target, 0, reportErrors);
                              if (result) {
                                  result &= signaturesRelatedTo(source, target, 1, reportErrors);
                                  if (result) {
                                      result &= stringIndexTypesRelatedTo(source, target, reportErrors);
                                      if (result) {
                                          result &= numberIndexTypesRelatedTo(source, target, reportErrors);
                                      }
                                  }
                              }
                          }
                      }
                      expandingFlags = saveExpandingFlags;
                      depth--;
                      if (result) {
                          var maybeCache = maybeStack[depth];
                          var destinationCache = (result === -1 || depth === 0) ? relation : maybeStack[depth - 1];
                          ts.copyMap(maybeCache, destinationCache);
                      }
                      else {
                          relation[id] = reportErrors ? 3 : 2;
                      }
                      return result;
                  }
                  function isDeeplyNestedGeneric(type, stack) {
                      if (type.flags & 4096 && depth >= 10) {
                          var target_1 = type.target;
                          var count = 0;
                          for (var i = 0; i < depth; i++) {
                              var t = stack[i];
                              if (t.flags & 4096 && t.target === target_1) {
                                  count++;
                                  if (count >= 10)
                                      return true;
                              }
                          }
                      }
                      return false;
                  }
                  function propertiesRelatedTo(source, target, reportErrors) {
                      if (relation === identityRelation) {
                          return propertiesIdenticalTo(source, target);
                      }
                      var result = -1;
                      var properties = getPropertiesOfObjectType(target);
                      var requireOptionalProperties = relation === subtypeRelation && !(source.flags & 131072);
                      for (var _i = 0; _i < properties.length; _i++) {
                          var targetProp = properties[_i];
                          var sourceProp = getPropertyOfType(source, targetProp.name);
                          if (sourceProp !== targetProp) {
                              if (!sourceProp) {
                                  if (!(targetProp.flags & 536870912) || requireOptionalProperties) {
                                      if (reportErrors) {
                                          reportError(ts.Diagnostics.Property_0_is_missing_in_type_1, symbolToString(targetProp), typeToString(source));
                                      }
                                      return 0;
                                  }
                              }
                              else if (!(targetProp.flags & 134217728)) {
                                  var sourceFlags = getDeclarationFlagsFromSymbol(sourceProp);
                                  var targetFlags = getDeclarationFlagsFromSymbol(targetProp);
                                  if (sourceFlags & 32 || targetFlags & 32) {
                                      if (sourceProp.valueDeclaration !== targetProp.valueDeclaration) {
                                          if (reportErrors) {
                                              if (sourceFlags & 32 && targetFlags & 32) {
                                                  reportError(ts.Diagnostics.Types_have_separate_declarations_of_a_private_property_0, symbolToString(targetProp));
                                              }
                                              else {
                                                  reportError(ts.Diagnostics.Property_0_is_private_in_type_1_but_not_in_type_2, symbolToString(targetProp), typeToString(sourceFlags & 32 ? source : target), typeToString(sourceFlags & 32 ? target : source));
                                              }
                                          }
                                          return 0;
                                      }
                                  }
                                  else if (targetFlags & 64) {
                                      var sourceDeclaredInClass = sourceProp.parent && sourceProp.parent.flags & 32;
                                      var sourceClass = sourceDeclaredInClass ? getDeclaredTypeOfSymbol(sourceProp.parent) : undefined;
                                      var targetClass = getDeclaredTypeOfSymbol(targetProp.parent);
                                      if (!sourceClass || !hasBaseType(sourceClass, targetClass)) {
                                          if (reportErrors) {
                                              reportError(ts.Diagnostics.Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2, symbolToString(targetProp), typeToString(sourceClass || source), typeToString(targetClass));
                                          }
                                          return 0;
                                      }
                                  }
                                  else if (sourceFlags & 64) {
                                      if (reportErrors) {
                                          reportError(ts.Diagnostics.Property_0_is_protected_in_type_1_but_public_in_type_2, symbolToString(targetProp), typeToString(source), typeToString(target));
                                      }
                                      return 0;
                                  }
                                  var related = isRelatedTo(getTypeOfSymbol(sourceProp), getTypeOfSymbol(targetProp), reportErrors);
                                  if (!related) {
                                      if (reportErrors) {
                                          reportError(ts.Diagnostics.Types_of_property_0_are_incompatible, symbolToString(targetProp));
                                      }
                                      return 0;
                                  }
                                  result &= related;
                                  if (sourceProp.flags & 536870912 && !(targetProp.flags & 536870912)) {
                                      if (reportErrors) {
                                          reportError(ts.Diagnostics.Property_0_is_optional_in_type_1_but_required_in_type_2, symbolToString(targetProp), typeToString(source), typeToString(target));
                                      }
                                      return 0;
                                  }
                              }
                          }
                      }
                      return result;
                  }
                  function propertiesIdenticalTo(source, target) {
                      var sourceProperties = getPropertiesOfObjectType(source);
                      var targetProperties = getPropertiesOfObjectType(target);
                      if (sourceProperties.length !== targetProperties.length) {
                          return 0;
                      }
                      var result = -1;
                      for (var _i = 0; _i < sourceProperties.length; _i++) {
                          var sourceProp = sourceProperties[_i];
                          var targetProp = getPropertyOfObjectType(target, sourceProp.name);
                          if (!targetProp) {
                              return 0;
                          }
                          var related = compareProperties(sourceProp, targetProp, isRelatedTo);
                          if (!related) {
                              return 0;
                          }
                          result &= related;
                      }
                      return result;
                  }
                  function signaturesRelatedTo(source, target, kind, reportErrors) {
                      if (relation === identityRelation) {
                          return signaturesIdenticalTo(source, target, kind);
                      }
                      if (target === anyFunctionType || source === anyFunctionType) {
                          return -1;
                      }
                      var sourceSignatures = getSignaturesOfType(source, kind);
                      var targetSignatures = getSignaturesOfType(target, kind);
                      var result = -1;
                      var saveErrorInfo = errorInfo;
                      outer: for (var _i = 0; _i < targetSignatures.length; _i++) {
                          var t = targetSignatures[_i];
                          if (!t.hasStringLiterals || target.flags & 65536) {
                              var localErrors = reportErrors;
                              for (var _a = 0; _a < sourceSignatures.length; _a++) {
                                  var s = sourceSignatures[_a];
                                  if (!s.hasStringLiterals || source.flags & 65536) {
                                      var related = signatureRelatedTo(s, t, localErrors);
                                      if (related) {
                                          result &= related;
                                          errorInfo = saveErrorInfo;
                                          continue outer;
                                      }
                                      localErrors = false;
                                  }
                              }
                              return 0;
                          }
                      }
                      return result;
                  }
                  function signatureRelatedTo(source, target, reportErrors) {
                      if (source === target) {
                          return -1;
                      }
                      if (!target.hasRestParameter && source.minArgumentCount > target.parameters.length) {
                          return 0;
                      }
                      var sourceMax = source.parameters.length;
                      var targetMax = target.parameters.length;
                      var checkCount;
                      if (source.hasRestParameter && target.hasRestParameter) {
                          checkCount = sourceMax > targetMax ? sourceMax : targetMax;
                          sourceMax--;
                          targetMax--;
                      }
                      else if (source.hasRestParameter) {
                          sourceMax--;
                          checkCount = targetMax;
                      }
                      else if (target.hasRestParameter) {
                          targetMax--;
                          checkCount = sourceMax;
                      }
                      else {
                          checkCount = sourceMax < targetMax ? sourceMax : targetMax;
                      }
                      source = getErasedSignature(source);
                      target = getErasedSignature(target);
                      var result = -1;
                      for (var i = 0; i < checkCount; i++) {
                          var s_1 = i < sourceMax ? getTypeOfSymbol(source.parameters[i]) : getRestTypeOfSignature(source);
                          var t_1 = i < targetMax ? getTypeOfSymbol(target.parameters[i]) : getRestTypeOfSignature(target);
                          var saveErrorInfo = errorInfo;
                          var related = isRelatedTo(s_1, t_1, reportErrors);
                          if (!related) {
                              related = isRelatedTo(t_1, s_1, false);
                              if (!related) {
                                  if (reportErrors) {
                                      reportError(ts.Diagnostics.Types_of_parameters_0_and_1_are_incompatible, source.parameters[i < sourceMax ? i : sourceMax].name, target.parameters[i < targetMax ? i : targetMax].name);
                                  }
                                  return 0;
                              }
                              errorInfo = saveErrorInfo;
                          }
                          result &= related;
                      }
                      var t = getReturnTypeOfSignature(target);
                      if (t === voidType)
                          return result;
                      var s = getReturnTypeOfSignature(source);
                      return result & isRelatedTo(s, t, reportErrors);
                  }
                  function signaturesIdenticalTo(source, target, kind) {
                      var sourceSignatures = getSignaturesOfType(source, kind);
                      var targetSignatures = getSignaturesOfType(target, kind);
                      if (sourceSignatures.length !== targetSignatures.length) {
                          return 0;
                      }
                      var result = -1;
                      for (var i = 0, len = sourceSignatures.length; i < len; ++i) {
                          var related = compareSignatures(sourceSignatures[i], targetSignatures[i], true, isRelatedTo);
                          if (!related) {
                              return 0;
                          }
                          result &= related;
                      }
                      return result;
                  }
                  function stringIndexTypesRelatedTo(source, target, reportErrors) {
                      if (relation === identityRelation) {
                          return indexTypesIdenticalTo(0, source, target);
                      }
                      var targetType = getIndexTypeOfType(target, 0);
                      if (targetType) {
                          var sourceType = getIndexTypeOfType(source, 0);
                          if (!sourceType) {
                              if (reportErrors) {
                                  reportError(ts.Diagnostics.Index_signature_is_missing_in_type_0, typeToString(source));
                              }
                              return 0;
                          }
                          var related = isRelatedTo(sourceType, targetType, reportErrors);
                          if (!related) {
                              if (reportErrors) {
                                  reportError(ts.Diagnostics.Index_signatures_are_incompatible);
                              }
                              return 0;
                          }
                          return related;
                      }
                      return -1;
                  }
                  function numberIndexTypesRelatedTo(source, target, reportErrors) {
                      if (relation === identityRelation) {
                          return indexTypesIdenticalTo(1, source, target);
                      }
                      var targetType = getIndexTypeOfType(target, 1);
                      if (targetType) {
                          var sourceStringType = getIndexTypeOfType(source, 0);
                          var sourceNumberType = getIndexTypeOfType(source, 1);
                          if (!(sourceStringType || sourceNumberType)) {
                              if (reportErrors) {
                                  reportError(ts.Diagnostics.Index_signature_is_missing_in_type_0, typeToString(source));
                              }
                              return 0;
                          }
                          var related;
                          if (sourceStringType && sourceNumberType) {
                              related = isRelatedTo(sourceStringType, targetType, false) || isRelatedTo(sourceNumberType, targetType, reportErrors);
                          }
                          else {
                              related = isRelatedTo(sourceStringType || sourceNumberType, targetType, reportErrors);
                          }
                          if (!related) {
                              if (reportErrors) {
                                  reportError(ts.Diagnostics.Index_signatures_are_incompatible);
                              }
                              return 0;
                          }
                          return related;
                      }
                      return -1;
                  }
                  function indexTypesIdenticalTo(indexKind, source, target) {
                      var targetType = getIndexTypeOfType(target, indexKind);
                      var sourceType = getIndexTypeOfType(source, indexKind);
                      if (!sourceType && !targetType) {
                          return -1;
                      }
                      if (sourceType && targetType) {
                          return isRelatedTo(sourceType, targetType);
                      }
                      return 0;
                  }
              }
              function isPropertyIdenticalTo(sourceProp, targetProp) {
                  return compareProperties(sourceProp, targetProp, compareTypes) !== 0;
              }
              function compareProperties(sourceProp, targetProp, compareTypes) {
                  if (sourceProp === targetProp) {
                      return -1;
                  }
                  var sourcePropAccessibility = getDeclarationFlagsFromSymbol(sourceProp) & (32 | 64);
                  var targetPropAccessibility = getDeclarationFlagsFromSymbol(targetProp) & (32 | 64);
                  if (sourcePropAccessibility !== targetPropAccessibility) {
                      return 0;
                  }
                  if (sourcePropAccessibility) {
                      if (getTargetSymbol(sourceProp) !== getTargetSymbol(targetProp)) {
                          return 0;
                      }
                  }
                  else {
                      if ((sourceProp.flags & 536870912) !== (targetProp.flags & 536870912)) {
                          return 0;
                      }
                  }
                  return compareTypes(getTypeOfSymbol(sourceProp), getTypeOfSymbol(targetProp));
              }
              function compareSignatures(source, target, compareReturnTypes, compareTypes) {
                  if (source === target) {
                      return -1;
                  }
                  if (source.parameters.length !== target.parameters.length ||
                      source.minArgumentCount !== target.minArgumentCount ||
                      source.hasRestParameter !== target.hasRestParameter) {
                      return 0;
                  }
                  var result = -1;
                  if (source.typeParameters && target.typeParameters) {
                      if (source.typeParameters.length !== target.typeParameters.length) {
                          return 0;
                      }
                      for (var i = 0, len = source.typeParameters.length; i < len; ++i) {
                          var related = compareTypes(source.typeParameters[i], target.typeParameters[i]);
                          if (!related) {
                              return 0;
                          }
                          result &= related;
                      }
                  }
                  else if (source.typeParameters || target.typeParameters) {
                      return 0;
                  }
                  source = getErasedSignature(source);
                  target = getErasedSignature(target);
                  for (var i = 0, len = source.parameters.length; i < len; i++) {
                      var s = source.hasRestParameter && i === len - 1 ? getRestTypeOfSignature(source) : getTypeOfSymbol(source.parameters[i]);
                      var t = target.hasRestParameter && i === len - 1 ? getRestTypeOfSignature(target) : getTypeOfSymbol(target.parameters[i]);
                      var related = compareTypes(s, t);
                      if (!related) {
                          return 0;
                      }
                      result &= related;
                  }
                  if (compareReturnTypes) {
                      result &= compareTypes(getReturnTypeOfSignature(source), getReturnTypeOfSignature(target));
                  }
                  return result;
              }
              function isSupertypeOfEach(candidate, types) {
                  for (var _i = 0; _i < types.length; _i++) {
                      var type = types[_i];
                      if (candidate !== type && !isTypeSubtypeOf(type, candidate))
                          return false;
                  }
                  return true;
              }
              function getCommonSupertype(types) {
                  return ts.forEach(types, function (t) { return isSupertypeOfEach(t, types) ? t : undefined; });
              }
              function reportNoCommonSupertypeError(types, errorLocation, errorMessageChainHead) {
                  var bestSupertype;
                  var bestSupertypeDownfallType;
                  var bestSupertypeScore = 0;
                  for (var i = 0; i < types.length; i++) {
                      var score = 0;
                      var downfallType = undefined;
                      for (var j = 0; j < types.length; j++) {
                          if (isTypeSubtypeOf(types[j], types[i])) {
                              score++;
                          }
                          else if (!downfallType) {
                              downfallType = types[j];
                          }
                      }
                      ts.Debug.assert(!!downfallType, "If there is no common supertype, each type should have a downfallType");
                      if (score > bestSupertypeScore) {
                          bestSupertype = types[i];
                          bestSupertypeDownfallType = downfallType;
                          bestSupertypeScore = score;
                      }
                      if (bestSupertypeScore === types.length - 1) {
                          break;
                      }
                  }
                  checkTypeSubtypeOf(bestSupertypeDownfallType, bestSupertype, errorLocation, ts.Diagnostics.Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0, errorMessageChainHead);
              }
              function isArrayType(type) {
                  return type.flags & 4096 && type.target === globalArrayType;
              }
              function isArrayLikeType(type) {
                  return !(type.flags & (32 | 64)) && isTypeAssignableTo(type, anyArrayType);
              }
              function isTupleLikeType(type) {
                  return !!getPropertyOfType(type, "0");
              }
              function isTupleType(type) {
                  return (type.flags & 8192) && !!type.elementTypes;
              }
              function getWidenedTypeOfObjectLiteral(type) {
                  var properties = getPropertiesOfObjectType(type);
                  var members = {};
                  ts.forEach(properties, function (p) {
                      var propType = getTypeOfSymbol(p);
                      var widenedType = getWidenedType(propType);
                      if (propType !== widenedType) {
                          var symbol = createSymbol(p.flags | 67108864, p.name);
                          symbol.declarations = p.declarations;
                          symbol.parent = p.parent;
                          symbol.type = widenedType;
                          symbol.target = p;
                          if (p.valueDeclaration)
                              symbol.valueDeclaration = p.valueDeclaration;
                          p = symbol;
                      }
                      members[p.name] = p;
                  });
                  var stringIndexType = getIndexTypeOfType(type, 0);
                  var numberIndexType = getIndexTypeOfType(type, 1);
                  if (stringIndexType)
                      stringIndexType = getWidenedType(stringIndexType);
                  if (numberIndexType)
                      numberIndexType = getWidenedType(numberIndexType);
                  return createAnonymousType(type.symbol, members, emptyArray, emptyArray, stringIndexType, numberIndexType);
              }
              function getWidenedType(type) {
                  if (type.flags & 786432) {
                      if (type.flags & (32 | 64)) {
                          return anyType;
                      }
                      if (type.flags & 131072) {
                          return getWidenedTypeOfObjectLiteral(type);
                      }
                      if (type.flags & 16384) {
                          return getUnionType(ts.map(type.types, getWidenedType));
                      }
                      if (isArrayType(type)) {
                          return createArrayType(getWidenedType(type.typeArguments[0]));
                      }
                  }
                  return type;
              }
              function reportWideningErrorsInType(type) {
                  if (type.flags & 16384) {
                      var errorReported = false;
                      ts.forEach(type.types, function (t) {
                          if (reportWideningErrorsInType(t)) {
                              errorReported = true;
                          }
                      });
                      return errorReported;
                  }
                  if (isArrayType(type)) {
                      return reportWideningErrorsInType(type.typeArguments[0]);
                  }
                  if (type.flags & 131072) {
                      var errorReported = false;
                      ts.forEach(getPropertiesOfObjectType(type), function (p) {
                          var t = getTypeOfSymbol(p);
                          if (t.flags & 262144) {
                              if (!reportWideningErrorsInType(t)) {
                                  error(p.valueDeclaration, ts.Diagnostics.Object_literal_s_property_0_implicitly_has_an_1_type, p.name, typeToString(getWidenedType(t)));
                              }
                              errorReported = true;
                          }
                      });
                      return errorReported;
                  }
                  return false;
              }
              function reportImplicitAnyError(declaration, type) {
                  var typeAsString = typeToString(getWidenedType(type));
                  var diagnostic;
                  switch (declaration.kind) {
                      case 133:
                      case 132:
                          diagnostic = ts.Diagnostics.Member_0_implicitly_has_an_1_type;
                          break;
                      case 130:
                          diagnostic = declaration.dotDotDotToken ?
                              ts.Diagnostics.Rest_parameter_0_implicitly_has_an_any_type :
                              ts.Diagnostics.Parameter_0_implicitly_has_an_1_type;
                          break;
                      case 201:
                      case 135:
                      case 134:
                      case 137:
                      case 138:
                      case 163:
                      case 164:
                          if (!declaration.name) {
                              error(declaration, ts.Diagnostics.Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeAsString);
                              return;
                          }
                          diagnostic = ts.Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type;
                          break;
                      default:
                          diagnostic = ts.Diagnostics.Variable_0_implicitly_has_an_1_type;
                  }
                  error(declaration, diagnostic, ts.declarationNameToString(declaration.name), typeAsString);
              }
              function reportErrorsFromWidening(declaration, type) {
                  if (produceDiagnostics && compilerOptions.noImplicitAny && type.flags & 262144) {
                      if (!reportWideningErrorsInType(type)) {
                          reportImplicitAnyError(declaration, type);
                      }
                  }
              }
              function forEachMatchingParameterType(source, target, callback) {
                  var sourceMax = source.parameters.length;
                  var targetMax = target.parameters.length;
                  var count;
                  if (source.hasRestParameter && target.hasRestParameter) {
                      count = sourceMax > targetMax ? sourceMax : targetMax;
                      sourceMax--;
                      targetMax--;
                  }
                  else if (source.hasRestParameter) {
                      sourceMax--;
                      count = targetMax;
                  }
                  else if (target.hasRestParameter) {
                      targetMax--;
                      count = sourceMax;
                  }
                  else {
                      count = sourceMax < targetMax ? sourceMax : targetMax;
                  }
                  for (var i = 0; i < count; i++) {
                      var s = i < sourceMax ? getTypeOfSymbol(source.parameters[i]) : getRestTypeOfSignature(source);
                      var t = i < targetMax ? getTypeOfSymbol(target.parameters[i]) : getRestTypeOfSignature(target);
                      callback(s, t);
                  }
              }
              function createInferenceContext(typeParameters, inferUnionTypes) {
                  var inferences = [];
                  for (var _i = 0; _i < typeParameters.length; _i++) {
                      var unused = typeParameters[_i];
                      inferences.push({ primary: undefined, secondary: undefined, isFixed: false });
                  }
                  return {
                      typeParameters: typeParameters,
                      inferUnionTypes: inferUnionTypes,
                      inferences: inferences,
                      inferredTypes: new Array(typeParameters.length)
                  };
              }
              function inferTypes(context, source, target) {
                  var sourceStack;
                  var targetStack;
                  var depth = 0;
                  var inferiority = 0;
                  inferFromTypes(source, target);
                  function isInProcess(source, target) {
                      for (var i = 0; i < depth; i++) {
                          if (source === sourceStack[i] && target === targetStack[i]) {
                              return true;
                          }
                      }
                      return false;
                  }
                  function isWithinDepthLimit(type, stack) {
                      if (depth >= 5) {
                          var target_2 = type.target;
                          var count = 0;
                          for (var i = 0; i < depth; i++) {
                              var t = stack[i];
                              if (t.flags & 4096 && t.target === target_2) {
                                  count++;
                              }
                          }
                          return count < 5;
                      }
                      return true;
                  }
                  function inferFromTypes(source, target) {
                      if (source === anyFunctionType) {
                          return;
                      }
                      if (target.flags & 512) {
                          var typeParameters = context.typeParameters;
                          for (var i = 0; i < typeParameters.length; i++) {
                              if (target === typeParameters[i]) {
                                  var inferences = context.inferences[i];
                                  if (!inferences.isFixed) {
                                      var candidates = inferiority ?
                                          inferences.secondary || (inferences.secondary = []) :
                                          inferences.primary || (inferences.primary = []);
                                      if (!ts.contains(candidates, source)) {
                                          candidates.push(source);
                                      }
                                  }
                                  return;
                              }
                          }
                      }
                      else if (source.flags & 4096 && target.flags & 4096 && source.target === target.target) {
                          var sourceTypes = source.typeArguments;
                          var targetTypes = target.typeArguments;
                          for (var i = 0; i < sourceTypes.length; i++) {
                              inferFromTypes(sourceTypes[i], targetTypes[i]);
                          }
                      }
                      else if (target.flags & 16384) {
                          var targetTypes = target.types;
                          var typeParameterCount = 0;
                          var typeParameter;
                          for (var _i = 0; _i < targetTypes.length; _i++) {
                              var t = targetTypes[_i];
                              if (t.flags & 512 && ts.contains(context.typeParameters, t)) {
                                  typeParameter = t;
                                  typeParameterCount++;
                              }
                              else {
                                  inferFromTypes(source, t);
                              }
                          }
                          if (typeParameterCount === 1) {
                              inferiority++;
                              inferFromTypes(source, typeParameter);
                              inferiority--;
                          }
                      }
                      else if (source.flags & 16384) {
                          var sourceTypes = source.types;
                          for (var _a = 0; _a < sourceTypes.length; _a++) {
                              var sourceType = sourceTypes[_a];
                              inferFromTypes(sourceType, target);
                          }
                      }
                      else if (source.flags & 48128 && (target.flags & (4096 | 8192) ||
                          (target.flags & 32768) && target.symbol && target.symbol.flags & (8192 | 2048))) {
                          if (!isInProcess(source, target) && isWithinDepthLimit(source, sourceStack) && isWithinDepthLimit(target, targetStack)) {
                              if (depth === 0) {
                                  sourceStack = [];
                                  targetStack = [];
                              }
                              sourceStack[depth] = source;
                              targetStack[depth] = target;
                              depth++;
                              inferFromProperties(source, target);
                              inferFromSignatures(source, target, 0);
                              inferFromSignatures(source, target, 1);
                              inferFromIndexTypes(source, target, 0, 0);
                              inferFromIndexTypes(source, target, 1, 1);
                              inferFromIndexTypes(source, target, 0, 1);
                              depth--;
                          }
                      }
                  }
                  function inferFromProperties(source, target) {
                      var properties = getPropertiesOfObjectType(target);
                      for (var _i = 0; _i < properties.length; _i++) {
                          var targetProp = properties[_i];
                          var sourceProp = getPropertyOfObjectType(source, targetProp.name);
                          if (sourceProp) {
                              inferFromTypes(getTypeOfSymbol(sourceProp), getTypeOfSymbol(targetProp));
                          }
                      }
                  }
                  function inferFromSignatures(source, target, kind) {
                      var sourceSignatures = getSignaturesOfType(source, kind);
                      var targetSignatures = getSignaturesOfType(target, kind);
                      var sourceLen = sourceSignatures.length;
                      var targetLen = targetSignatures.length;
                      var len = sourceLen < targetLen ? sourceLen : targetLen;
                      for (var i = 0; i < len; i++) {
                          inferFromSignature(getErasedSignature(sourceSignatures[sourceLen - len + i]), getErasedSignature(targetSignatures[targetLen - len + i]));
                      }
                  }
                  function inferFromSignature(source, target) {
                      forEachMatchingParameterType(source, target, inferFromTypes);
                      inferFromTypes(getReturnTypeOfSignature(source), getReturnTypeOfSignature(target));
                  }
                  function inferFromIndexTypes(source, target, sourceKind, targetKind) {
                      var targetIndexType = getIndexTypeOfType(target, targetKind);
                      if (targetIndexType) {
                          var sourceIndexType = getIndexTypeOfType(source, sourceKind);
                          if (sourceIndexType) {
                              inferFromTypes(sourceIndexType, targetIndexType);
                          }
                      }
                  }
              }
              function getInferenceCandidates(context, index) {
                  var inferences = context.inferences[index];
                  return inferences.primary || inferences.secondary || emptyArray;
              }
              function getInferredType(context, index) {
                  var inferredType = context.inferredTypes[index];
                  var inferenceSucceeded;
                  if (!inferredType) {
                      var inferences = getInferenceCandidates(context, index);
                      if (inferences.length) {
                          var unionOrSuperType = context.inferUnionTypes ? getUnionType(inferences) : getCommonSupertype(inferences);
                          inferredType = unionOrSuperType ? getWidenedType(unionOrSuperType) : unknownType;
                          inferenceSucceeded = !!unionOrSuperType;
                      }
                      else {
                          inferredType = emptyObjectType;
                          inferenceSucceeded = true;
                      }
                      if (inferenceSucceeded) {
                          var constraint = getConstraintOfTypeParameter(context.typeParameters[index]);
                          inferredType = constraint && !isTypeAssignableTo(inferredType, constraint) ? constraint : inferredType;
                      }
                      else if (context.failedTypeParameterIndex === undefined || context.failedTypeParameterIndex > index) {
                          context.failedTypeParameterIndex = index;
                      }
                      context.inferredTypes[index] = inferredType;
                  }
                  return inferredType;
              }
              function getInferredTypes(context) {
                  for (var i = 0; i < context.inferredTypes.length; i++) {
                      getInferredType(context, i);
                  }
                  return context.inferredTypes;
              }
              function hasAncestor(node, kind) {
                  return ts.getAncestor(node, kind) !== undefined;
              }
              function getResolvedSymbol(node) {
                  var links = getNodeLinks(node);
                  if (!links.resolvedSymbol) {
                      links.resolvedSymbol = (!ts.nodeIsMissing(node) && resolveName(node, node.text, 107455 | 1048576, ts.Diagnostics.Cannot_find_name_0, node)) || unknownSymbol;
                  }
                  return links.resolvedSymbol;
              }
              function isInTypeQuery(node) {
                  while (node) {
                      switch (node.kind) {
                          case 145:
                              return true;
                          case 65:
                          case 127:
                              node = node.parent;
                              continue;
                          default:
                              return false;
                      }
                  }
                  ts.Debug.fail("should not get here");
              }
              function removeTypesFromUnionType(type, typeKind, isOfTypeKind, allowEmptyUnionResult) {
                  if (type.flags & 16384) {
                      var types = type.types;
                      if (ts.forEach(types, function (t) { return !!(t.flags & typeKind) === isOfTypeKind; })) {
                          var narrowedType = getUnionType(ts.filter(types, function (t) { return !(t.flags & typeKind) === isOfTypeKind; }));
                          if (allowEmptyUnionResult || narrowedType !== emptyObjectType) {
                              return narrowedType;
                          }
                      }
                  }
                  else if (allowEmptyUnionResult && !!(type.flags & typeKind) === isOfTypeKind) {
                      return getUnionType(emptyArray);
                  }
                  return type;
              }
              function hasInitializer(node) {
                  return !!(node.initializer || ts.isBindingPattern(node.parent) && hasInitializer(node.parent.parent));
              }
              function isVariableAssignedWithin(symbol, node) {
                  var links = getNodeLinks(node);
                  if (links.assignmentChecks) {
                      var cachedResult = links.assignmentChecks[symbol.id];
                      if (cachedResult !== undefined) {
                          return cachedResult;
                      }
                  }
                  else {
                      links.assignmentChecks = {};
                  }
                  return links.assignmentChecks[symbol.id] = isAssignedIn(node);
                  function isAssignedInBinaryExpression(node) {
                      if (node.operatorToken.kind >= 53 && node.operatorToken.kind <= 64) {
                          var n = node.left;
                          while (n.kind === 162) {
                              n = n.expression;
                          }
                          if (n.kind === 65 && getResolvedSymbol(n) === symbol) {
                              return true;
                          }
                      }
                      return ts.forEachChild(node, isAssignedIn);
                  }
                  function isAssignedInVariableDeclaration(node) {
                      if (!ts.isBindingPattern(node.name) && getSymbolOfNode(node) === symbol && hasInitializer(node)) {
                          return true;
                      }
                      return ts.forEachChild(node, isAssignedIn);
                  }
                  function isAssignedIn(node) {
                      switch (node.kind) {
                          case 170:
                              return isAssignedInBinaryExpression(node);
                          case 199:
                          case 153:
                              return isAssignedInVariableDeclaration(node);
                          case 151:
                          case 152:
                          case 154:
                          case 155:
                          case 156:
                          case 157:
                          case 158:
                          case 159:
                          case 161:
                          case 162:
                          case 168:
                          case 165:
                          case 166:
                          case 167:
                          case 169:
                          case 171:
                          case 174:
                          case 180:
                          case 181:
                          case 183:
                          case 184:
                          case 185:
                          case 186:
                          case 187:
                          case 188:
                          case 189:
                          case 192:
                          case 193:
                          case 194:
                          case 221:
                          case 222:
                          case 195:
                          case 196:
                          case 197:
                          case 224:
                              return ts.forEachChild(node, isAssignedIn);
                      }
                      return false;
                  }
              }
              function resolveLocation(node) {
                  var containerNodes = [];
                  for (var parent_3 = node.parent; parent_3; parent_3 = parent_3.parent) {
                      if ((ts.isExpression(parent_3) || ts.isObjectLiteralMethod(node)) &&
                          isContextSensitive(parent_3)) {
                          containerNodes.unshift(parent_3);
                      }
                  }
                  ts.forEach(containerNodes, function (node) { getTypeOfNode(node); });
              }
              function getSymbolAtLocation(node) {
                  resolveLocation(node);
                  return getSymbolInfo(node);
              }
              function getTypeAtLocation(node) {
                  resolveLocation(node);
                  return getTypeOfNode(node);
              }
              function getTypeOfSymbolAtLocation(symbol, node) {
                  resolveLocation(node);
                  return getNarrowedTypeOfSymbol(symbol, node);
              }
              function getNarrowedTypeOfSymbol(symbol, node) {
                  var type = getTypeOfSymbol(symbol);
                  if (node && symbol.flags & 3 && type.flags & (1 | 48128 | 16384 | 512)) {
                      loop: while (node.parent) {
                          var child = node;
                          node = node.parent;
                          var narrowedType = type;
                          switch (node.kind) {
                              case 184:
                                  if (child !== node.expression) {
                                      narrowedType = narrowType(type, node.expression, child === node.thenStatement);
                                  }
                                  break;
                              case 171:
                                  if (child !== node.condition) {
                                      narrowedType = narrowType(type, node.condition, child === node.whenTrue);
                                  }
                                  break;
                              case 170:
                                  if (child === node.right) {
                                      if (node.operatorToken.kind === 48) {
                                          narrowedType = narrowType(type, node.left, true);
                                      }
                                      else if (node.operatorToken.kind === 49) {
                                          narrowedType = narrowType(type, node.left, false);
                                      }
                                  }
                                  break;
                              case 228:
                              case 206:
                              case 201:
                              case 135:
                              case 134:
                              case 137:
                              case 138:
                              case 136:
                                  break loop;
                          }
                          if (narrowedType !== type) {
                              if (isVariableAssignedWithin(symbol, node)) {
                                  break;
                              }
                              type = narrowedType;
                          }
                      }
                  }
                  return type;
                  function narrowTypeByEquality(type, expr, assumeTrue) {
                      if (expr.left.kind !== 166 || expr.right.kind !== 8) {
                          return type;
                      }
                      var left = expr.left;
                      var right = expr.right;
                      if (left.expression.kind !== 65 || getResolvedSymbol(left.expression) !== symbol) {
                          return type;
                      }
                      var typeInfo = primitiveTypeInfo[right.text];
                      if (expr.operatorToken.kind === 31) {
                          assumeTrue = !assumeTrue;
                      }
                      if (assumeTrue) {
                          if (!typeInfo) {
                              return removeTypesFromUnionType(type, 258 | 132 | 8 | 1048576, true, false);
                          }
                          if (isTypeSubtypeOf(typeInfo.type, type)) {
                              return typeInfo.type;
                          }
                          return removeTypesFromUnionType(type, typeInfo.flags, false, false);
                      }
                      else {
                          if (typeInfo) {
                              return removeTypesFromUnionType(type, typeInfo.flags, true, false);
                          }
                          return type;
                      }
                  }
                  function narrowTypeByAnd(type, expr, assumeTrue) {
                      if (assumeTrue) {
                          return narrowType(narrowType(type, expr.left, true), expr.right, true);
                      }
                      else {
                          return getUnionType([
                              narrowType(type, expr.left, false),
                              narrowType(narrowType(type, expr.left, true), expr.right, false)
                          ]);
                      }
                  }
                  function narrowTypeByOr(type, expr, assumeTrue) {
                      if (assumeTrue) {
                          return getUnionType([
                              narrowType(type, expr.left, true),
                              narrowType(narrowType(type, expr.left, false), expr.right, true)
                          ]);
                      }
                      else {
                          return narrowType(narrowType(type, expr.left, false), expr.right, false);
                      }
                  }
                  function narrowTypeByInstanceof(type, expr, assumeTrue) {
                      if (type.flags & 1 || !assumeTrue || expr.left.kind !== 65 || getResolvedSymbol(expr.left) !== symbol) {
                          return type;
                      }
                      var rightType = checkExpression(expr.right);
                      if (!isTypeSubtypeOf(rightType, globalFunctionType)) {
                          return type;
                      }
                      var targetType;
                      var prototypeProperty = getPropertyOfType(rightType, "prototype");
                      if (prototypeProperty) {
                          var prototypePropertyType = getTypeOfSymbol(prototypeProperty);
                          if (prototypePropertyType !== anyType) {
                              targetType = prototypePropertyType;
                          }
                      }
                      if (!targetType) {
                          var constructSignatures;
                          if (rightType.flags & 2048) {
                              constructSignatures = resolveDeclaredMembers(rightType).declaredConstructSignatures;
                          }
                          else if (rightType.flags & 32768) {
                              constructSignatures = getSignaturesOfType(rightType, 1);
                          }
                          if (constructSignatures && constructSignatures.length) {
                              targetType = getUnionType(ts.map(constructSignatures, function (signature) { return getReturnTypeOfSignature(getErasedSignature(signature)); }));
                          }
                      }
                      if (targetType) {
                          if (isTypeSubtypeOf(targetType, type)) {
                              return targetType;
                          }
                          if (type.flags & 16384) {
                              return getUnionType(ts.filter(type.types, function (t) { return isTypeSubtypeOf(t, targetType); }));
                          }
                      }
                      return type;
                  }
                  function narrowType(type, expr, assumeTrue) {
                      switch (expr.kind) {
                          case 162:
                              return narrowType(type, expr.expression, assumeTrue);
                          case 170:
                              var operator = expr.operatorToken.kind;
                              if (operator === 30 || operator === 31) {
                                  return narrowTypeByEquality(type, expr, assumeTrue);
                              }
                              else if (operator === 48) {
                                  return narrowTypeByAnd(type, expr, assumeTrue);
                              }
                              else if (operator === 49) {
                                  return narrowTypeByOr(type, expr, assumeTrue);
                              }
                              else if (operator === 87) {
                                  return narrowTypeByInstanceof(type, expr, assumeTrue);
                              }
                              break;
                          case 168:
                              if (expr.operator === 46) {
                                  return narrowType(type, expr.operand, !assumeTrue);
                              }
                              break;
                      }
                      return type;
                  }
              }
              function checkIdentifier(node) {
                  var symbol = getResolvedSymbol(node);
                  if (symbol === argumentsSymbol && ts.getContainingFunction(node).kind === 164 && languageVersion < 2) {
                      error(node, ts.Diagnostics.The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression);
                  }
                  if (symbol.flags & 8388608 && !isInTypeQuery(node) && !isConstEnumOrConstEnumOnlyModule(resolveAlias(symbol))) {
                      markAliasSymbolAsReferenced(symbol);
                  }
                  checkCollisionWithCapturedSuperVariable(node, node);
                  checkCollisionWithCapturedThisVariable(node, node);
                  checkBlockScopedBindingCapturedInLoop(node, symbol);
                  return getNarrowedTypeOfSymbol(getExportSymbolOfValueSymbolIfExported(symbol), node);
              }
              function isInsideFunction(node, threshold) {
                  var current = node;
                  while (current && current !== threshold) {
                      if (ts.isFunctionLike(current)) {
                          return true;
                      }
                      current = current.parent;
                  }
                  return false;
              }
              function checkBlockScopedBindingCapturedInLoop(node, symbol) {
                  if (languageVersion >= 2 ||
                      (symbol.flags & 2) === 0 ||
                      symbol.valueDeclaration.parent.kind === 224) {
                      return;
                  }
                  var container = symbol.valueDeclaration;
                  while (container.kind !== 200) {
                      container = container.parent;
                  }
                  container = container.parent;
                  if (container.kind === 181) {
                      container = container.parent;
                  }
                  var inFunction = isInsideFunction(node.parent, container);
                  var current = container;
                  while (current && !ts.nodeStartsNewLexicalEnvironment(current)) {
                      if (isIterationStatement(current, false)) {
                          if (inFunction) {
                              grammarErrorOnFirstToken(current, ts.Diagnostics.Loop_contains_block_scoped_variable_0_referenced_by_a_function_in_the_loop_This_is_only_supported_in_ECMAScript_6_or_higher, ts.declarationNameToString(node));
                          }
                          getNodeLinks(symbol.valueDeclaration).flags |= 256;
                          break;
                      }
                      current = current.parent;
                  }
              }
              function captureLexicalThis(node, container) {
                  var classNode = container.parent && container.parent.kind === 202 ? container.parent : undefined;
                  getNodeLinks(node).flags |= 2;
                  if (container.kind === 133 || container.kind === 136) {
                      getNodeLinks(classNode).flags |= 4;
                  }
                  else {
                      getNodeLinks(container).flags |= 4;
                  }
              }
              function checkThisExpression(node) {
                  var container = ts.getThisContainer(node, true);
                  var needToCaptureLexicalThis = false;
                  if (container.kind === 164) {
                      container = ts.getThisContainer(container, false);
                      needToCaptureLexicalThis = (languageVersion < 2);
                  }
                  switch (container.kind) {
                      case 206:
                          error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_module_or_namespace_body);
                          break;
                      case 205:
                          error(node, ts.Diagnostics.this_cannot_be_referenced_in_current_location);
                          break;
                      case 136:
                          if (isInConstructorArgumentInitializer(node, container)) {
                              error(node, ts.Diagnostics.this_cannot_be_referenced_in_constructor_arguments);
                          }
                          break;
                      case 133:
                      case 132:
                          if (container.flags & 128) {
                              error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_static_property_initializer);
                          }
                          break;
                      case 128:
                          error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_computed_property_name);
                          break;
                  }
                  if (needToCaptureLexicalThis) {
                      captureLexicalThis(node, container);
                  }
                  var classNode = container.parent && container.parent.kind === 202 ? container.parent : undefined;
                  if (classNode) {
                      var symbol = getSymbolOfNode(classNode);
                      return container.flags & 128 ? getTypeOfSymbol(symbol) : getDeclaredTypeOfSymbol(symbol);
                  }
                  return anyType;
              }
              function isInConstructorArgumentInitializer(node, constructorDecl) {
                  for (var n = node; n && n !== constructorDecl; n = n.parent) {
                      if (n.kind === 130) {
                          return true;
                      }
                  }
                  return false;
              }
              function checkSuperExpression(node) {
                  var isCallExpression = node.parent.kind === 158 && node.parent.expression === node;
                  var enclosingClass = ts.getAncestor(node, 202);
                  var baseClass;
                  if (enclosingClass && ts.getClassExtendsHeritageClauseElement(enclosingClass)) {
                      var classType = getDeclaredTypeOfSymbol(getSymbolOfNode(enclosingClass));
                      var baseTypes = getBaseTypes(classType);
                      baseClass = baseTypes.length && baseTypes[0];
                  }
                  if (!baseClass) {
                      error(node, ts.Diagnostics.super_can_only_be_referenced_in_a_derived_class);
                      return unknownType;
                  }
                  var container = ts.getSuperContainer(node, true);
                  if (container) {
                      var canUseSuperExpression = false;
                      var needToCaptureLexicalThis;
                      if (isCallExpression) {
                          canUseSuperExpression = container.kind === 136;
                      }
                      else {
                          needToCaptureLexicalThis = false;
                          while (container && container.kind === 164) {
                              container = ts.getSuperContainer(container, true);
                              needToCaptureLexicalThis = languageVersion < 2;
                          }
                          if (container && container.parent && container.parent.kind === 202) {
                              if (container.flags & 128) {
                                  canUseSuperExpression =
                                      container.kind === 135 ||
                                          container.kind === 134 ||
                                          container.kind === 137 ||
                                          container.kind === 138;
                              }
                              else {
                                  canUseSuperExpression =
                                      container.kind === 135 ||
                                          container.kind === 134 ||
                                          container.kind === 137 ||
                                          container.kind === 138 ||
                                          container.kind === 133 ||
                                          container.kind === 132 ||
                                          container.kind === 136;
                              }
                          }
                      }
                      if (canUseSuperExpression) {
                          var returnType;
                          if ((container.flags & 128) || isCallExpression) {
                              getNodeLinks(node).flags |= 32;
                              returnType = getTypeOfSymbol(baseClass.symbol);
                          }
                          else {
                              getNodeLinks(node).flags |= 16;
                              returnType = baseClass;
                          }
                          if (container.kind === 136 && isInConstructorArgumentInitializer(node, container)) {
                              error(node, ts.Diagnostics.super_cannot_be_referenced_in_constructor_arguments);
                              returnType = unknownType;
                          }
                          if (!isCallExpression && needToCaptureLexicalThis) {
                              captureLexicalThis(node.parent, container);
                          }
                          return returnType;
                      }
                  }
                  if (container && container.kind === 128) {
                      error(node, ts.Diagnostics.super_cannot_be_referenced_in_a_computed_property_name);
                  }
                  else if (isCallExpression) {
                      error(node, ts.Diagnostics.Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors);
                  }
                  else {
                      error(node, ts.Diagnostics.super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class);
                  }
                  return unknownType;
              }
              function getContextuallyTypedParameterType(parameter) {
                  if (isFunctionExpressionOrArrowFunction(parameter.parent)) {
                      var func = parameter.parent;
                      if (isContextSensitive(func)) {
                          var contextualSignature = getContextualSignature(func);
                          if (contextualSignature) {
                              var funcHasRestParameters = ts.hasRestParameters(func);
                              var len = func.parameters.length - (funcHasRestParameters ? 1 : 0);
                              var indexOfParameter = ts.indexOf(func.parameters, parameter);
                              if (indexOfParameter < len) {
                                  return getTypeAtPosition(contextualSignature, indexOfParameter);
                              }
                              if (indexOfParameter === (func.parameters.length - 1) &&
                                  funcHasRestParameters && contextualSignature.hasRestParameter && func.parameters.length >= contextualSignature.parameters.length) {
                                  return getTypeOfSymbol(ts.lastOrUndefined(contextualSignature.parameters));
                              }
                          }
                      }
                  }
                  return undefined;
              }
              function getContextualTypeForInitializerExpression(node) {
                  var declaration = node.parent;
                  if (node === declaration.initializer) {
                      if (declaration.type) {
                          return getTypeFromTypeNode(declaration.type);
                      }
                      if (declaration.kind === 130) {
                          var type = getContextuallyTypedParameterType(declaration);
                          if (type) {
                              return type;
                          }
                      }
                      if (ts.isBindingPattern(declaration.name)) {
                          return getTypeFromBindingPattern(declaration.name);
                      }
                  }
                  return undefined;
              }
              function getContextualTypeForReturnExpression(node) {
                  var func = ts.getContainingFunction(node);
                  if (func) {
                      if (func.type || func.kind === 136 || func.kind === 137 && getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(func.symbol, 138))) {
                          return getReturnTypeOfSignature(getSignatureFromDeclaration(func));
                      }
                      var signature = getContextualSignatureForFunctionLikeDeclaration(func);
                      if (signature) {
                          return getReturnTypeOfSignature(signature);
                      }
                  }
                  return undefined;
              }
              function getContextualTypeForArgument(callTarget, arg) {
                  var args = getEffectiveCallArguments(callTarget);
                  var argIndex = ts.indexOf(args, arg);
                  if (argIndex >= 0) {
                      var signature = getResolvedSignature(callTarget);
                      return getTypeAtPosition(signature, argIndex);
                  }
                  return undefined;
              }
              function getContextualTypeForSubstitutionExpression(template, substitutionExpression) {
                  if (template.parent.kind === 160) {
                      return getContextualTypeForArgument(template.parent, substitutionExpression);
                  }
                  return undefined;
              }
              function getContextualTypeForBinaryOperand(node) {
                  var binaryExpression = node.parent;
                  var operator = binaryExpression.operatorToken.kind;
                  if (operator >= 53 && operator <= 64) {
                      if (node === binaryExpression.right) {
                          return checkExpression(binaryExpression.left);
                      }
                  }
                  else if (operator === 49) {
                      var type = getContextualType(binaryExpression);
                      if (!type && node === binaryExpression.right) {
                          type = checkExpression(binaryExpression.left);
                      }
                      return type;
                  }
                  return undefined;
              }
              function applyToContextualType(type, mapper) {
                  if (!(type.flags & 16384)) {
                      return mapper(type);
                  }
                  var types = type.types;
                  var mappedType;
                  var mappedTypes;
                  for (var _i = 0; _i < types.length; _i++) {
                      var current = types[_i];
                      var t = mapper(current);
                      if (t) {
                          if (!mappedType) {
                              mappedType = t;
                          }
                          else if (!mappedTypes) {
                              mappedTypes = [mappedType, t];
                          }
                          else {
                              mappedTypes.push(t);
                          }
                      }
                  }
                  return mappedTypes ? getUnionType(mappedTypes) : mappedType;
              }
              function getTypeOfPropertyOfContextualType(type, name) {
                  return applyToContextualType(type, function (t) {
                      var prop = getPropertyOfObjectType(t, name);
                      return prop ? getTypeOfSymbol(prop) : undefined;
                  });
              }
              function getIndexTypeOfContextualType(type, kind) {
                  return applyToContextualType(type, function (t) { return getIndexTypeOfObjectOrUnionType(t, kind); });
              }
              function contextualTypeIsTupleLikeType(type) {
                  return !!(type.flags & 16384 ? ts.forEach(type.types, isTupleLikeType) : isTupleLikeType(type));
              }
              function contextualTypeHasIndexSignature(type, kind) {
                  return !!(type.flags & 16384 ? ts.forEach(type.types, function (t) { return getIndexTypeOfObjectOrUnionType(t, kind); }) : getIndexTypeOfObjectOrUnionType(type, kind));
              }
              function getContextualTypeForObjectLiteralMethod(node) {
                  ts.Debug.assert(ts.isObjectLiteralMethod(node));
                  if (isInsideWithStatementBody(node)) {
                      return undefined;
                  }
                  return getContextualTypeForObjectLiteralElement(node);
              }
              function getContextualTypeForObjectLiteralElement(element) {
                  var objectLiteral = element.parent;
                  var type = getContextualType(objectLiteral);
                  if (type) {
                      if (!ts.hasDynamicName(element)) {
                          var symbolName = getSymbolOfNode(element).name;
                          var propertyType = getTypeOfPropertyOfContextualType(type, symbolName);
                          if (propertyType) {
                              return propertyType;
                          }
                      }
                      return isNumericName(element.name) && getIndexTypeOfContextualType(type, 1) ||
                          getIndexTypeOfContextualType(type, 0);
                  }
                  return undefined;
              }
              function getContextualTypeForElementExpression(node) {
                  var arrayLiteral = node.parent;
                  var type = getContextualType(arrayLiteral);
                  if (type) {
                      var index = ts.indexOf(arrayLiteral.elements, node);
                      return getTypeOfPropertyOfContextualType(type, "" + index)
                          || getIndexTypeOfContextualType(type, 1)
                          || (languageVersion >= 2 ? checkIteratedType(type, undefined) : undefined);
                  }
                  return undefined;
              }
              function getContextualTypeForConditionalOperand(node) {
                  var conditional = node.parent;
                  return node === conditional.whenTrue || node === conditional.whenFalse ? getContextualType(conditional) : undefined;
              }
              function getContextualType(node) {
                  if (isInsideWithStatementBody(node)) {
                      return undefined;
                  }
                  if (node.contextualType) {
                      return node.contextualType;
                  }
                  var parent = node.parent;
                  switch (parent.kind) {
                      case 199:
                      case 130:
                      case 133:
                      case 132:
                      case 153:
                          return getContextualTypeForInitializerExpression(node);
                      case 164:
                      case 192:
                          return getContextualTypeForReturnExpression(node);
                      case 158:
                      case 159:
                          return getContextualTypeForArgument(parent, node);
                      case 161:
                          return getTypeFromTypeNode(parent.type);
                      case 170:
                          return getContextualTypeForBinaryOperand(node);
                      case 225:
                          return getContextualTypeForObjectLiteralElement(parent);
                      case 154:
                          return getContextualTypeForElementExpression(node);
                      case 171:
                          return getContextualTypeForConditionalOperand(node);
                      case 178:
                          ts.Debug.assert(parent.parent.kind === 172);
                          return getContextualTypeForSubstitutionExpression(parent.parent, node);
                      case 162:
                          return getContextualType(parent);
                  }
                  return undefined;
              }
              function getNonGenericSignature(type) {
                  var signatures = getSignaturesOfObjectOrUnionType(type, 0);
                  if (signatures.length === 1) {
                      var signature = signatures[0];
                      if (!signature.typeParameters) {
                          return signature;
                      }
                  }
              }
              function isFunctionExpressionOrArrowFunction(node) {
                  return node.kind === 163 || node.kind === 164;
              }
              function getContextualSignatureForFunctionLikeDeclaration(node) {
                  return isFunctionExpressionOrArrowFunction(node) ? getContextualSignature(node) : undefined;
              }
              function getContextualSignature(node) {
                  ts.Debug.assert(node.kind !== 135 || ts.isObjectLiteralMethod(node));
                  var type = ts.isObjectLiteralMethod(node)
                      ? getContextualTypeForObjectLiteralMethod(node)
                      : getContextualType(node);
                  if (!type) {
                      return undefined;
                  }
                  if (!(type.flags & 16384)) {
                      return getNonGenericSignature(type);
                  }
                  var signatureList;
                  var types = type.types;
                  for (var _i = 0; _i < types.length; _i++) {
                      var current = types[_i];
                      if (signatureList &&
                          getSignaturesOfObjectOrUnionType(current, 0).length > 1) {
                          return undefined;
                      }
                      var signature = getNonGenericSignature(current);
                      if (signature) {
                          if (!signatureList) {
                              signatureList = [signature];
                          }
                          else if (!compareSignatures(signatureList[0], signature, false, compareTypes)) {
                              return undefined;
                          }
                          else {
                              signatureList.push(signature);
                          }
                      }
                  }
                  var result;
                  if (signatureList) {
                      result = cloneSignature(signatureList[0]);
                      result.resolvedReturnType = undefined;
                      result.unionSignatures = signatureList;
                  }
                  return result;
              }
              function isInferentialContext(mapper) {
                  return mapper && mapper !== identityMapper;
              }
              function isAssignmentTarget(node) {
                  var parent = node.parent;
                  if (parent.kind === 170 && parent.operatorToken.kind === 53 && parent.left === node) {
                      return true;
                  }
                  if (parent.kind === 225) {
                      return isAssignmentTarget(parent.parent);
                  }
                  if (parent.kind === 154) {
                      return isAssignmentTarget(parent);
                  }
                  return false;
              }
              function checkSpreadElementExpression(node, contextualMapper) {
                  var arrayOrIterableType = checkExpressionCached(node.expression, contextualMapper);
                  return checkIteratedTypeOrElementType(arrayOrIterableType, node.expression, false);
              }
              function checkArrayLiteral(node, contextualMapper) {
                  var elements = node.elements;
                  if (!elements.length) {
                      return createArrayType(undefinedType);
                  }
                  var hasSpreadElement = false;
                  var elementTypes = [];
                  var inDestructuringPattern = isAssignmentTarget(node);
                  for (var _i = 0; _i < elements.length; _i++) {
                      var e = elements[_i];
                      if (inDestructuringPattern && e.kind === 174) {
                          var restArrayType = checkExpression(e.expression, contextualMapper);
                          var restElementType = getIndexTypeOfType(restArrayType, 1) ||
                              (languageVersion >= 2 ? checkIteratedType(restArrayType, undefined) : undefined);
                          if (restElementType) {
                              elementTypes.push(restElementType);
                          }
                      }
                      else {
                          var type = checkExpression(e, contextualMapper);
                          elementTypes.push(type);
                      }
                      hasSpreadElement = hasSpreadElement || e.kind === 174;
                  }
                  if (!hasSpreadElement) {
                      var contextualType = getContextualType(node);
                      if (contextualType && contextualTypeIsTupleLikeType(contextualType) || inDestructuringPattern) {
                          return createTupleType(elementTypes);
                      }
                  }
                  return createArrayType(getUnionType(elementTypes));
              }
              function isNumericName(name) {
                  return name.kind === 128 ? isNumericComputedName(name) : isNumericLiteralName(name.text);
              }
              function isNumericComputedName(name) {
                  return allConstituentTypesHaveKind(checkComputedPropertyName(name), 1 | 132);
              }
              function isNumericLiteralName(name) {
                  return (+name).toString() === name;
              }
              function checkComputedPropertyName(node) {
                  var links = getNodeLinks(node.expression);
                  if (!links.resolvedType) {
                      links.resolvedType = checkExpression(node.expression);
                      if (!allConstituentTypesHaveKind(links.resolvedType, 1 | 132 | 258 | 1048576)) {
                          error(node, ts.Diagnostics.A_computed_property_name_must_be_of_type_string_number_symbol_or_any);
                      }
                      else {
                          checkThatExpressionIsProperSymbolReference(node.expression, links.resolvedType, true);
                      }
                  }
                  return links.resolvedType;
              }
              function checkObjectLiteral(node, contextualMapper) {
                  checkGrammarObjectLiteralExpression(node);
                  var propertiesTable = {};
                  var propertiesArray = [];
                  var contextualType = getContextualType(node);
                  var typeFlags;
                  for (var _i = 0, _a = node.properties; _i < _a.length; _i++) {
                      var memberDecl = _a[_i];
                      var member = memberDecl.symbol;
                      if (memberDecl.kind === 225 ||
                          memberDecl.kind === 226 ||
                          ts.isObjectLiteralMethod(memberDecl)) {
                          var type = void 0;
                          if (memberDecl.kind === 225) {
                              type = checkPropertyAssignment(memberDecl, contextualMapper);
                          }
                          else if (memberDecl.kind === 135) {
                              type = checkObjectLiteralMethod(memberDecl, contextualMapper);
                          }
                          else {
                              ts.Debug.assert(memberDecl.kind === 226);
                              type = checkExpression(memberDecl.name, contextualMapper);
                          }
                          typeFlags |= type.flags;
                          var prop = createSymbol(4 | 67108864 | member.flags, member.name);
                          prop.declarations = member.declarations;
                          prop.parent = member.parent;
                          if (member.valueDeclaration) {
                              prop.valueDeclaration = member.valueDeclaration;
                          }
                          prop.type = type;
                          prop.target = member;
                          member = prop;
                      }
                      else {
                          ts.Debug.assert(memberDecl.kind === 137 || memberDecl.kind === 138);
                          checkAccessorDeclaration(memberDecl);
                      }
                      if (!ts.hasDynamicName(memberDecl)) {
                          propertiesTable[member.name] = member;
                      }
                      propertiesArray.push(member);
                  }
                  var stringIndexType = getIndexType(0);
                  var numberIndexType = getIndexType(1);
                  var result = createAnonymousType(node.symbol, propertiesTable, emptyArray, emptyArray, stringIndexType, numberIndexType);
                  result.flags |= 131072 | 524288 | (typeFlags & 262144);
                  return result;
                  function getIndexType(kind) {
                      if (contextualType && contextualTypeHasIndexSignature(contextualType, kind)) {
                          var propTypes = [];
                          for (var i = 0; i < propertiesArray.length; i++) {
                              var propertyDecl = node.properties[i];
                              if (kind === 0 || isNumericName(propertyDecl.name)) {
                                  var type = getTypeOfSymbol(propertiesArray[i]);
                                  if (!ts.contains(propTypes, type)) {
                                      propTypes.push(type);
                                  }
                              }
                          }
                          var result_1 = propTypes.length ? getUnionType(propTypes) : undefinedType;
                          typeFlags |= result_1.flags;
                          return result_1;
                      }
                      return undefined;
                  }
              }
              function getDeclarationKindFromSymbol(s) {
                  return s.valueDeclaration ? s.valueDeclaration.kind : 133;
              }
              function getDeclarationFlagsFromSymbol(s) {
                  return s.valueDeclaration ? ts.getCombinedNodeFlags(s.valueDeclaration) : s.flags & 134217728 ? 16 | 128 : 0;
              }
              function checkClassPropertyAccess(node, left, type, prop) {
                  var flags = getDeclarationFlagsFromSymbol(prop);
                  if (!(flags & (32 | 64))) {
                      return;
                  }
                  var enclosingClassDeclaration = ts.getAncestor(node, 202);
                  var enclosingClass = enclosingClassDeclaration ? getDeclaredTypeOfSymbol(getSymbolOfNode(enclosingClassDeclaration)) : undefined;
                  var declaringClass = getDeclaredTypeOfSymbol(prop.parent);
                  if (flags & 32) {
                      if (declaringClass !== enclosingClass) {
                          error(node, ts.Diagnostics.Property_0_is_private_and_only_accessible_within_class_1, symbolToString(prop), typeToString(declaringClass));
                      }
                      return;
                  }
                  if (left.kind === 91) {
                      return;
                  }
                  if (!enclosingClass || !hasBaseType(enclosingClass, declaringClass)) {
                      error(node, ts.Diagnostics.Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses, symbolToString(prop), typeToString(declaringClass));
                      return;
                  }
                  if (flags & 128) {
                      return;
                  }
                  if (!(getTargetType(type).flags & (1024 | 2048) && hasBaseType(type, enclosingClass))) {
                      error(node, ts.Diagnostics.Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1, symbolToString(prop), typeToString(enclosingClass));
                  }
              }
              function checkPropertyAccessExpression(node) {
                  return checkPropertyAccessExpressionOrQualifiedName(node, node.expression, node.name);
              }
              function checkQualifiedName(node) {
                  return checkPropertyAccessExpressionOrQualifiedName(node, node.left, node.right);
              }
              function checkPropertyAccessExpressionOrQualifiedName(node, left, right) {
                  var type = checkExpressionOrQualifiedName(left);
                  if (type === unknownType)
                      return type;
                  if (type !== anyType) {
                      var apparentType = getApparentType(getWidenedType(type));
                      if (apparentType === unknownType) {
                          return unknownType;
                      }
                      var prop = getPropertyOfType(apparentType, right.text);
                      if (!prop) {
                          if (right.text) {
                              error(right, ts.Diagnostics.Property_0_does_not_exist_on_type_1, ts.declarationNameToString(right), typeToString(type));
                          }
                          return unknownType;
                      }
                      getNodeLinks(node).resolvedSymbol = prop;
                      if (prop.parent && prop.parent.flags & 32) {
                          if (left.kind === 91 && getDeclarationKindFromSymbol(prop) !== 135) {
                              error(right, ts.Diagnostics.Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword);
                          }
                          else {
                              checkClassPropertyAccess(node, left, type, prop);
                          }
                      }
                      return getTypeOfSymbol(prop);
                  }
                  return anyType;
              }
              function isValidPropertyAccess(node, propertyName) {
                  var left = node.kind === 156
                      ? node.expression
                      : node.left;
                  var type = checkExpressionOrQualifiedName(left);
                  if (type !== unknownType && type !== anyType) {
                      var prop = getPropertyOfType(getWidenedType(type), propertyName);
                      if (prop && prop.parent && prop.parent.flags & 32) {
                          if (left.kind === 91 && getDeclarationKindFromSymbol(prop) !== 135) {
                              return false;
                          }
                          else {
                              var modificationCount = diagnostics.getModificationCount();
                              checkClassPropertyAccess(node, left, type, prop);
                              return diagnostics.getModificationCount() === modificationCount;
                          }
                      }
                  }
                  return true;
              }
              function checkIndexedAccess(node) {
                  if (!node.argumentExpression) {
                      var sourceFile = getSourceFile(node);
                      if (node.parent.kind === 159 && node.parent.expression === node) {
                          var start = ts.skipTrivia(sourceFile.text, node.expression.end);
                          var end = node.end;
                          grammarErrorAtPos(sourceFile, start, end - start, ts.Diagnostics.new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead);
                      }
                      else {
                          var start = node.end - "]".length;
                          var end = node.end;
                          grammarErrorAtPos(sourceFile, start, end - start, ts.Diagnostics.Expression_expected);
                      }
                  }
                  var objectType = getApparentType(checkExpression(node.expression));
                  var indexType = node.argumentExpression ? checkExpression(node.argumentExpression) : unknownType;
                  if (objectType === unknownType) {
                      return unknownType;
                  }
                  var isConstEnum = isConstEnumObjectType(objectType);
                  if (isConstEnum &&
                      (!node.argumentExpression || node.argumentExpression.kind !== 8)) {
                      error(node.argumentExpression, ts.Diagnostics.A_const_enum_member_can_only_be_accessed_using_a_string_literal);
                      return unknownType;
                  }
                  if (node.argumentExpression) {
                      var name_6 = getPropertyNameForIndexedAccess(node.argumentExpression, indexType);
                      if (name_6 !== undefined) {
                          var prop = getPropertyOfType(objectType, name_6);
                          if (prop) {
                              getNodeLinks(node).resolvedSymbol = prop;
                              return getTypeOfSymbol(prop);
                          }
                          else if (isConstEnum) {
                              error(node.argumentExpression, ts.Diagnostics.Property_0_does_not_exist_on_const_enum_1, name_6, symbolToString(objectType.symbol));
                              return unknownType;
                          }
                      }
                  }
                  if (allConstituentTypesHaveKind(indexType, 1 | 258 | 132 | 1048576)) {
                      if (allConstituentTypesHaveKind(indexType, 1 | 132)) {
                          var numberIndexType = getIndexTypeOfType(objectType, 1);
                          if (numberIndexType) {
                              return numberIndexType;
                          }
                      }
                      var stringIndexType = getIndexTypeOfType(objectType, 0);
                      if (stringIndexType) {
                          return stringIndexType;
                      }
                      if (compilerOptions.noImplicitAny && !compilerOptions.suppressImplicitAnyIndexErrors && objectType !== anyType) {
                          error(node, ts.Diagnostics.Index_signature_of_object_type_implicitly_has_an_any_type);
                      }
                      return anyType;
                  }
                  error(node, ts.Diagnostics.An_index_expression_argument_must_be_of_type_string_number_symbol_or_any);
                  return unknownType;
              }
              function getPropertyNameForIndexedAccess(indexArgumentExpression, indexArgumentType) {
                  if (indexArgumentExpression.kind === 8 || indexArgumentExpression.kind === 7) {
                      return indexArgumentExpression.text;
                  }
                  if (checkThatExpressionIsProperSymbolReference(indexArgumentExpression, indexArgumentType, false)) {
                      var rightHandSideName = indexArgumentExpression.name.text;
                      return ts.getPropertyNameForKnownSymbolName(rightHandSideName);
                  }
                  return undefined;
              }
              function checkThatExpressionIsProperSymbolReference(expression, expressionType, reportError) {
                  if (expressionType === unknownType) {
                      return false;
                  }
                  if (!ts.isWellKnownSymbolSyntactically(expression)) {
                      return false;
                  }
                  if ((expressionType.flags & 1048576) === 0) {
                      if (reportError) {
                          error(expression, ts.Diagnostics.A_computed_property_name_of_the_form_0_must_be_of_type_symbol, ts.getTextOfNode(expression));
                      }
                      return false;
                  }
                  var leftHandSide = expression.expression;
                  var leftHandSideSymbol = getResolvedSymbol(leftHandSide);
                  if (!leftHandSideSymbol) {
                      return false;
                  }
                  var globalESSymbol = getGlobalESSymbolConstructorSymbol();
                  if (!globalESSymbol) {
                      return false;
                  }
                  if (leftHandSideSymbol !== globalESSymbol) {
                      if (reportError) {
                          error(leftHandSide, ts.Diagnostics.Symbol_reference_does_not_refer_to_the_global_Symbol_constructor_object);
                      }
                      return false;
                  }
                  return true;
              }
              function resolveUntypedCall(node) {
                  if (node.kind === 160) {
                      checkExpression(node.template);
                  }
                  else {
                      ts.forEach(node.arguments, function (argument) {
                          checkExpression(argument);
                      });
                  }
                  return anySignature;
              }
              function resolveErrorCall(node) {
                  resolveUntypedCall(node);
                  return unknownSignature;
              }
              function reorderCandidates(signatures, result) {
                  var lastParent;
                  var lastSymbol;
                  var cutoffIndex = 0;
                  var index;
                  var specializedIndex = -1;
                  var spliceIndex;
                  ts.Debug.assert(!result.length);
                  for (var _i = 0; _i < signatures.length; _i++) {
                      var signature = signatures[_i];
                      var symbol = signature.declaration && getSymbolOfNode(signature.declaration);
                      var parent_4 = signature.declaration && signature.declaration.parent;
                      if (!lastSymbol || symbol === lastSymbol) {
                          if (lastParent && parent_4 === lastParent) {
                              index++;
                          }
                          else {
                              lastParent = parent_4;
                              index = cutoffIndex;
                          }
                      }
                      else {
                          index = cutoffIndex = result.length;
                          lastParent = parent_4;
                      }
                      lastSymbol = symbol;
                      if (signature.hasStringLiterals) {
                          specializedIndex++;
                          spliceIndex = specializedIndex;
                          cutoffIndex++;
                      }
                      else {
                          spliceIndex = index;
                      }
                      result.splice(spliceIndex, 0, signature);
                  }
              }
              function getSpreadArgumentIndex(args) {
                  for (var i = 0; i < args.length; i++) {
                      if (args[i].kind === 174) {
                          return i;
                      }
                  }
                  return -1;
              }
              function hasCorrectArity(node, args, signature) {
                  var adjustedArgCount;
                  var typeArguments;
                  var callIsIncomplete;
                  if (node.kind === 160) {
                      var tagExpression = node;
                      adjustedArgCount = args.length;
                      typeArguments = undefined;
                      if (tagExpression.template.kind === 172) {
                          var templateExpression = tagExpression.template;
                          var lastSpan = ts.lastOrUndefined(templateExpression.templateSpans);
                          ts.Debug.assert(lastSpan !== undefined);
                          callIsIncomplete = ts.nodeIsMissing(lastSpan.literal) || !!lastSpan.literal.isUnterminated;
                      }
                      else {
                          var templateLiteral = tagExpression.template;
                          ts.Debug.assert(templateLiteral.kind === 10);
                          callIsIncomplete = !!templateLiteral.isUnterminated;
                      }
                  }
                  else {
                      var callExpression = node;
                      if (!callExpression.arguments) {
                          ts.Debug.assert(callExpression.kind === 159);
                          return signature.minArgumentCount === 0;
                      }
                      adjustedArgCount = callExpression.arguments.hasTrailingComma ? args.length + 1 : args.length;
                      callIsIncomplete = callExpression.arguments.end === callExpression.end;
                      typeArguments = callExpression.typeArguments;
                  }
                  var hasRightNumberOfTypeArgs = !typeArguments ||
                      (signature.typeParameters && typeArguments.length === signature.typeParameters.length);
                  if (!hasRightNumberOfTypeArgs) {
                      return false;
                  }
                  var spreadArgIndex = getSpreadArgumentIndex(args);
                  if (spreadArgIndex >= 0) {
                      return signature.hasRestParameter && spreadArgIndex >= signature.parameters.length - 1;
                  }
                  if (!signature.hasRestParameter && adjustedArgCount > signature.parameters.length) {
                      return false;
                  }
                  var hasEnoughArguments = adjustedArgCount >= signature.minArgumentCount;
                  return callIsIncomplete || hasEnoughArguments;
              }
              function getSingleCallSignature(type) {
                  if (type.flags & 48128) {
                      var resolved = resolveObjectOrUnionTypeMembers(type);
                      if (resolved.callSignatures.length === 1 && resolved.constructSignatures.length === 0 &&
                          resolved.properties.length === 0 && !resolved.stringIndexType && !resolved.numberIndexType) {
                          return resolved.callSignatures[0];
                      }
                  }
                  return undefined;
              }
              function instantiateSignatureInContextOf(signature, contextualSignature, contextualMapper) {
                  var context = createInferenceContext(signature.typeParameters, true);
                  forEachMatchingParameterType(contextualSignature, signature, function (source, target) {
                      inferTypes(context, instantiateType(source, contextualMapper), target);
                  });
                  return getSignatureInstantiation(signature, getInferredTypes(context));
              }
              function inferTypeArguments(signature, args, excludeArgument, context) {
                  var typeParameters = signature.typeParameters;
                  var inferenceMapper = createInferenceMapper(context);
                  for (var i = 0; i < typeParameters.length; i++) {
                      if (!context.inferences[i].isFixed) {
                          context.inferredTypes[i] = undefined;
                      }
                  }
                  if (context.failedTypeParameterIndex !== undefined && !context.inferences[context.failedTypeParameterIndex].isFixed) {
                      context.failedTypeParameterIndex = undefined;
                  }
                  for (var i = 0; i < args.length; i++) {
                      var arg = args[i];
                      if (arg.kind !== 176) {
                          var paramType = getTypeAtPosition(signature, i);
                          var argType = void 0;
                          if (i === 0 && args[i].parent.kind === 160) {
                              argType = globalTemplateStringsArrayType;
                          }
                          else {
                              var mapper = excludeArgument && excludeArgument[i] !== undefined ? identityMapper : inferenceMapper;
                              argType = checkExpressionWithContextualType(arg, paramType, mapper);
                          }
                          inferTypes(context, argType, paramType);
                      }
                  }
                  if (excludeArgument) {
                      for (var i = 0; i < args.length; i++) {
                          if (excludeArgument[i] === false) {
                              var arg = args[i];
                              var paramType = getTypeAtPosition(signature, i);
                              inferTypes(context, checkExpressionWithContextualType(arg, paramType, inferenceMapper), paramType);
                          }
                      }
                  }
                  getInferredTypes(context);
              }
              function checkTypeArguments(signature, typeArguments, typeArgumentResultTypes, reportErrors) {
                  var typeParameters = signature.typeParameters;
                  var typeArgumentsAreAssignable = true;
                  for (var i = 0; i < typeParameters.length; i++) {
                      var typeArgNode = typeArguments[i];
                      var typeArgument = getTypeFromTypeNode(typeArgNode);
                      typeArgumentResultTypes[i] = typeArgument;
                      if (typeArgumentsAreAssignable) {
                          var constraint = getConstraintOfTypeParameter(typeParameters[i]);
                          if (constraint) {
                              typeArgumentsAreAssignable = checkTypeAssignableTo(typeArgument, constraint, reportErrors ? typeArgNode : undefined, ts.Diagnostics.Type_0_does_not_satisfy_the_constraint_1);
                          }
                      }
                  }
                  return typeArgumentsAreAssignable;
              }
              function checkApplicableSignature(node, args, signature, relation, excludeArgument, reportErrors) {
                  for (var i = 0; i < args.length; i++) {
                      var arg = args[i];
                      if (arg.kind !== 176) {
                          var paramType = getTypeAtPosition(signature, i);
                          var argType = i === 0 && node.kind === 160
                              ? globalTemplateStringsArrayType
                              : arg.kind === 8 && !reportErrors
                                  ? getStringLiteralType(arg)
                                  : checkExpressionWithContextualType(arg, paramType, excludeArgument && excludeArgument[i] ? identityMapper : undefined);
                          if (!checkTypeRelatedTo(argType, paramType, relation, reportErrors ? arg : undefined, ts.Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1)) {
                              return false;
                          }
                      }
                  }
                  return true;
              }
              function getEffectiveCallArguments(node) {
                  var args;
                  if (node.kind === 160) {
                      var template = node.template;
                      args = [template];
                      if (template.kind === 172) {
                          ts.forEach(template.templateSpans, function (span) {
                              args.push(span.expression);
                          });
                      }
                  }
                  else {
                      args = node.arguments || emptyArray;
                  }
                  return args;
              }
              function getEffectiveTypeArguments(callExpression) {
                  if (callExpression.expression.kind === 91) {
                      var containingClass = ts.getAncestor(callExpression, 202);
                      var baseClassTypeNode = containingClass && ts.getClassExtendsHeritageClauseElement(containingClass);
                      return baseClassTypeNode && baseClassTypeNode.typeArguments;
                  }
                  else {
                      return callExpression.typeArguments;
                  }
              }
              function resolveCall(node, signatures, candidatesOutArray) {
                  var isTaggedTemplate = node.kind === 160;
                  var typeArguments;
                  if (!isTaggedTemplate) {
                      typeArguments = getEffectiveTypeArguments(node);
                      if (node.expression.kind !== 91) {
                          ts.forEach(typeArguments, checkSourceElement);
                      }
                  }
                  var candidates = candidatesOutArray || [];
                  reorderCandidates(signatures, candidates);
                  if (!candidates.length) {
                      error(node, ts.Diagnostics.Supplied_parameters_do_not_match_any_signature_of_call_target);
                      return resolveErrorCall(node);
                  }
                  var args = getEffectiveCallArguments(node);
                  var excludeArgument;
                  for (var i = isTaggedTemplate ? 1 : 0; i < args.length; i++) {
                      if (isContextSensitive(args[i])) {
                          if (!excludeArgument) {
                              excludeArgument = new Array(args.length);
                          }
                          excludeArgument[i] = true;
                      }
                  }
                  var candidateForArgumentError;
                  var candidateForTypeArgumentError;
                  var resultOfFailedInference;
                  var result;
                  if (candidates.length > 1) {
                      result = chooseOverload(candidates, subtypeRelation);
                  }
                  if (!result) {
                      candidateForArgumentError = undefined;
                      candidateForTypeArgumentError = undefined;
                      resultOfFailedInference = undefined;
                      result = chooseOverload(candidates, assignableRelation);
                  }
                  if (result) {
                      return result;
                  }
                  if (candidateForArgumentError) {
                      checkApplicableSignature(node, args, candidateForArgumentError, assignableRelation, undefined, true);
                  }
                  else if (candidateForTypeArgumentError) {
                      if (!isTaggedTemplate && node.typeArguments) {
                          checkTypeArguments(candidateForTypeArgumentError, node.typeArguments, [], true);
                      }
                      else {
                          ts.Debug.assert(resultOfFailedInference.failedTypeParameterIndex >= 0);
                          var failedTypeParameter = candidateForTypeArgumentError.typeParameters[resultOfFailedInference.failedTypeParameterIndex];
                          var inferenceCandidates = getInferenceCandidates(resultOfFailedInference, resultOfFailedInference.failedTypeParameterIndex);
                          var diagnosticChainHead = ts.chainDiagnosticMessages(undefined, ts.Diagnostics.The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_type_arguments_explicitly, typeToString(failedTypeParameter));
                          reportNoCommonSupertypeError(inferenceCandidates, node.expression || node.tag, diagnosticChainHead);
                      }
                  }
                  else {
                      error(node, ts.Diagnostics.Supplied_parameters_do_not_match_any_signature_of_call_target);
                  }
                  if (!produceDiagnostics) {
                      for (var _i = 0; _i < candidates.length; _i++) {
                          var candidate = candidates[_i];
                          if (hasCorrectArity(node, args, candidate)) {
                              return candidate;
                          }
                      }
                  }
                  return resolveErrorCall(node);
                  function chooseOverload(candidates, relation) {
                      for (var _i = 0; _i < candidates.length; _i++) {
                          var originalCandidate = candidates[_i];
                          if (!hasCorrectArity(node, args, originalCandidate)) {
                              continue;
                          }
                          var candidate = void 0;
                          var typeArgumentsAreValid = void 0;
                          var inferenceContext = originalCandidate.typeParameters
                              ? createInferenceContext(originalCandidate.typeParameters, false)
                              : undefined;
                          while (true) {
                              candidate = originalCandidate;
                              if (candidate.typeParameters) {
                                  var typeArgumentTypes = void 0;
                                  if (typeArguments) {
                                      typeArgumentTypes = new Array(candidate.typeParameters.length);
                                      typeArgumentsAreValid = checkTypeArguments(candidate, typeArguments, typeArgumentTypes, false);
                                  }
                                  else {
                                      inferTypeArguments(candidate, args, excludeArgument, inferenceContext);
                                      typeArgumentsAreValid = inferenceContext.failedTypeParameterIndex === undefined;
                                      typeArgumentTypes = inferenceContext.inferredTypes;
                                  }
                                  if (!typeArgumentsAreValid) {
                                      break;
                                  }
                                  candidate = getSignatureInstantiation(candidate, typeArgumentTypes);
                              }
                              if (!checkApplicableSignature(node, args, candidate, relation, excludeArgument, false)) {
                                  break;
                              }
                              var index = excludeArgument ? ts.indexOf(excludeArgument, true) : -1;
                              if (index < 0) {
                                  return candidate;
                              }
                              excludeArgument[index] = false;
                          }
                          if (originalCandidate.typeParameters) {
                              var instantiatedCandidate = candidate;
                              if (typeArgumentsAreValid) {
                                  candidateForArgumentError = instantiatedCandidate;
                              }
                              else {
                                  candidateForTypeArgumentError = originalCandidate;
                                  if (!typeArguments) {
                                      resultOfFailedInference = inferenceContext;
                                  }
                              }
                          }
                          else {
                              ts.Debug.assert(originalCandidate === candidate);
                              candidateForArgumentError = originalCandidate;
                          }
                      }
                      return undefined;
                  }
              }
              function resolveCallExpression(node, candidatesOutArray) {
                  if (node.expression.kind === 91) {
                      var superType = checkSuperExpression(node.expression);
                      if (superType !== unknownType) {
                          return resolveCall(node, getSignaturesOfType(superType, 1), candidatesOutArray);
                      }
                      return resolveUntypedCall(node);
                  }
                  var funcType = checkExpression(node.expression);
                  var apparentType = getApparentType(funcType);
                  if (apparentType === unknownType) {
                      return resolveErrorCall(node);
                  }
                  var callSignatures = getSignaturesOfType(apparentType, 0);
                  var constructSignatures = getSignaturesOfType(apparentType, 1);
                  if (funcType === anyType || (!callSignatures.length && !constructSignatures.length && !(funcType.flags & 16384) && isTypeAssignableTo(funcType, globalFunctionType))) {
                      if (node.typeArguments) {
                          error(node, ts.Diagnostics.Untyped_function_calls_may_not_accept_type_arguments);
                      }
                      return resolveUntypedCall(node);
                  }
                  if (!callSignatures.length) {
                      if (constructSignatures.length) {
                          error(node, ts.Diagnostics.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new, typeToString(funcType));
                      }
                      else {
                          error(node, ts.Diagnostics.Cannot_invoke_an_expression_whose_type_lacks_a_call_signature);
                      }
                      return resolveErrorCall(node);
                  }
                  return resolveCall(node, callSignatures, candidatesOutArray);
              }
              function resolveNewExpression(node, candidatesOutArray) {
                  if (node.arguments && languageVersion < 2) {
                      var spreadIndex = getSpreadArgumentIndex(node.arguments);
                      if (spreadIndex >= 0) {
                          error(node.arguments[spreadIndex], ts.Diagnostics.Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_6_and_higher);
                      }
                  }
                  var expressionType = checkExpression(node.expression);
                  if (expressionType === anyType) {
                      if (node.typeArguments) {
                          error(node, ts.Diagnostics.Untyped_function_calls_may_not_accept_type_arguments);
                      }
                      return resolveUntypedCall(node);
                  }
                  expressionType = getApparentType(expressionType);
                  if (expressionType === unknownType) {
                      return resolveErrorCall(node);
                  }
                  var constructSignatures = getSignaturesOfType(expressionType, 1);
                  if (constructSignatures.length) {
                      return resolveCall(node, constructSignatures, candidatesOutArray);
                  }
                  var callSignatures = getSignaturesOfType(expressionType, 0);
                  if (callSignatures.length) {
                      var signature = resolveCall(node, callSignatures, candidatesOutArray);
                      if (getReturnTypeOfSignature(signature) !== voidType) {
                          error(node, ts.Diagnostics.Only_a_void_function_can_be_called_with_the_new_keyword);
                      }
                      return signature;
                  }
                  error(node, ts.Diagnostics.Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature);
                  return resolveErrorCall(node);
              }
              function resolveTaggedTemplateExpression(node, candidatesOutArray) {
                  var tagType = checkExpression(node.tag);
                  var apparentType = getApparentType(tagType);
                  if (apparentType === unknownType) {
                      return resolveErrorCall(node);
                  }
                  var callSignatures = getSignaturesOfType(apparentType, 0);
                  if (tagType === anyType || (!callSignatures.length && !(tagType.flags & 16384) && isTypeAssignableTo(tagType, globalFunctionType))) {
                      return resolveUntypedCall(node);
                  }
                  if (!callSignatures.length) {
                      error(node, ts.Diagnostics.Cannot_invoke_an_expression_whose_type_lacks_a_call_signature);
                      return resolveErrorCall(node);
                  }
                  return resolveCall(node, callSignatures, candidatesOutArray);
              }
              function getResolvedSignature(node, candidatesOutArray) {
                  var links = getNodeLinks(node);
                  if (!links.resolvedSignature || candidatesOutArray) {
                      links.resolvedSignature = anySignature;
                      if (node.kind === 158) {
                          links.resolvedSignature = resolveCallExpression(node, candidatesOutArray);
                      }
                      else if (node.kind === 159) {
                          links.resolvedSignature = resolveNewExpression(node, candidatesOutArray);
                      }
                      else if (node.kind === 160) {
                          links.resolvedSignature = resolveTaggedTemplateExpression(node, candidatesOutArray);
                      }
                      else {
                          ts.Debug.fail("Branch in 'getResolvedSignature' should be unreachable.");
                      }
                  }
                  return links.resolvedSignature;
              }
              function checkCallExpression(node) {
                  checkGrammarTypeArguments(node, node.typeArguments) || checkGrammarArguments(node, node.arguments);
                  var signature = getResolvedSignature(node);
                  if (node.expression.kind === 91) {
                      return voidType;
                  }
                  if (node.kind === 159) {
                      var declaration = signature.declaration;
                      if (declaration &&
                          declaration.kind !== 136 &&
                          declaration.kind !== 140 &&
                          declaration.kind !== 144) {
                          if (compilerOptions.noImplicitAny) {
                              error(node, ts.Diagnostics.new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type);
                          }
                          return anyType;
                      }
                  }
                  return getReturnTypeOfSignature(signature);
              }
              function checkTaggedTemplateExpression(node) {
                  return getReturnTypeOfSignature(getResolvedSignature(node));
              }
              function checkTypeAssertion(node) {
                  var exprType = checkExpression(node.expression);
                  var targetType = getTypeFromTypeNode(node.type);
                  if (produceDiagnostics && targetType !== unknownType) {
                      var widenedType = getWidenedType(exprType);
                      if (!(isTypeAssignableTo(targetType, widenedType))) {
                          checkTypeAssignableTo(exprType, targetType, node, ts.Diagnostics.Neither_type_0_nor_type_1_is_assignable_to_the_other);
                      }
                  }
                  return targetType;
              }
              function getTypeAtPosition(signature, pos) {
                  return signature.hasRestParameter ?
                      pos < signature.parameters.length - 1 ? getTypeOfSymbol(signature.parameters[pos]) : getRestTypeOfSignature(signature) :
                      pos < signature.parameters.length ? getTypeOfSymbol(signature.parameters[pos]) : anyType;
              }
              function assignContextualParameterTypes(signature, context, mapper) {
                  var len = signature.parameters.length - (signature.hasRestParameter ? 1 : 0);
                  for (var i = 0; i < len; i++) {
                      var parameter = signature.parameters[i];
                      var links = getSymbolLinks(parameter);
                      links.type = instantiateType(getTypeAtPosition(context, i), mapper);
                  }
                  if (signature.hasRestParameter && context.hasRestParameter && signature.parameters.length >= context.parameters.length) {
                      var parameter = ts.lastOrUndefined(signature.parameters);
                      var links = getSymbolLinks(parameter);
                      links.type = instantiateType(getTypeOfSymbol(ts.lastOrUndefined(context.parameters)), mapper);
                  }
              }
              function getReturnTypeFromBody(func, contextualMapper) {
                  var contextualSignature = getContextualSignatureForFunctionLikeDeclaration(func);
                  if (!func.body) {
                      return unknownType;
                  }
                  var type;
                  if (func.body.kind !== 180) {
                      type = checkExpressionCached(func.body, contextualMapper);
                  }
                  else {
                      var types = checkAndAggregateReturnExpressionTypes(func.body, contextualMapper);
                      if (types.length === 0) {
                          return voidType;
                      }
                      type = contextualSignature ? getUnionType(types) : getCommonSupertype(types);
                      if (!type) {
                          error(func, ts.Diagnostics.No_best_common_type_exists_among_return_expressions);
                          return unknownType;
                      }
                  }
                  if (!contextualSignature) {
                      reportErrorsFromWidening(func, type);
                  }
                  return getWidenedType(type);
              }
              function checkAndAggregateReturnExpressionTypes(body, contextualMapper) {
                  var aggregatedTypes = [];
                  ts.forEachReturnStatement(body, function (returnStatement) {
                      var expr = returnStatement.expression;
                      if (expr) {
                          var type = checkExpressionCached(expr, contextualMapper);
                          if (!ts.contains(aggregatedTypes, type)) {
                              aggregatedTypes.push(type);
                          }
                      }
                  });
                  return aggregatedTypes;
              }
              function bodyContainsAReturnStatement(funcBody) {
                  return ts.forEachReturnStatement(funcBody, function (returnStatement) {
                      return true;
                  });
              }
              function bodyContainsSingleThrowStatement(body) {
                  return (body.statements.length === 1) && (body.statements[0].kind === 196);
              }
              function checkIfNonVoidFunctionHasReturnExpressionsOrSingleThrowStatment(func, returnType) {
                  if (!produceDiagnostics) {
                      return;
                  }
                  if (returnType === voidType || returnType === anyType) {
                      return;
                  }
                  if (ts.nodeIsMissing(func.body) || func.body.kind !== 180) {
                      return;
                  }
                  var bodyBlock = func.body;
                  if (bodyContainsAReturnStatement(bodyBlock)) {
                      return;
                  }
                  if (bodyContainsSingleThrowStatement(bodyBlock)) {
                      return;
                  }
                  error(func.type, ts.Diagnostics.A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value_or_consist_of_a_single_throw_statement);
              }
              function checkFunctionExpressionOrObjectLiteralMethod(node, contextualMapper) {
                  ts.Debug.assert(node.kind !== 135 || ts.isObjectLiteralMethod(node));
                  var hasGrammarError = checkGrammarDeclarationNameInStrictMode(node) || checkGrammarFunctionLikeDeclaration(node);
                  if (!hasGrammarError && node.kind === 163) {
                      checkGrammarFunctionName(node.name) || checkGrammarForGenerator(node);
                  }
                  if (contextualMapper === identityMapper && isContextSensitive(node)) {
                      return anyFunctionType;
                  }
                  var links = getNodeLinks(node);
                  var type = getTypeOfSymbol(node.symbol);
                  if (!(links.flags & 64)) {
                      var contextualSignature = getContextualSignature(node);
                      if (!(links.flags & 64)) {
                          links.flags |= 64;
                          if (contextualSignature) {
                              var signature = getSignaturesOfType(type, 0)[0];
                              if (isContextSensitive(node)) {
                                  assignContextualParameterTypes(signature, contextualSignature, contextualMapper || identityMapper);
                              }
                              if (!node.type && !signature.resolvedReturnType) {
                                  var returnType = getReturnTypeFromBody(node, contextualMapper);
                                  if (!signature.resolvedReturnType) {
                                      signature.resolvedReturnType = returnType;
                                  }
                              }
                          }
                          checkSignatureDeclaration(node);
                      }
                  }
                  if (produceDiagnostics && node.kind !== 135 && node.kind !== 134) {
                      checkCollisionWithCapturedSuperVariable(node, node.name);
                      checkCollisionWithCapturedThisVariable(node, node.name);
                  }
                  return type;
              }
              function checkFunctionExpressionOrObjectLiteralMethodBody(node) {
                  ts.Debug.assert(node.kind !== 135 || ts.isObjectLiteralMethod(node));
                  if (node.type && !node.asteriskToken) {
                      checkIfNonVoidFunctionHasReturnExpressionsOrSingleThrowStatment(node, getTypeFromTypeNode(node.type));
                  }
                  if (node.body) {
                      if (node.body.kind === 180) {
                          checkSourceElement(node.body);
                      }
                      else {
                          var exprType = checkExpression(node.body);
                          if (node.type) {
                              checkTypeAssignableTo(exprType, getTypeFromTypeNode(node.type), node.body, undefined);
                          }
                          checkFunctionExpressionBodies(node.body);
                      }
                  }
              }
              function checkArithmeticOperandType(operand, type, diagnostic) {
                  if (!allConstituentTypesHaveKind(type, 1 | 132)) {
                      error(operand, diagnostic);
                      return false;
                  }
                  return true;
              }
              function checkReferenceExpression(n, invalidReferenceMessage, constantVariableMessage) {
                  function findSymbol(n) {
                      var symbol = getNodeLinks(n).resolvedSymbol;
                      return symbol && getExportSymbolOfValueSymbolIfExported(symbol);
                  }
                  function isReferenceOrErrorExpression(n) {
                      switch (n.kind) {
                          case 65: {
                              var symbol = findSymbol(n);
                              return !symbol || symbol === unknownSymbol || symbol === argumentsSymbol || (symbol.flags & 3) !== 0;
                          }
                          case 156: {
                              var symbol = findSymbol(n);
                              return !symbol || symbol === unknownSymbol || (symbol.flags & ~8) !== 0;
                          }
                          case 157:
                              return true;
                          case 162:
                              return isReferenceOrErrorExpression(n.expression);
                          default:
                              return false;
                      }
                  }
                  function isConstVariableReference(n) {
                      switch (n.kind) {
                          case 65:
                          case 156: {
                              var symbol = findSymbol(n);
                              return symbol && (symbol.flags & 3) !== 0 && (getDeclarationFlagsFromSymbol(symbol) & 8192) !== 0;
                          }
                          case 157: {
                              var index = n.argumentExpression;
                              var symbol = findSymbol(n.expression);
                              if (symbol && index && index.kind === 8) {
                                  var name_7 = index.text;
                                  var prop = getPropertyOfType(getTypeOfSymbol(symbol), name_7);
                                  return prop && (prop.flags & 3) !== 0 && (getDeclarationFlagsFromSymbol(prop) & 8192) !== 0;
                              }
                              return false;
                          }
                          case 162:
                              return isConstVariableReference(n.expression);
                          default:
                              return false;
                      }
                  }
                  if (!isReferenceOrErrorExpression(n)) {
                      error(n, invalidReferenceMessage);
                      return false;
                  }
                  if (isConstVariableReference(n)) {
                      error(n, constantVariableMessage);
                      return false;
                  }
                  return true;
              }
              function checkDeleteExpression(node) {
                  if (node.parserContextFlags & 1 && node.expression.kind === 65) {
                      grammarErrorOnNode(node.expression, ts.Diagnostics.delete_cannot_be_called_on_an_identifier_in_strict_mode);
                  }
                  var operandType = checkExpression(node.expression);
                  return booleanType;
              }
              function checkTypeOfExpression(node) {
                  var operandType = checkExpression(node.expression);
                  return stringType;
              }
              function checkVoidExpression(node) {
                  var operandType = checkExpression(node.expression);
                  return undefinedType;
              }
              function checkPrefixUnaryExpression(node) {
                  if ((node.operator === 38 || node.operator === 39)) {
                      checkGrammarEvalOrArgumentsInStrictMode(node, node.operand);
                  }
                  var operandType = checkExpression(node.operand);
                  switch (node.operator) {
                      case 33:
                      case 34:
                      case 47:
                          if (someConstituentTypeHasKind(operandType, 1048576)) {
                              error(node.operand, ts.Diagnostics.The_0_operator_cannot_be_applied_to_type_symbol, ts.tokenToString(node.operator));
                          }
                          return numberType;
                      case 46:
                          return booleanType;
                      case 38:
                      case 39:
                          var ok = checkArithmeticOperandType(node.operand, operandType, ts.Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type);
                          if (ok) {
                              checkReferenceExpression(node.operand, ts.Diagnostics.The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_property_or_indexer, ts.Diagnostics.The_operand_of_an_increment_or_decrement_operator_cannot_be_a_constant);
                          }
                          return numberType;
                  }
                  return unknownType;
              }
              function checkPostfixUnaryExpression(node) {
                  checkGrammarEvalOrArgumentsInStrictMode(node, node.operand);
                  var operandType = checkExpression(node.operand);
                  var ok = checkArithmeticOperandType(node.operand, operandType, ts.Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type);
                  if (ok) {
                      checkReferenceExpression(node.operand, ts.Diagnostics.The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_property_or_indexer, ts.Diagnostics.The_operand_of_an_increment_or_decrement_operator_cannot_be_a_constant);
                  }
                  return numberType;
              }
              function someConstituentTypeHasKind(type, kind) {
                  if (type.flags & kind) {
                      return true;
                  }
                  if (type.flags & 16384) {
                      var types = type.types;
                      for (var _i = 0; _i < types.length; _i++) {
                          var current = types[_i];
                          if (current.flags & kind) {
                              return true;
                          }
                      }
                      return false;
                  }
                  return false;
              }
              function allConstituentTypesHaveKind(type, kind) {
                  if (type.flags & kind) {
                      return true;
                  }
                  if (type.flags & 16384) {
                      var types = type.types;
                      for (var _i = 0; _i < types.length; _i++) {
                          var current = types[_i];
                          if (!(current.flags & kind)) {
                              return false;
                          }
                      }
                      return true;
                  }
                  return false;
              }
              function isConstEnumObjectType(type) {
                  return type.flags & (48128 | 32768) && type.symbol && isConstEnumSymbol(type.symbol);
              }
              function isConstEnumSymbol(symbol) {
                  return (symbol.flags & 128) !== 0;
              }
              function checkInstanceOfExpression(node, leftType, rightType) {
                  if (allConstituentTypesHaveKind(leftType, 1049086)) {
                      error(node.left, ts.Diagnostics.The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter);
                  }
                  if (!(rightType.flags & 1 || isTypeSubtypeOf(rightType, globalFunctionType))) {
                      error(node.right, ts.Diagnostics.The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type);
                  }
                  return booleanType;
              }
              function checkInExpression(node, leftType, rightType) {
                  if (!allConstituentTypesHaveKind(leftType, 1 | 258 | 132 | 1048576)) {
                      error(node.left, ts.Diagnostics.The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol);
                  }
                  if (!allConstituentTypesHaveKind(rightType, 1 | 48128 | 512)) {
                      error(node.right, ts.Diagnostics.The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter);
                  }
                  return booleanType;
              }
              function checkObjectLiteralAssignment(node, sourceType, contextualMapper) {
                  var properties = node.properties;
                  for (var _i = 0; _i < properties.length; _i++) {
                      var p = properties[_i];
                      if (p.kind === 225 || p.kind === 226) {
                          var name_8 = p.name;
                          var type = sourceType.flags & 1 ? sourceType :
                              getTypeOfPropertyOfType(sourceType, name_8.text) ||
                                  isNumericLiteralName(name_8.text) && getIndexTypeOfType(sourceType, 1) ||
                                  getIndexTypeOfType(sourceType, 0);
                          if (type) {
                              checkDestructuringAssignment(p.initializer || name_8, type);
                          }
                          else {
                              error(name_8, ts.Diagnostics.Type_0_has_no_property_1_and_no_string_index_signature, typeToString(sourceType), ts.declarationNameToString(name_8));
                          }
                      }
                      else {
                          error(p, ts.Diagnostics.Property_assignment_expected);
                      }
                  }
                  return sourceType;
              }
              function checkArrayLiteralAssignment(node, sourceType, contextualMapper) {
                  var elementType = checkIteratedTypeOrElementType(sourceType, node, false) || unknownType;
                  var elements = node.elements;
                  for (var i = 0; i < elements.length; i++) {
                      var e = elements[i];
                      if (e.kind !== 176) {
                          if (e.kind !== 174) {
                              var propName = "" + i;
                              var type = sourceType.flags & 1 ? sourceType :
                                  isTupleLikeType(sourceType)
                                      ? getTypeOfPropertyOfType(sourceType, propName)
                                      : elementType;
                              if (type) {
                                  checkDestructuringAssignment(e, type, contextualMapper);
                              }
                              else {
                                  if (isTupleType(sourceType)) {
                                      error(e, ts.Diagnostics.Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2, typeToString(sourceType), sourceType.elementTypes.length, elements.length);
                                  }
                                  else {
                                      error(e, ts.Diagnostics.Type_0_has_no_property_1, typeToString(sourceType), propName);
                                  }
                              }
                          }
                          else {
                              if (i < elements.length - 1) {
                                  error(e, ts.Diagnostics.A_rest_element_must_be_last_in_an_array_destructuring_pattern);
                              }
                              else {
                                  var restExpression = e.expression;
                                  if (restExpression.kind === 170 && restExpression.operatorToken.kind === 53) {
                                      error(restExpression.operatorToken, ts.Diagnostics.A_rest_element_cannot_have_an_initializer);
                                  }
                                  else {
                                      checkDestructuringAssignment(restExpression, createArrayType(elementType), contextualMapper);
                                  }
                              }
                          }
                      }
                  }
                  return sourceType;
              }
              function checkDestructuringAssignment(target, sourceType, contextualMapper) {
                  if (target.kind === 170 && target.operatorToken.kind === 53) {
                      checkBinaryExpression(target, contextualMapper);
                      target = target.left;
                  }
                  if (target.kind === 155) {
                      return checkObjectLiteralAssignment(target, sourceType, contextualMapper);
                  }
                  if (target.kind === 154) {
                      return checkArrayLiteralAssignment(target, sourceType, contextualMapper);
                  }
                  return checkReferenceAssignment(target, sourceType, contextualMapper);
              }
              function checkReferenceAssignment(target, sourceType, contextualMapper) {
                  var targetType = checkExpression(target, contextualMapper);
                  if (checkReferenceExpression(target, ts.Diagnostics.Invalid_left_hand_side_of_assignment_expression, ts.Diagnostics.Left_hand_side_of_assignment_expression_cannot_be_a_constant)) {
                      checkTypeAssignableTo(sourceType, targetType, target, undefined);
                  }
                  return sourceType;
              }
              function checkBinaryExpression(node, contextualMapper) {
                  if (ts.isLeftHandSideExpression(node.left) && ts.isAssignmentOperator(node.operatorToken.kind)) {
                      checkGrammarEvalOrArgumentsInStrictMode(node, node.left);
                  }
                  var operator = node.operatorToken.kind;
                  if (operator === 53 && (node.left.kind === 155 || node.left.kind === 154)) {
                      return checkDestructuringAssignment(node.left, checkExpression(node.right, contextualMapper), contextualMapper);
                  }
                  var leftType = checkExpression(node.left, contextualMapper);
                  var rightType = checkExpression(node.right, contextualMapper);
                  switch (operator) {
                      case 35:
                      case 56:
                      case 36:
                      case 57:
                      case 37:
                      case 58:
                      case 34:
                      case 55:
                      case 40:
                      case 59:
                      case 41:
                      case 60:
                      case 42:
                      case 61:
                      case 44:
                      case 63:
                      case 45:
                      case 64:
                      case 43:
                      case 62:
                          if (leftType.flags & (32 | 64))
                              leftType = rightType;
                          if (rightType.flags & (32 | 64))
                              rightType = leftType;
                          var suggestedOperator;
                          if ((leftType.flags & 8) &&
                              (rightType.flags & 8) &&
                              (suggestedOperator = getSuggestedBooleanOperator(node.operatorToken.kind)) !== undefined) {
                              error(node, ts.Diagnostics.The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead, ts.tokenToString(node.operatorToken.kind), ts.tokenToString(suggestedOperator));
                          }
                          else {
                              var leftOk = checkArithmeticOperandType(node.left, leftType, ts.Diagnostics.The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type);
                              var rightOk = checkArithmeticOperandType(node.right, rightType, ts.Diagnostics.The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type);
                              if (leftOk && rightOk) {
                                  checkAssignmentOperator(numberType);
                              }
                          }
                          return numberType;
                      case 33:
                      case 54:
                          if (leftType.flags & (32 | 64))
                              leftType = rightType;
                          if (rightType.flags & (32 | 64))
                              rightType = leftType;
                          var resultType;
                          if (allConstituentTypesHaveKind(leftType, 132) && allConstituentTypesHaveKind(rightType, 132)) {
                              resultType = numberType;
                          }
                          else {
                              if (allConstituentTypesHaveKind(leftType, 258) || allConstituentTypesHaveKind(rightType, 258)) {
                                  resultType = stringType;
                              }
                              else if (leftType.flags & 1 || rightType.flags & 1) {
                                  resultType = anyType;
                              }
                              if (resultType && !checkForDisallowedESSymbolOperand(operator)) {
                                  return resultType;
                              }
                          }
                          if (!resultType) {
                              reportOperatorError();
                              return anyType;
                          }
                          if (operator === 54) {
                              checkAssignmentOperator(resultType);
                          }
                          return resultType;
                      case 24:
                      case 25:
                      case 26:
                      case 27:
                          if (!checkForDisallowedESSymbolOperand(operator)) {
                              return booleanType;
                          }
                      case 28:
                      case 29:
                      case 30:
                      case 31:
                          if (!isTypeAssignableTo(leftType, rightType) && !isTypeAssignableTo(rightType, leftType)) {
                              reportOperatorError();
                          }
                          return booleanType;
                      case 87:
                          return checkInstanceOfExpression(node, leftType, rightType);
                      case 86:
                          return checkInExpression(node, leftType, rightType);
                      case 48:
                          return rightType;
                      case 49:
                          return getUnionType([leftType, rightType]);
                      case 53:
                          checkAssignmentOperator(rightType);
                          return rightType;
                      case 23:
                          return rightType;
                  }
                  function checkForDisallowedESSymbolOperand(operator) {
                      var offendingSymbolOperand = someConstituentTypeHasKind(leftType, 1048576) ? node.left :
                          someConstituentTypeHasKind(rightType, 1048576) ? node.right :
                              undefined;
                      if (offendingSymbolOperand) {
                          error(offendingSymbolOperand, ts.Diagnostics.The_0_operator_cannot_be_applied_to_type_symbol, ts.tokenToString(operator));
                          return false;
                      }
                      return true;
                  }
                  function getSuggestedBooleanOperator(operator) {
                      switch (operator) {
                          case 44:
                          case 63:
                              return 49;
                          case 45:
                          case 64:
                              return 31;
                          case 43:
                          case 62:
                              return 48;
                          default:
                              return undefined;
                      }
                  }
                  function checkAssignmentOperator(valueType) {
                      if (produceDiagnostics && operator >= 53 && operator <= 64) {
                          var ok = checkReferenceExpression(node.left, ts.Diagnostics.Invalid_left_hand_side_of_assignment_expression, ts.Diagnostics.Left_hand_side_of_assignment_expression_cannot_be_a_constant);
                          if (ok) {
                              checkTypeAssignableTo(valueType, leftType, node.left, undefined);
                          }
                      }
                  }
                  function reportOperatorError() {
                      error(node, ts.Diagnostics.Operator_0_cannot_be_applied_to_types_1_and_2, ts.tokenToString(node.operatorToken.kind), typeToString(leftType), typeToString(rightType));
                  }
              }
              function checkYieldExpression(node) {
                  if (!(node.parserContextFlags & 4)) {
                      grammarErrorOnFirstToken(node, ts.Diagnostics.yield_expression_must_be_contained_within_a_generator_declaration);
                  }
                  else {
                      grammarErrorOnFirstToken(node, ts.Diagnostics.yield_expressions_are_not_currently_supported);
                  }
              }
              function checkConditionalExpression(node, contextualMapper) {
                  checkExpression(node.condition);
                  var type1 = checkExpression(node.whenTrue, contextualMapper);
                  var type2 = checkExpression(node.whenFalse, contextualMapper);
                  return getUnionType([type1, type2]);
              }
              function checkTemplateExpression(node) {
                  ts.forEach(node.templateSpans, function (templateSpan) {
                      checkExpression(templateSpan.expression);
                  });
                  return stringType;
              }
              function checkExpressionWithContextualType(node, contextualType, contextualMapper) {
                  var saveContextualType = node.contextualType;
                  node.contextualType = contextualType;
                  var result = checkExpression(node, contextualMapper);
                  node.contextualType = saveContextualType;
                  return result;
              }
              function checkExpressionCached(node, contextualMapper) {
                  var links = getNodeLinks(node);
                  if (!links.resolvedType) {
                      links.resolvedType = checkExpression(node, contextualMapper);
                  }
                  return links.resolvedType;
              }
              function checkPropertyAssignment(node, contextualMapper) {
                  if (node.name.kind === 128) {
                      checkComputedPropertyName(node.name);
                  }
                  return checkExpression(node.initializer, contextualMapper);
              }
              function checkObjectLiteralMethod(node, contextualMapper) {
                  checkGrammarMethod(node);
                  if (node.name.kind === 128) {
                      checkComputedPropertyName(node.name);
                  }
                  var uninstantiatedType = checkFunctionExpressionOrObjectLiteralMethod(node, contextualMapper);
                  return instantiateTypeWithSingleGenericCallSignature(node, uninstantiatedType, contextualMapper);
              }
              function instantiateTypeWithSingleGenericCallSignature(node, type, contextualMapper) {
                  if (contextualMapper && contextualMapper !== identityMapper) {
                      var signature = getSingleCallSignature(type);
                      if (signature && signature.typeParameters) {
                          var contextualType = getContextualType(node);
                          if (contextualType) {
                              var contextualSignature = getSingleCallSignature(contextualType);
                              if (contextualSignature && !contextualSignature.typeParameters) {
                                  return getOrCreateTypeFromSignature(instantiateSignatureInContextOf(signature, contextualSignature, contextualMapper));
                              }
                          }
                      }
                  }
                  return type;
              }
              function checkExpression(node, contextualMapper) {
                  checkGrammarIdentifierInStrictMode(node);
                  return checkExpressionOrQualifiedName(node, contextualMapper);
              }
              function checkExpressionOrQualifiedName(node, contextualMapper) {
                  var type;
                  if (node.kind == 127) {
                      type = checkQualifiedName(node);
                  }
                  else {
                      var uninstantiatedType = checkExpressionWorker(node, contextualMapper);
                      type = instantiateTypeWithSingleGenericCallSignature(node, uninstantiatedType, contextualMapper);
                  }
                  if (isConstEnumObjectType(type)) {
                      var ok = (node.parent.kind === 156 && node.parent.expression === node) ||
                          (node.parent.kind === 157 && node.parent.expression === node) ||
                          ((node.kind === 65 || node.kind === 127) && isInRightSideOfImportOrExportAssignment(node));
                      if (!ok) {
                          error(node, ts.Diagnostics.const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment);
                      }
                  }
                  return type;
              }
              function checkNumericLiteral(node) {
                  checkGrammarNumericLiteral(node);
                  return numberType;
              }
              function checkExpressionWorker(node, contextualMapper) {
                  switch (node.kind) {
                      case 65:
                          return checkIdentifier(node);
                      case 93:
                          return checkThisExpression(node);
                      case 91:
                          return checkSuperExpression(node);
                      case 89:
                          return nullType;
                      case 95:
                      case 80:
                          return booleanType;
                      case 7:
                          return checkNumericLiteral(node);
                      case 172:
                          return checkTemplateExpression(node);
                      case 8:
                      case 10:
                          return stringType;
                      case 9:
                          return globalRegExpType;
                      case 154:
                          return checkArrayLiteral(node, contextualMapper);
                      case 155:
                          return checkObjectLiteral(node, contextualMapper);
                      case 156:
                          return checkPropertyAccessExpression(node);
                      case 157:
                          return checkIndexedAccess(node);
                      case 158:
                      case 159:
                          return checkCallExpression(node);
                      case 160:
                          return checkTaggedTemplateExpression(node);
                      case 161:
                          return checkTypeAssertion(node);
                      case 162:
                          return checkExpression(node.expression, contextualMapper);
                      case 175:
                          return checkClassExpression(node);
                      case 163:
                      case 164:
                          return checkFunctionExpressionOrObjectLiteralMethod(node, contextualMapper);
                      case 166:
                          return checkTypeOfExpression(node);
                      case 165:
                          return checkDeleteExpression(node);
                      case 167:
                          return checkVoidExpression(node);
                      case 168:
                          return checkPrefixUnaryExpression(node);
                      case 169:
                          return checkPostfixUnaryExpression(node);
                      case 170:
                          return checkBinaryExpression(node, contextualMapper);
                      case 171:
                          return checkConditionalExpression(node, contextualMapper);
                      case 174:
                          return checkSpreadElementExpression(node, contextualMapper);
                      case 176:
                          return undefinedType;
                      case 173:
                          checkYieldExpression(node);
                          return unknownType;
                  }
                  return unknownType;
              }
              function checkTypeParameter(node) {
                  checkGrammarDeclarationNameInStrictMode(node);
                  if (node.expression) {
                      grammarErrorOnFirstToken(node.expression, ts.Diagnostics.Type_expected);
                  }
                  checkSourceElement(node.constraint);
                  if (produceDiagnostics) {
                      checkTypeParameterHasIllegalReferencesInConstraint(node);
                      checkTypeNameIsReserved(node.name, ts.Diagnostics.Type_parameter_name_cannot_be_0);
                  }
              }
              function checkParameter(node) {
                  // Grammar checking
                  // It is a SyntaxError if the Identifier "eval" or the Identifier "arguments" occurs as the
                  // Identifier in a PropertySetParameterList of a PropertyAssignment that is contained in strict code
                  // or if its FunctionBody is strict code(11.1.5).
                  // It is a SyntaxError if the identifier eval or arguments appears within a FormalParameterList of a
                  // strict mode FunctionLikeDeclaration or FunctionExpression(13.1)
                  checkGrammarDecorators(node) || checkGrammarModifiers(node) || checkGrammarEvalOrArgumentsInStrictMode(node, node.name);
                  checkVariableLikeDeclaration(node);
                  var func = ts.getContainingFunction(node);
                  if (node.flags & 112) {
                      func = ts.getContainingFunction(node);
                      if (!(func.kind === 136 && ts.nodeIsPresent(func.body))) {
                          error(node, ts.Diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation);
                      }
                  }
                  if (node.questionToken && ts.isBindingPattern(node.name) && func.body) {
                      error(node, ts.Diagnostics.A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature);
                  }
                  if (node.dotDotDotToken && !ts.isBindingPattern(node.name) && !isArrayType(getTypeOfSymbol(node.symbol))) {
                      error(node, ts.Diagnostics.A_rest_parameter_must_be_of_an_array_type);
                  }
              }
              function checkSignatureDeclaration(node) {
                  if (node.kind === 141) {
                      checkGrammarIndexSignature(node);
                  }
                  else if (node.kind === 143 || node.kind === 201 || node.kind === 144 ||
                      node.kind === 139 || node.kind === 136 ||
                      node.kind === 140) {
                      checkGrammarFunctionLikeDeclaration(node);
                  }
                  checkTypeParameters(node.typeParameters);
                  ts.forEach(node.parameters, checkParameter);
                  if (node.type) {
                      checkSourceElement(node.type);
                  }
                  if (produceDiagnostics) {
                      checkCollisionWithArgumentsInGeneratedCode(node);
                      if (compilerOptions.noImplicitAny && !node.type) {
                          switch (node.kind) {
                              case 140:
                                  error(node, ts.Diagnostics.Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type);
                                  break;
                              case 139:
                                  error(node, ts.Diagnostics.Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type);
                                  break;
                          }
                      }
                  }
                  checkSpecializedSignatureDeclaration(node);
              }
              function checkTypeForDuplicateIndexSignatures(node) {
                  if (node.kind === 203) {
                      var nodeSymbol = getSymbolOfNode(node);
                      if (nodeSymbol.declarations.length > 0 && nodeSymbol.declarations[0] !== node) {
                          return;
                      }
                  }
                  var indexSymbol = getIndexSymbol(getSymbolOfNode(node));
                  if (indexSymbol) {
                      var seenNumericIndexer = false;
                      var seenStringIndexer = false;
                      for (var _i = 0, _a = indexSymbol.declarations; _i < _a.length; _i++) {
                          var decl = _a[_i];
                          var declaration = decl;
                          if (declaration.parameters.length === 1 && declaration.parameters[0].type) {
                              switch (declaration.parameters[0].type.kind) {
                                  case 122:
                                      if (!seenStringIndexer) {
                                          seenStringIndexer = true;
                                      }
                                      else {
                                          error(declaration, ts.Diagnostics.Duplicate_string_index_signature);
                                      }
                                      break;
                                  case 120:
                                      if (!seenNumericIndexer) {
                                          seenNumericIndexer = true;
                                      }
                                      else {
                                          error(declaration, ts.Diagnostics.Duplicate_number_index_signature);
                                      }
                                      break;
                              }
                          }
                      }
                  }
              }
              function checkPropertyDeclaration(node) {
                  checkGrammarDecorators(node) || checkGrammarModifiers(node) || checkGrammarProperty(node) || checkGrammarComputedPropertyName(node.name);
                  checkVariableLikeDeclaration(node);
              }
              function checkMethodDeclaration(node) {
                  checkGrammarMethod(node) || checkGrammarComputedPropertyName(node.name);
                  checkFunctionLikeDeclaration(node);
              }
              function checkConstructorDeclaration(node) {
                  checkSignatureDeclaration(node);
                  checkGrammarConstructorTypeParameters(node) || checkGrammarConstructorTypeAnnotation(node);
                  checkSourceElement(node.body);
                  var symbol = getSymbolOfNode(node);
                  var firstDeclaration = ts.getDeclarationOfKind(symbol, node.kind);
                  if (node === firstDeclaration) {
                      checkFunctionOrConstructorSymbol(symbol);
                  }
                  if (ts.nodeIsMissing(node.body)) {
                      return;
                  }
                  if (!produceDiagnostics) {
                      return;
                  }
                  function isSuperCallExpression(n) {
                      return n.kind === 158 && n.expression.kind === 91;
                  }
                  function containsSuperCall(n) {
                      if (isSuperCallExpression(n)) {
                          return true;
                      }
                      switch (n.kind) {
                          case 163:
                          case 201:
                          case 164:
                          case 155: return false;
                          default: return ts.forEachChild(n, containsSuperCall);
                      }
                  }
                  function markThisReferencesAsErrors(n) {
                      if (n.kind === 93) {
                          error(n, ts.Diagnostics.this_cannot_be_referenced_in_current_location);
                      }
                      else if (n.kind !== 163 && n.kind !== 201) {
                          ts.forEachChild(n, markThisReferencesAsErrors);
                      }
                  }
                  function isInstancePropertyWithInitializer(n) {
                      return n.kind === 133 &&
                          !(n.flags & 128) &&
                          !!n.initializer;
                  }
                  if (ts.getClassExtendsHeritageClauseElement(node.parent)) {
                      if (containsSuperCall(node.body)) {
                          var superCallShouldBeFirst = ts.forEach(node.parent.members, isInstancePropertyWithInitializer) ||
                              ts.forEach(node.parameters, function (p) { return p.flags & (16 | 32 | 64); });
                          if (superCallShouldBeFirst) {
                              var statements = node.body.statements;
                              if (!statements.length || statements[0].kind !== 183 || !isSuperCallExpression(statements[0].expression)) {
                                  error(node, ts.Diagnostics.A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_properties_or_has_parameter_properties);
                              }
                              else {
                                  markThisReferencesAsErrors(statements[0].expression);
                              }
                          }
                      }
                      else {
                          error(node, ts.Diagnostics.Constructors_for_derived_classes_must_contain_a_super_call);
                      }
                  }
              }
              function checkAccessorDeclaration(node) {
                  if (produceDiagnostics) {
                      checkGrammarFunctionLikeDeclaration(node) || checkGrammarAccessor(node) || checkGrammarComputedPropertyName(node.name);
                      if (node.kind === 137) {
                          if (!ts.isInAmbientContext(node) && ts.nodeIsPresent(node.body) && !(bodyContainsAReturnStatement(node.body) || bodyContainsSingleThrowStatement(node.body))) {
                              error(node.name, ts.Diagnostics.A_get_accessor_must_return_a_value_or_consist_of_a_single_throw_statement);
                          }
                      }
                      if (!ts.hasDynamicName(node)) {
                          var otherKind = node.kind === 137 ? 138 : 137;
                          var otherAccessor = ts.getDeclarationOfKind(node.symbol, otherKind);
                          if (otherAccessor) {
                              if (((node.flags & 112) !== (otherAccessor.flags & 112))) {
                                  error(node.name, ts.Diagnostics.Getter_and_setter_accessors_do_not_agree_in_visibility);
                              }
                              var currentAccessorType = getAnnotatedAccessorType(node);
                              var otherAccessorType = getAnnotatedAccessorType(otherAccessor);
                              if (currentAccessorType && otherAccessorType) {
                                  if (!isTypeIdenticalTo(currentAccessorType, otherAccessorType)) {
                                      error(node, ts.Diagnostics.get_and_set_accessor_must_have_the_same_type);
                                  }
                              }
                          }
                      }
                      getTypeOfAccessors(getSymbolOfNode(node));
                  }
                  checkFunctionLikeDeclaration(node);
              }
              function checkMissingDeclaration(node) {
                  checkDecorators(node);
              }
              function checkTypeReferenceNode(node) {
                  checkGrammarTypeReferenceInStrictMode(node.typeName);
                  return checkTypeReferenceOrExpressionWithTypeArguments(node);
              }
              function checkExpressionWithTypeArguments(node) {
                  checkGrammarExpressionWithTypeArgumentsInStrictMode(node.expression);
                  return checkTypeReferenceOrExpressionWithTypeArguments(node);
              }
              function checkTypeReferenceOrExpressionWithTypeArguments(node) {
                  checkGrammarTypeArguments(node, node.typeArguments);
                  var type = getTypeFromTypeReferenceOrExpressionWithTypeArguments(node);
                  if (type !== unknownType && node.typeArguments) {
                      var len = node.typeArguments.length;
                      for (var i = 0; i < len; i++) {
                          checkSourceElement(node.typeArguments[i]);
                          var constraint = getConstraintOfTypeParameter(type.target.typeParameters[i]);
                          if (produceDiagnostics && constraint) {
                              var typeArgument = type.typeArguments[i];
                              checkTypeAssignableTo(typeArgument, constraint, node, ts.Diagnostics.Type_0_does_not_satisfy_the_constraint_1);
                          }
                      }
                  }
              }
              function checkTypeQuery(node) {
                  getTypeFromTypeQueryNode(node);
              }
              function checkTypeLiteral(node) {
                  ts.forEach(node.members, checkSourceElement);
                  if (produceDiagnostics) {
                      var type = getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node);
                      checkIndexConstraints(type);
                      checkTypeForDuplicateIndexSignatures(node);
                  }
              }
              function checkArrayType(node) {
                  checkSourceElement(node.elementType);
              }
              function checkTupleType(node) {
                  var hasErrorFromDisallowedTrailingComma = checkGrammarForDisallowedTrailingComma(node.elementTypes);
                  if (!hasErrorFromDisallowedTrailingComma && node.elementTypes.length === 0) {
                      grammarErrorOnNode(node, ts.Diagnostics.A_tuple_type_element_list_cannot_be_empty);
                  }
                  ts.forEach(node.elementTypes, checkSourceElement);
              }
              function checkUnionType(node) {
                  ts.forEach(node.types, checkSourceElement);
              }
              function isPrivateWithinAmbient(node) {
                  return (node.flags & 32) && ts.isInAmbientContext(node);
              }
              function checkSpecializedSignatureDeclaration(signatureDeclarationNode) {
                  if (!produceDiagnostics) {
                      return;
                  }
                  var signature = getSignatureFromDeclaration(signatureDeclarationNode);
                  if (!signature.hasStringLiterals) {
                      return;
                  }
                  if (ts.nodeIsPresent(signatureDeclarationNode.body)) {
                      error(signatureDeclarationNode, ts.Diagnostics.A_signature_with_an_implementation_cannot_use_a_string_literal_type);
                      return;
                  }
                  var signaturesToCheck;
                  if (!signatureDeclarationNode.name && signatureDeclarationNode.parent && signatureDeclarationNode.parent.kind === 203) {
                      ts.Debug.assert(signatureDeclarationNode.kind === 139 || signatureDeclarationNode.kind === 140);
                      var signatureKind = signatureDeclarationNode.kind === 139 ? 0 : 1;
                      var containingSymbol = getSymbolOfNode(signatureDeclarationNode.parent);
                      var containingType = getDeclaredTypeOfSymbol(containingSymbol);
                      signaturesToCheck = getSignaturesOfType(containingType, signatureKind);
                  }
                  else {
                      signaturesToCheck = getSignaturesOfSymbol(getSymbolOfNode(signatureDeclarationNode));
                  }
                  for (var _i = 0; _i < signaturesToCheck.length; _i++) {
                      var otherSignature = signaturesToCheck[_i];
                      if (!otherSignature.hasStringLiterals && isSignatureAssignableTo(signature, otherSignature)) {
                          return;
                      }
                  }
                  error(signatureDeclarationNode, ts.Diagnostics.Specialized_overload_signature_is_not_assignable_to_any_non_specialized_signature);
              }
              function getEffectiveDeclarationFlags(n, flagsToCheck) {
                  var flags = ts.getCombinedNodeFlags(n);
                  if (n.parent.kind !== 203 && ts.isInAmbientContext(n)) {
                      if (!(flags & 2)) {
                          flags |= 1;
                      }
                      flags |= 2;
                  }
                  return flags & flagsToCheck;
              }
              function checkFunctionOrConstructorSymbol(symbol) {
                  if (!produceDiagnostics) {
                      return;
                  }
                  function getCanonicalOverload(overloads, implementation) {
                      var implementationSharesContainerWithFirstOverload = implementation !== undefined && implementation.parent === overloads[0].parent;
                      return implementationSharesContainerWithFirstOverload ? implementation : overloads[0];
                  }
                  function checkFlagAgreementBetweenOverloads(overloads, implementation, flagsToCheck, someOverloadFlags, allOverloadFlags) {
                      var someButNotAllOverloadFlags = someOverloadFlags ^ allOverloadFlags;
                      if (someButNotAllOverloadFlags !== 0) {
                          var canonicalFlags = getEffectiveDeclarationFlags(getCanonicalOverload(overloads, implementation), flagsToCheck);
                          ts.forEach(overloads, function (o) {
                              var deviation = getEffectiveDeclarationFlags(o, flagsToCheck) ^ canonicalFlags;
                              if (deviation & 1) {
                                  error(o.name, ts.Diagnostics.Overload_signatures_must_all_be_exported_or_not_exported);
                              }
                              else if (deviation & 2) {
                                  error(o.name, ts.Diagnostics.Overload_signatures_must_all_be_ambient_or_non_ambient);
                              }
                              else if (deviation & (32 | 64)) {
                                  error(o.name, ts.Diagnostics.Overload_signatures_must_all_be_public_private_or_protected);
                              }
                          });
                      }
                  }
                  function checkQuestionTokenAgreementBetweenOverloads(overloads, implementation, someHaveQuestionToken, allHaveQuestionToken) {
                      if (someHaveQuestionToken !== allHaveQuestionToken) {
                          var canonicalHasQuestionToken = ts.hasQuestionToken(getCanonicalOverload(overloads, implementation));
                          ts.forEach(overloads, function (o) {
                              var deviation = ts.hasQuestionToken(o) !== canonicalHasQuestionToken;
                              if (deviation) {
                                  error(o.name, ts.Diagnostics.Overload_signatures_must_all_be_optional_or_required);
                              }
                          });
                      }
                  }
                  var flagsToCheck = 1 | 2 | 32 | 64;
                  var someNodeFlags = 0;
                  var allNodeFlags = flagsToCheck;
                  var someHaveQuestionToken = false;
                  var allHaveQuestionToken = true;
                  var hasOverloads = false;
                  var bodyDeclaration;
                  var lastSeenNonAmbientDeclaration;
                  var previousDeclaration;
                  var declarations = symbol.declarations;
                  var isConstructor = (symbol.flags & 16384) !== 0;
                  function reportImplementationExpectedError(node) {
                      if (node.name && ts.nodeIsMissing(node.name)) {
                          return;
                      }
                      var seen = false;
                      var subsequentNode = ts.forEachChild(node.parent, function (c) {
                          if (seen) {
                              return c;
                          }
                          else {
                              seen = c === node;
                          }
                      });
                      if (subsequentNode) {
                          if (subsequentNode.kind === node.kind) {
                              var errorNode_1 = subsequentNode.name || subsequentNode;
                              if (node.name && subsequentNode.name && node.name.text === subsequentNode.name.text) {
                                  ts.Debug.assert(node.kind === 135 || node.kind === 134);
                                  ts.Debug.assert((node.flags & 128) !== (subsequentNode.flags & 128));
                                  var diagnostic = node.flags & 128 ? ts.Diagnostics.Function_overload_must_be_static : ts.Diagnostics.Function_overload_must_not_be_static;
                                  error(errorNode_1, diagnostic);
                                  return;
                              }
                              else if (ts.nodeIsPresent(subsequentNode.body)) {
                                  error(errorNode_1, ts.Diagnostics.Function_implementation_name_must_be_0, ts.declarationNameToString(node.name));
                                  return;
                              }
                          }
                      }
                      var errorNode = node.name || node;
                      if (isConstructor) {
                          error(errorNode, ts.Diagnostics.Constructor_implementation_is_missing);
                      }
                      else {
                          error(errorNode, ts.Diagnostics.Function_implementation_is_missing_or_not_immediately_following_the_declaration);
                      }
                  }
                  var isExportSymbolInsideModule = symbol.parent && symbol.parent.flags & 1536;
                  var duplicateFunctionDeclaration = false;
                  var multipleConstructorImplementation = false;
                  for (var _i = 0; _i < declarations.length; _i++) {
                      var current = declarations[_i];
                      var node = current;
                      var inAmbientContext = ts.isInAmbientContext(node);
                      var inAmbientContextOrInterface = node.parent.kind === 203 || node.parent.kind === 146 || inAmbientContext;
                      if (inAmbientContextOrInterface) {
                          previousDeclaration = undefined;
                      }
                      if (node.kind === 201 || node.kind === 135 || node.kind === 134 || node.kind === 136) {
                          var currentNodeFlags = getEffectiveDeclarationFlags(node, flagsToCheck);
                          someNodeFlags |= currentNodeFlags;
                          allNodeFlags &= currentNodeFlags;
                          someHaveQuestionToken = someHaveQuestionToken || ts.hasQuestionToken(node);
                          allHaveQuestionToken = allHaveQuestionToken && ts.hasQuestionToken(node);
                          if (ts.nodeIsPresent(node.body) && bodyDeclaration) {
                              if (isConstructor) {
                                  multipleConstructorImplementation = true;
                              }
                              else {
                                  duplicateFunctionDeclaration = true;
                              }
                          }
                          else if (!isExportSymbolInsideModule && previousDeclaration && previousDeclaration.parent === node.parent && previousDeclaration.end !== node.pos) {
                              reportImplementationExpectedError(previousDeclaration);
                          }
                          if (ts.nodeIsPresent(node.body)) {
                              if (!bodyDeclaration) {
                                  bodyDeclaration = node;
                              }
                          }
                          else {
                              hasOverloads = true;
                          }
                          previousDeclaration = node;
                          if (!inAmbientContextOrInterface) {
                              lastSeenNonAmbientDeclaration = node;
                          }
                      }
                  }
                  if (multipleConstructorImplementation) {
                      ts.forEach(declarations, function (declaration) {
                          error(declaration, ts.Diagnostics.Multiple_constructor_implementations_are_not_allowed);
                      });
                  }
                  if (duplicateFunctionDeclaration) {
                      ts.forEach(declarations, function (declaration) {
                          error(declaration.name, ts.Diagnostics.Duplicate_function_implementation);
                      });
                  }
                  if (!isExportSymbolInsideModule && lastSeenNonAmbientDeclaration && !lastSeenNonAmbientDeclaration.body) {
                      reportImplementationExpectedError(lastSeenNonAmbientDeclaration);
                  }
                  if (hasOverloads) {
                      checkFlagAgreementBetweenOverloads(declarations, bodyDeclaration, flagsToCheck, someNodeFlags, allNodeFlags);
                      checkQuestionTokenAgreementBetweenOverloads(declarations, bodyDeclaration, someHaveQuestionToken, allHaveQuestionToken);
                      if (bodyDeclaration) {
                          var signatures = getSignaturesOfSymbol(symbol);
                          var bodySignature = getSignatureFromDeclaration(bodyDeclaration);
                          if (!bodySignature.hasStringLiterals) {
                              for (var _a = 0; _a < signatures.length; _a++) {
                                  var signature = signatures[_a];
                                  if (!signature.hasStringLiterals && !isSignatureAssignableTo(bodySignature, signature)) {
                                      error(signature.declaration, ts.Diagnostics.Overload_signature_is_not_compatible_with_function_implementation);
                                      break;
                                  }
                              }
                          }
                      }
                  }
              }
              function checkExportsOnMergedDeclarations(node) {
                  if (!produceDiagnostics) {
                      return;
                  }
                  var symbol = node.localSymbol;
                  if (!symbol) {
                      symbol = getSymbolOfNode(node);
                      if (!(symbol.flags & 7340032)) {
                          return;
                      }
                  }
                  if (ts.getDeclarationOfKind(symbol, node.kind) !== node) {
                      return;
                  }
                  var exportedDeclarationSpaces = 0;
                  var nonExportedDeclarationSpaces = 0;
                  ts.forEach(symbol.declarations, function (d) {
                      var declarationSpaces = getDeclarationSpaces(d);
                      if (getEffectiveDeclarationFlags(d, 1)) {
                          exportedDeclarationSpaces |= declarationSpaces;
                      }
                      else {
                          nonExportedDeclarationSpaces |= declarationSpaces;
                      }
                  });
                  var commonDeclarationSpace = exportedDeclarationSpaces & nonExportedDeclarationSpaces;
                  if (commonDeclarationSpace) {
                      ts.forEach(symbol.declarations, function (d) {
                          if (getDeclarationSpaces(d) & commonDeclarationSpace) {
                              error(d.name, ts.Diagnostics.Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local, ts.declarationNameToString(d.name));
                          }
                      });
                  }
                  function getDeclarationSpaces(d) {
                      switch (d.kind) {
                          case 203:
                              return 2097152;
                          case 206:
                              return d.name.kind === 8 || ts.getModuleInstanceState(d) !== 0
                                  ? 4194304 | 1048576
                                  : 4194304;
                          case 202:
                          case 205:
                              return 2097152 | 1048576;
                          case 209:
                              var result = 0;
                              var target = resolveAlias(getSymbolOfNode(d));
                              ts.forEach(target.declarations, function (d) { result |= getDeclarationSpaces(d); });
                              return result;
                          default:
                              return 1048576;
                      }
                  }
              }
              function checkDecorator(node) {
                  var expression = node.expression;
                  var exprType = checkExpression(expression);
                  switch (node.parent.kind) {
                      case 202:
                          var classSymbol = getSymbolOfNode(node.parent);
                          var classConstructorType = getTypeOfSymbol(classSymbol);
                          var classDecoratorType = instantiateSingleCallFunctionType(getGlobalClassDecoratorType(), [classConstructorType]);
                          checkTypeAssignableTo(exprType, classDecoratorType, node);
                          break;
                      case 133:
                          checkTypeAssignableTo(exprType, getGlobalPropertyDecoratorType(), node);
                          break;
                      case 135:
                      case 137:
                      case 138:
                          var methodType = getTypeOfNode(node.parent);
                          var methodDecoratorType = instantiateSingleCallFunctionType(getGlobalMethodDecoratorType(), [methodType]);
                          checkTypeAssignableTo(exprType, methodDecoratorType, node);
                          break;
                      case 130:
                          checkTypeAssignableTo(exprType, getGlobalParameterDecoratorType(), node);
                          break;
                  }
              }
              function checkTypeNodeAsExpression(node) {
                  if (node && node.kind === 142) {
                      var type = getTypeFromTypeNode(node);
                      var shouldCheckIfUnknownType = type === unknownType && compilerOptions.separateCompilation;
                      if (!type || (!shouldCheckIfUnknownType && type.flags & (1048703 | 132 | 258))) {
                          return;
                      }
                      if (shouldCheckIfUnknownType || type.symbol.valueDeclaration) {
                          checkExpressionOrQualifiedName(node.typeName);
                      }
                  }
              }
              function checkTypeAnnotationAsExpression(node) {
                  switch (node.kind) {
                      case 133:
                          checkTypeNodeAsExpression(node.type);
                          break;
                      case 130:
                          checkTypeNodeAsExpression(node.type);
                          break;
                      case 135:
                          checkTypeNodeAsExpression(node.type);
                          break;
                      case 137:
                          checkTypeNodeAsExpression(node.type);
                          break;
                      case 138:
                          checkTypeNodeAsExpression(getSetAccessorTypeAnnotationNode(node));
                          break;
                  }
              }
              function checkParameterTypeAnnotationsAsExpressions(node) {
                  for (var _i = 0, _a = node.parameters; _i < _a.length; _i++) {
                      var parameter = _a[_i];
                      checkTypeAnnotationAsExpression(parameter);
                  }
              }
              function checkDecorators(node) {
                  if (!node.decorators) {
                      return;
                  }
                  if (!ts.nodeCanBeDecorated(node)) {
                      return;
                  }
                  if (compilerOptions.emitDecoratorMetadata) {
                      switch (node.kind) {
                          case 202:
                              var constructor = ts.getFirstConstructorWithBody(node);
                              if (constructor) {
                                  checkParameterTypeAnnotationsAsExpressions(constructor);
                              }
                              break;
                          case 135:
                              checkParameterTypeAnnotationsAsExpressions(node);
                          case 138:
                          case 137:
                          case 133:
                          case 130:
                              checkTypeAnnotationAsExpression(node);
                              break;
                      }
                  }
                  emitDecorate = true;
                  if (node.kind === 130) {
                      emitParam = true;
                  }
                  ts.forEach(node.decorators, checkDecorator);
              }
              function checkFunctionDeclaration(node) {
                  if (produceDiagnostics) {
                      checkFunctionLikeDeclaration(node) ||
                          checkGrammarDisallowedModifiersInBlockOrObjectLiteralExpression(node) ||
                          checkGrammarFunctionName(node.name) ||
                          checkGrammarForGenerator(node);
                      checkCollisionWithCapturedSuperVariable(node, node.name);
                      checkCollisionWithCapturedThisVariable(node, node.name);
                      checkCollisionWithRequireExportsInGeneratedCode(node, node.name);
                  }
              }
              function checkFunctionLikeDeclaration(node) {
                  checkGrammarDeclarationNameInStrictMode(node);
                  checkDecorators(node);
                  checkSignatureDeclaration(node);
                  if (node.name && node.name.kind === 128) {
                      checkComputedPropertyName(node.name);
                  }
                  if (!ts.hasDynamicName(node)) {
                      var symbol = getSymbolOfNode(node);
                      var localSymbol = node.localSymbol || symbol;
                      var firstDeclaration = ts.getDeclarationOfKind(localSymbol, node.kind);
                      if (node === firstDeclaration) {
                          checkFunctionOrConstructorSymbol(localSymbol);
                      }
                      if (symbol.parent) {
                          if (ts.getDeclarationOfKind(symbol, node.kind) === node) {
                              checkFunctionOrConstructorSymbol(symbol);
                          }
                      }
                  }
                  checkSourceElement(node.body);
                  if (node.type && !isAccessor(node.kind) && !node.asteriskToken) {
                      checkIfNonVoidFunctionHasReturnExpressionsOrSingleThrowStatment(node, getTypeFromTypeNode(node.type));
                  }
                  if (compilerOptions.noImplicitAny && ts.nodeIsMissing(node.body) && !node.type && !isPrivateWithinAmbient(node)) {
                      reportImplicitAnyError(node, anyType);
                  }
              }
              function checkBlock(node) {
                  if (node.kind === 180) {
                      checkGrammarStatementInAmbientContext(node);
                  }
                  ts.forEach(node.statements, checkSourceElement);
                  if (ts.isFunctionBlock(node) || node.kind === 207) {
                      checkFunctionExpressionBodies(node);
                  }
              }
              function checkCollisionWithArgumentsInGeneratedCode(node) {
                  if (!ts.hasRestParameters(node) || ts.isInAmbientContext(node) || ts.nodeIsMissing(node.body)) {
                      return;
                  }
                  ts.forEach(node.parameters, function (p) {
                      if (p.name && !ts.isBindingPattern(p.name) && p.name.text === argumentsSymbol.name) {
                          error(p, ts.Diagnostics.Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters);
                      }
                  });
              }
              function needCollisionCheckForIdentifier(node, identifier, name) {
                  if (!(identifier && identifier.text === name)) {
                      return false;
                  }
                  if (node.kind === 133 ||
                      node.kind === 132 ||
                      node.kind === 135 ||
                      node.kind === 134 ||
                      node.kind === 137 ||
                      node.kind === 138) {
                      return false;
                  }
                  if (ts.isInAmbientContext(node)) {
                      return false;
                  }
                  var root = ts.getRootDeclaration(node);
                  if (root.kind === 130 && ts.nodeIsMissing(root.parent.body)) {
                      return false;
                  }
                  return true;
              }
              function checkCollisionWithCapturedThisVariable(node, name) {
                  if (needCollisionCheckForIdentifier(node, name, "_this")) {
                      potentialThisCollisions.push(node);
                  }
              }
              function checkIfThisIsCapturedInEnclosingScope(node) {
                  var current = node;
                  while (current) {
                      if (getNodeCheckFlags(current) & 4) {
                          var isDeclaration_1 = node.kind !== 65;
                          if (isDeclaration_1) {
                              error(node.name, ts.Diagnostics.Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference);
                          }
                          else {
                              error(node, ts.Diagnostics.Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference);
                          }
                          return;
                      }
                      current = current.parent;
                  }
              }
              function checkCollisionWithCapturedSuperVariable(node, name) {
                  if (!needCollisionCheckForIdentifier(node, name, "_super")) {
                      return;
                  }
                  var enclosingClass = ts.getAncestor(node, 202);
                  if (!enclosingClass || ts.isInAmbientContext(enclosingClass)) {
                      return;
                  }
                  if (ts.getClassExtendsHeritageClauseElement(enclosingClass)) {
                      var isDeclaration_2 = node.kind !== 65;
                      if (isDeclaration_2) {
                          error(node, ts.Diagnostics.Duplicate_identifier_super_Compiler_uses_super_to_capture_base_class_reference);
                      }
                      else {
                          error(node, ts.Diagnostics.Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference);
                      }
                  }
              }
              function checkCollisionWithRequireExportsInGeneratedCode(node, name) {
                  if (!needCollisionCheckForIdentifier(node, name, "require") && !needCollisionCheckForIdentifier(node, name, "exports")) {
                      return;
                  }
                  if (node.kind === 206 && ts.getModuleInstanceState(node) !== 1) {
                      return;
                  }
                  var parent = getDeclarationContainer(node);
                  if (parent.kind === 228 && ts.isExternalModule(parent)) {
                      error(name, ts.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module, ts.declarationNameToString(name), ts.declarationNameToString(name));
                  }
              }
              function checkVarDeclaredNamesNotShadowed(node) {
                  // - ScriptBody : StatementList
                  // It is a Syntax Error if any element of the LexicallyDeclaredNames of StatementList
                  // also occurs in the VarDeclaredNames of StatementList.
                  if ((ts.getCombinedNodeFlags(node) & 12288) !== 0 || ts.isParameterDeclaration(node)) {
                      return;
                  }
                  if (node.kind === 199 && !node.initializer) {
                      return;
                  }
                  var symbol = getSymbolOfNode(node);
                  if (symbol.flags & 1) {
                      var localDeclarationSymbol = resolveName(node, node.name.text, 3, undefined, undefined);
                      if (localDeclarationSymbol &&
                          localDeclarationSymbol !== symbol &&
                          localDeclarationSymbol.flags & 2) {
                          if (getDeclarationFlagsFromSymbol(localDeclarationSymbol) & 12288) {
                              var varDeclList = ts.getAncestor(localDeclarationSymbol.valueDeclaration, 200);
                              var container = varDeclList.parent.kind === 181 && varDeclList.parent.parent
                                  ? varDeclList.parent.parent
                                  : undefined;
                              var namesShareScope = container &&
                                  (container.kind === 180 && ts.isFunctionLike(container.parent) ||
                                      container.kind === 207 ||
                                      container.kind === 206 ||
                                      container.kind === 228);
                              if (!namesShareScope) {
                                  var name_9 = symbolToString(localDeclarationSymbol);
                                  error(node, ts.Diagnostics.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1, name_9, name_9);
                              }
                          }
                      }
                  }
              }
              function checkParameterInitializer(node) {
                  if (ts.getRootDeclaration(node).kind !== 130) {
                      return;
                  }
                  var func = ts.getContainingFunction(node);
                  visit(node.initializer);
                  function visit(n) {
                      if (n.kind === 65) {
                          var referencedSymbol = getNodeLinks(n).resolvedSymbol;
                          if (referencedSymbol && referencedSymbol !== unknownSymbol && getSymbol(func.locals, referencedSymbol.name, 107455) === referencedSymbol) {
                              if (referencedSymbol.valueDeclaration.kind === 130) {
                                  if (referencedSymbol.valueDeclaration === node) {
                                      error(n, ts.Diagnostics.Parameter_0_cannot_be_referenced_in_its_initializer, ts.declarationNameToString(node.name));
                                      return;
                                  }
                                  if (referencedSymbol.valueDeclaration.pos < node.pos) {
                                      return;
                                  }
                              }
                              error(n, ts.Diagnostics.Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it, ts.declarationNameToString(node.name), ts.declarationNameToString(n));
                          }
                      }
                      else {
                          ts.forEachChild(n, visit);
                      }
                  }
              }
              function checkVariableLikeDeclaration(node) {
                  checkGrammarDeclarationNameInStrictMode(node);
                  checkDecorators(node);
                  checkSourceElement(node.type);
                  if (node.name.kind === 128) {
                      checkComputedPropertyName(node.name);
                      if (node.initializer) {
                          checkExpressionCached(node.initializer);
                      }
                  }
                  if (ts.isBindingPattern(node.name)) {
                      ts.forEach(node.name.elements, checkSourceElement);
                  }
                  if (node.initializer && ts.getRootDeclaration(node).kind === 130 && ts.nodeIsMissing(ts.getContainingFunction(node).body)) {
                      error(node, ts.Diagnostics.A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation);
                      return;
                  }
                  if (ts.isBindingPattern(node.name)) {
                      if (node.initializer) {
                          checkTypeAssignableTo(checkExpressionCached(node.initializer), getWidenedTypeForVariableLikeDeclaration(node), node, undefined);
                          checkParameterInitializer(node);
                      }
                      return;
                  }
                  var symbol = getSymbolOfNode(node);
                  var type = getTypeOfVariableOrParameterOrProperty(symbol);
                  if (node === symbol.valueDeclaration) {
                      if (node.initializer) {
                          checkTypeAssignableTo(checkExpressionCached(node.initializer), type, node, undefined);
                          checkParameterInitializer(node);
                      }
                  }
                  else {
                      var declarationType = getWidenedTypeForVariableLikeDeclaration(node);
                      if (type !== unknownType && declarationType !== unknownType && !isTypeIdenticalTo(type, declarationType)) {
                          error(node.name, ts.Diagnostics.Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2, ts.declarationNameToString(node.name), typeToString(type), typeToString(declarationType));
                      }
                      if (node.initializer) {
                          checkTypeAssignableTo(checkExpressionCached(node.initializer), declarationType, node, undefined);
                      }
                  }
                  if (node.kind !== 133 && node.kind !== 132) {
                      checkExportsOnMergedDeclarations(node);
                      if (node.kind === 199 || node.kind === 153) {
                          checkVarDeclaredNamesNotShadowed(node);
                      }
                      checkCollisionWithCapturedSuperVariable(node, node.name);
                      checkCollisionWithCapturedThisVariable(node, node.name);
                      checkCollisionWithRequireExportsInGeneratedCode(node, node.name);
                  }
              }
              function checkVariableDeclaration(node) {
                  checkGrammarVariableDeclaration(node);
                  return checkVariableLikeDeclaration(node);
              }
              function checkBindingElement(node) {
                  checkGrammarBindingElement(node);
                  return checkVariableLikeDeclaration(node);
              }
              function checkVariableStatement(node) {
                  checkGrammarDecorators(node) || checkGrammarDisallowedModifiersInBlockOrObjectLiteralExpression(node) || checkGrammarModifiers(node) || checkGrammarVariableDeclarationList(node.declarationList) || checkGrammarForDisallowedLetOrConstStatement(node);
                  ts.forEach(node.declarationList.declarations, checkSourceElement);
              }
              function checkGrammarDisallowedModifiersInBlockOrObjectLiteralExpression(node) {
                  if (node.modifiers) {
                      if (inBlockOrObjectLiteralExpression(node)) {
                          return grammarErrorOnFirstToken(node, ts.Diagnostics.Modifiers_cannot_appear_here);
                      }
                  }
              }
              function inBlockOrObjectLiteralExpression(node) {
                  while (node) {
                      if (node.kind === 180 || node.kind === 155) {
                          return true;
                      }
                      node = node.parent;
                  }
              }
              function checkExpressionStatement(node) {
                  checkGrammarStatementInAmbientContext(node);
                  checkExpression(node.expression);
              }
              function checkIfStatement(node) {
                  checkGrammarStatementInAmbientContext(node);
                  checkExpression(node.expression);
                  checkSourceElement(node.thenStatement);
                  checkSourceElement(node.elseStatement);
              }
              function checkDoStatement(node) {
                  checkGrammarStatementInAmbientContext(node);
                  checkSourceElement(node.statement);
                  checkExpression(node.expression);
              }
              function checkWhileStatement(node) {
                  checkGrammarStatementInAmbientContext(node);
                  checkExpression(node.expression);
                  checkSourceElement(node.statement);
              }
              function checkForStatement(node) {
                  if (!checkGrammarStatementInAmbientContext(node)) {
                      if (node.initializer && node.initializer.kind == 200) {
                          checkGrammarVariableDeclarationList(node.initializer);
                      }
                  }
                  if (node.initializer) {
                      if (node.initializer.kind === 200) {
                          ts.forEach(node.initializer.declarations, checkVariableDeclaration);
                      }
                      else {
                          checkExpression(node.initializer);
                      }
                  }
                  if (node.condition)
                      checkExpression(node.condition);
                  if (node.incrementor)
                      checkExpression(node.incrementor);
                  checkSourceElement(node.statement);
              }
              function checkForOfStatement(node) {
                  checkGrammarForInOrForOfStatement(node);
                  if (node.initializer.kind === 200) {
                      checkForInOrForOfVariableDeclaration(node);
                  }
                  else {
                      var varExpr = node.initializer;
                      var iteratedType = checkRightHandSideOfForOf(node.expression);
                      if (varExpr.kind === 154 || varExpr.kind === 155) {
                          checkDestructuringAssignment(varExpr, iteratedType || unknownType);
                      }
                      else {
                          var leftType = checkExpression(varExpr);
                          checkReferenceExpression(varExpr, ts.Diagnostics.Invalid_left_hand_side_in_for_of_statement, ts.Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_be_a_previously_defined_constant);
                          if (iteratedType) {
                              checkTypeAssignableTo(iteratedType, leftType, varExpr, undefined);
                          }
                      }
                  }
                  checkSourceElement(node.statement);
              }
              function checkForInStatement(node) {
                  checkGrammarForInOrForOfStatement(node);
                  if (node.initializer.kind === 200) {
                      var variable = node.initializer.declarations[0];
                      if (variable && ts.isBindingPattern(variable.name)) {
                          error(variable.name, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern);
                      }
                      checkForInOrForOfVariableDeclaration(node);
                  }
                  else {
                      var varExpr = node.initializer;
                      var leftType = checkExpression(varExpr);
                      if (varExpr.kind === 154 || varExpr.kind === 155) {
                          error(varExpr, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern);
                      }
                      else if (!allConstituentTypesHaveKind(leftType, 1 | 258)) {
                          error(varExpr, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any);
                      }
                      else {
                          checkReferenceExpression(varExpr, ts.Diagnostics.Invalid_left_hand_side_in_for_in_statement, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_previously_defined_constant);
                      }
                  }
                  var rightType = checkExpression(node.expression);
                  if (!allConstituentTypesHaveKind(rightType, 1 | 48128 | 512)) {
                      error(node.expression, ts.Diagnostics.The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter);
                  }
                  checkSourceElement(node.statement);
              }
              function checkForInOrForOfVariableDeclaration(iterationStatement) {
                  var variableDeclarationList = iterationStatement.initializer;
                  if (variableDeclarationList.declarations.length >= 1) {
                      var decl = variableDeclarationList.declarations[0];
                      checkVariableDeclaration(decl);
                  }
              }
              function checkRightHandSideOfForOf(rhsExpression) {
                  var expressionType = getTypeOfExpression(rhsExpression);
                  return checkIteratedTypeOrElementType(expressionType, rhsExpression, true);
              }
              function checkIteratedTypeOrElementType(inputType, errorNode, allowStringInput) {
                  if (inputType.flags & 1) {
                      return inputType;
                  }
                  if (languageVersion >= 2) {
                      return checkIteratedType(inputType, errorNode) || anyType;
                  }
                  if (allowStringInput) {
                      return checkElementTypeOfArrayOrString(inputType, errorNode);
                  }
                  if (isArrayLikeType(inputType)) {
                      var indexType = getIndexTypeOfType(inputType, 1);
                      if (indexType) {
                          return indexType;
                      }
                  }
                  error(errorNode, ts.Diagnostics.Type_0_is_not_an_array_type, typeToString(inputType));
                  return unknownType;
              }
              function checkIteratedType(iterable, errorNode) {
                  ts.Debug.assert(languageVersion >= 2);
                  var iteratedType = getIteratedType(iterable, errorNode);
                  if (errorNode && iteratedType) {
                      checkTypeAssignableTo(iterable, createIterableType(iteratedType), errorNode);
                  }
                  return iteratedType;
                  function getIteratedType(iterable, errorNode) {
                      // We want to treat type as an iterable, and get the type it is an iterable of. The iterable
                      // must have the following structure (annotated with the names of the variables below):
                      //
                      // { // iterable
                      //     [Symbol.iterator]: { // iteratorFunction
                      //         (): { // iterator
                      //             next: { // iteratorNextFunction
                      //                 (): { // iteratorNextResult
                      //                     value: T // iteratorNextValue
                      //                 }
                      //             }
                      //         }
                      //     }
                      // }
                      //
                      // T is the type we are after. At every level that involves analyzing return types
                      // of signatures, we union the return types of all the signatures.
                      //
                      // Another thing to note is that at any step of this process, we could run into a dead end,
                      // meaning either the property is missing, or we run into the anyType. If either of these things
                      // happens, we return undefined to signal that we could not find the iterated type. If a property
                      // is missing, and the previous step did not result in 'any', then we also give an error if the
                      // caller requested it. Then the caller can decide what to do in the case where there is no iterated
                      // type. This is different from returning anyType, because that would signify that we have matched the
                      // whole pattern and that T (above) is 'any'.
                      if (allConstituentTypesHaveKind(iterable, 1)) {
                          return undefined;
                      }
                      if ((iterable.flags & 4096) && iterable.target === globalIterableType) {
                          return iterable.typeArguments[0];
                      }
                      var iteratorFunction = getTypeOfPropertyOfType(iterable, ts.getPropertyNameForKnownSymbolName("iterator"));
                      if (iteratorFunction && allConstituentTypesHaveKind(iteratorFunction, 1)) {
                          return undefined;
                      }
                      var iteratorFunctionSignatures = iteratorFunction ? getSignaturesOfType(iteratorFunction, 0) : emptyArray;
                      if (iteratorFunctionSignatures.length === 0) {
                          if (errorNode) {
                              error(errorNode, ts.Diagnostics.Type_must_have_a_Symbol_iterator_method_that_returns_an_iterator);
                          }
                          return undefined;
                      }
                      var iterator = getUnionType(ts.map(iteratorFunctionSignatures, getReturnTypeOfSignature));
                      if (allConstituentTypesHaveKind(iterator, 1)) {
                          return undefined;
                      }
                      var iteratorNextFunction = getTypeOfPropertyOfType(iterator, "next");
                      if (iteratorNextFunction && allConstituentTypesHaveKind(iteratorNextFunction, 1)) {
                          return undefined;
                      }
                      var iteratorNextFunctionSignatures = iteratorNextFunction ? getSignaturesOfType(iteratorNextFunction, 0) : emptyArray;
                      if (iteratorNextFunctionSignatures.length === 0) {
                          if (errorNode) {
                              error(errorNode, ts.Diagnostics.An_iterator_must_have_a_next_method);
                          }
                          return undefined;
                      }
                      var iteratorNextResult = getUnionType(ts.map(iteratorNextFunctionSignatures, getReturnTypeOfSignature));
                      if (allConstituentTypesHaveKind(iteratorNextResult, 1)) {
                          return undefined;
                      }
                      var iteratorNextValue = getTypeOfPropertyOfType(iteratorNextResult, "value");
                      if (!iteratorNextValue) {
                          if (errorNode) {
                              error(errorNode, ts.Diagnostics.The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property);
                          }
                          return undefined;
                      }
                      return iteratorNextValue;
                  }
              }
              function checkElementTypeOfArrayOrString(arrayOrStringType, errorNode) {
                  ts.Debug.assert(languageVersion < 2);
                  var arrayType = removeTypesFromUnionType(arrayOrStringType, 258, true, true);
                  var hasStringConstituent = arrayOrStringType !== arrayType;
                  var reportedError = false;
                  if (hasStringConstituent) {
                      if (languageVersion < 1) {
                          error(errorNode, ts.Diagnostics.Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher);
                          reportedError = true;
                      }
                      if (arrayType === emptyObjectType) {
                          return stringType;
                      }
                  }
                  if (!isArrayLikeType(arrayType)) {
                      if (!reportedError) {
                          var diagnostic = hasStringConstituent
                              ? ts.Diagnostics.Type_0_is_not_an_array_type
                              : ts.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type;
                          error(errorNode, diagnostic, typeToString(arrayType));
                      }
                      return hasStringConstituent ? stringType : unknownType;
                  }
                  var arrayElementType = getIndexTypeOfType(arrayType, 1) || unknownType;
                  if (hasStringConstituent) {
                      if (arrayElementType.flags & 258) {
                          return stringType;
                      }
                      return getUnionType([arrayElementType, stringType]);
                  }
                  return arrayElementType;
              }
              function checkBreakOrContinueStatement(node) {
                  checkGrammarStatementInAmbientContext(node) || checkGrammarBreakOrContinueStatement(node);
              }
              function isGetAccessorWithAnnotatatedSetAccessor(node) {
                  return !!(node.kind === 137 && getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(node.symbol, 138)));
              }
              function checkReturnStatement(node) {
                  if (!checkGrammarStatementInAmbientContext(node)) {
                      var functionBlock = ts.getContainingFunction(node);
                      if (!functionBlock) {
                          grammarErrorOnFirstToken(node, ts.Diagnostics.A_return_statement_can_only_be_used_within_a_function_body);
                      }
                  }
                  if (node.expression) {
                      var func = ts.getContainingFunction(node);
                      if (func) {
                          var returnType = getReturnTypeOfSignature(getSignatureFromDeclaration(func));
                          var exprType = checkExpressionCached(node.expression);
                          if (func.kind === 138) {
                              error(node.expression, ts.Diagnostics.Setters_cannot_return_a_value);
                          }
                          else {
                              if (func.kind === 136) {
                                  if (!isTypeAssignableTo(exprType, returnType)) {
                                      error(node.expression, ts.Diagnostics.Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class);
                                  }
                              }
                              else if (func.type || isGetAccessorWithAnnotatatedSetAccessor(func)) {
                                  checkTypeAssignableTo(exprType, returnType, node.expression, undefined);
                              }
                          }
                      }
                  }
              }
              function checkWithStatement(node) {
                  if (!checkGrammarStatementInAmbientContext(node)) {
                      if (node.parserContextFlags & 1) {
                          grammarErrorOnFirstToken(node, ts.Diagnostics.with_statements_are_not_allowed_in_strict_mode);
                      }
                  }
                  checkExpression(node.expression);
                  error(node.expression, ts.Diagnostics.All_symbols_within_a_with_block_will_be_resolved_to_any);
              }
              function checkSwitchStatement(node) {
                  checkGrammarStatementInAmbientContext(node);
                  var firstDefaultClause;
                  var hasDuplicateDefaultClause = false;
                  var expressionType = checkExpression(node.expression);
                  ts.forEach(node.caseBlock.clauses, function (clause) {
                      if (clause.kind === 222 && !hasDuplicateDefaultClause) {
                          if (firstDefaultClause === undefined) {
                              firstDefaultClause = clause;
                          }
                          else {
                              var sourceFile = ts.getSourceFileOfNode(node);
                              var start = ts.skipTrivia(sourceFile.text, clause.pos);
                              var end = clause.statements.length > 0 ? clause.statements[0].pos : clause.end;
                              grammarErrorAtPos(sourceFile, start, end - start, ts.Diagnostics.A_default_clause_cannot_appear_more_than_once_in_a_switch_statement);
                              hasDuplicateDefaultClause = true;
                          }
                      }
                      if (produceDiagnostics && clause.kind === 221) {
                          var caseClause = clause;
                          var caseType = checkExpression(caseClause.expression);
                          if (!isTypeAssignableTo(expressionType, caseType)) {
                              checkTypeAssignableTo(caseType, expressionType, caseClause.expression, undefined);
                          }
                      }
                      ts.forEach(clause.statements, checkSourceElement);
                  });
              }
              function checkLabeledStatement(node) {
                  if (!checkGrammarStatementInAmbientContext(node)) {
                      var current = node.parent;
                      while (current) {
                          if (ts.isFunctionLike(current)) {
                              break;
                          }
                          if (current.kind === 195 && current.label.text === node.label.text) {
                              var sourceFile = ts.getSourceFileOfNode(node);
                              grammarErrorOnNode(node.label, ts.Diagnostics.Duplicate_label_0, ts.getTextOfNodeFromSourceText(sourceFile.text, node.label));
                              break;
                          }
                          current = current.parent;
                      }
                  }
                  checkSourceElement(node.statement);
              }
              function checkThrowStatement(node) {
                  if (!checkGrammarStatementInAmbientContext(node)) {
                      if (node.expression === undefined) {
                          grammarErrorAfterFirstToken(node, ts.Diagnostics.Line_break_not_permitted_here);
                      }
                  }
                  if (node.expression) {
                      checkExpression(node.expression);
                  }
              }
              function checkTryStatement(node) {
                  checkGrammarStatementInAmbientContext(node);
                  checkBlock(node.tryBlock);
                  var catchClause = node.catchClause;
                  if (catchClause) {
                      if (catchClause.variableDeclaration) {
                          if (catchClause.variableDeclaration.name.kind !== 65) {
                              grammarErrorOnFirstToken(catchClause.variableDeclaration.name, ts.Diagnostics.Catch_clause_variable_name_must_be_an_identifier);
                          }
                          else if (catchClause.variableDeclaration.type) {
                              grammarErrorOnFirstToken(catchClause.variableDeclaration.type, ts.Diagnostics.Catch_clause_variable_cannot_have_a_type_annotation);
                          }
                          else if (catchClause.variableDeclaration.initializer) {
                              grammarErrorOnFirstToken(catchClause.variableDeclaration.initializer, ts.Diagnostics.Catch_clause_variable_cannot_have_an_initializer);
                          }
                          else {
                              var identifierName = catchClause.variableDeclaration.name.text;
                              var locals = catchClause.block.locals;
                              if (locals && ts.hasProperty(locals, identifierName)) {
                                  var localSymbol = locals[identifierName];
                                  if (localSymbol && (localSymbol.flags & 2) !== 0) {
                                      grammarErrorOnNode(localSymbol.valueDeclaration, ts.Diagnostics.Cannot_redeclare_identifier_0_in_catch_clause, identifierName);
                                  }
                              }
                              checkGrammarEvalOrArgumentsInStrictMode(node, catchClause.variableDeclaration.name);
                          }
                      }
                      checkBlock(catchClause.block);
                  }
                  if (node.finallyBlock) {
                      checkBlock(node.finallyBlock);
                  }
              }
              function checkIndexConstraints(type) {
                  var declaredNumberIndexer = getIndexDeclarationOfSymbol(type.symbol, 1);
                  var declaredStringIndexer = getIndexDeclarationOfSymbol(type.symbol, 0);
                  var stringIndexType = getIndexTypeOfType(type, 0);
                  var numberIndexType = getIndexTypeOfType(type, 1);
                  if (stringIndexType || numberIndexType) {
                      ts.forEach(getPropertiesOfObjectType(type), function (prop) {
                          var propType = getTypeOfSymbol(prop);
                          checkIndexConstraintForProperty(prop, propType, type, declaredStringIndexer, stringIndexType, 0);
                          checkIndexConstraintForProperty(prop, propType, type, declaredNumberIndexer, numberIndexType, 1);
                      });
                      if (type.flags & 1024 && type.symbol.valueDeclaration.kind === 202) {
                          var classDeclaration = type.symbol.valueDeclaration;
                          for (var _i = 0, _a = classDeclaration.members; _i < _a.length; _i++) {
                              var member = _a[_i];
                              if (!(member.flags & 128) && ts.hasDynamicName(member)) {
                                  var propType = getTypeOfSymbol(member.symbol);
                                  checkIndexConstraintForProperty(member.symbol, propType, type, declaredStringIndexer, stringIndexType, 0);
                                  checkIndexConstraintForProperty(member.symbol, propType, type, declaredNumberIndexer, numberIndexType, 1);
                              }
                          }
                      }
                  }
                  var errorNode;
                  if (stringIndexType && numberIndexType) {
                      errorNode = declaredNumberIndexer || declaredStringIndexer;
                      if (!errorNode && (type.flags & 2048)) {
                          var someBaseTypeHasBothIndexers = ts.forEach(getBaseTypes(type), function (base) { return getIndexTypeOfType(base, 0) && getIndexTypeOfType(base, 1); });
                          errorNode = someBaseTypeHasBothIndexers ? undefined : type.symbol.declarations[0];
                      }
                  }
                  if (errorNode && !isTypeAssignableTo(numberIndexType, stringIndexType)) {
                      error(errorNode, ts.Diagnostics.Numeric_index_type_0_is_not_assignable_to_string_index_type_1, typeToString(numberIndexType), typeToString(stringIndexType));
                  }
                  function checkIndexConstraintForProperty(prop, propertyType, containingType, indexDeclaration, indexType, indexKind) {
                      if (!indexType) {
                          return;
                      }
                      if (indexKind === 1 && !isNumericName(prop.valueDeclaration.name)) {
                          return;
                      }
                      var errorNode;
                      if (prop.valueDeclaration.name.kind === 128 || prop.parent === containingType.symbol) {
                          errorNode = prop.valueDeclaration;
                      }
                      else if (indexDeclaration) {
                          errorNode = indexDeclaration;
                      }
                      else if (containingType.flags & 2048) {
                          var someBaseClassHasBothPropertyAndIndexer = ts.forEach(getBaseTypes(containingType), function (base) { return getPropertyOfObjectType(base, prop.name) && getIndexTypeOfType(base, indexKind); });
                          errorNode = someBaseClassHasBothPropertyAndIndexer ? undefined : containingType.symbol.declarations[0];
                      }
                      if (errorNode && !isTypeAssignableTo(propertyType, indexType)) {
                          var errorMessage = indexKind === 0
                              ? ts.Diagnostics.Property_0_of_type_1_is_not_assignable_to_string_index_type_2
                              : ts.Diagnostics.Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2;
                          error(errorNode, errorMessage, symbolToString(prop), typeToString(propertyType), typeToString(indexType));
                      }
                  }
              }
              function checkTypeNameIsReserved(name, message) {
                  switch (name.text) {
                      case "any":
                      case "number":
                      case "boolean":
                      case "string":
                      case "symbol":
                      case "void":
                          error(name, message, name.text);
                  }
              }
              function checkTypeParameters(typeParameterDeclarations) {
                  if (typeParameterDeclarations) {
                      for (var i = 0, n = typeParameterDeclarations.length; i < n; i++) {
                          var node = typeParameterDeclarations[i];
                          checkTypeParameter(node);
                          if (produceDiagnostics) {
                              for (var j = 0; j < i; j++) {
                                  if (typeParameterDeclarations[j].symbol === node.symbol) {
                                      error(node.name, ts.Diagnostics.Duplicate_identifier_0, ts.declarationNameToString(node.name));
                                  }
                              }
                          }
                      }
                  }
              }
              function checkClassExpression(node) {
                  grammarErrorOnNode(node, ts.Diagnostics.class_expressions_are_not_currently_supported);
                  ts.forEach(node.members, checkSourceElement);
                  return unknownType;
              }
              function checkClassDeclaration(node) {
                  checkGrammarDeclarationNameInStrictMode(node);
                  if (node.parent.kind !== 207 && node.parent.kind !== 228) {
                      grammarErrorOnNode(node, ts.Diagnostics.class_declarations_are_only_supported_directly_inside_a_module_or_as_a_top_level_declaration);
                  }
                  if (!node.name && !(node.flags & 256)) {
                      grammarErrorOnFirstToken(node, ts.Diagnostics.A_class_declaration_without_the_default_modifier_must_have_a_name);
                  }
                  checkGrammarClassDeclarationHeritageClauses(node);
                  checkDecorators(node);
                  if (node.name) {
                      checkTypeNameIsReserved(node.name, ts.Diagnostics.Class_name_cannot_be_0);
                      checkCollisionWithCapturedThisVariable(node, node.name);
                      checkCollisionWithRequireExportsInGeneratedCode(node, node.name);
                  }
                  checkTypeParameters(node.typeParameters);
                  checkExportsOnMergedDeclarations(node);
                  var symbol = getSymbolOfNode(node);
                  var type = getDeclaredTypeOfSymbol(symbol);
                  var staticType = getTypeOfSymbol(symbol);
                  var baseTypeNode = ts.getClassExtendsHeritageClauseElement(node);
                  if (baseTypeNode) {
                      if (!ts.isSupportedExpressionWithTypeArguments(baseTypeNode)) {
                          error(baseTypeNode.expression, ts.Diagnostics.Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_class_extends_clauses);
                      }
                      emitExtends = emitExtends || !ts.isInAmbientContext(node);
                      checkExpressionWithTypeArguments(baseTypeNode);
                  }
                  var baseTypes = getBaseTypes(type);
                  if (baseTypes.length) {
                      if (produceDiagnostics) {
                          var baseType = baseTypes[0];
                          checkTypeAssignableTo(type, baseType, node.name || node, ts.Diagnostics.Class_0_incorrectly_extends_base_class_1);
                          var staticBaseType = getTypeOfSymbol(baseType.symbol);
                          checkTypeAssignableTo(staticType, getTypeWithoutConstructors(staticBaseType), node.name || node, ts.Diagnostics.Class_static_side_0_incorrectly_extends_base_class_static_side_1);
                          if (baseType.symbol !== resolveEntityName(baseTypeNode.expression, 107455)) {
                              error(baseTypeNode, ts.Diagnostics.Type_name_0_in_extends_clause_does_not_reference_constructor_function_for_0, typeToString(baseType));
                          }
                          checkKindsOfPropertyMemberOverrides(type, baseType);
                      }
                  }
                  if (baseTypes.length || (baseTypeNode && compilerOptions.separateCompilation)) {
                      checkExpressionOrQualifiedName(baseTypeNode.expression);
                  }
                  var implementedTypeNodes = ts.getClassImplementsHeritageClauseElements(node);
                  if (implementedTypeNodes) {
                      ts.forEach(implementedTypeNodes, function (typeRefNode) {
                          if (!ts.isSupportedExpressionWithTypeArguments(typeRefNode)) {
                              error(typeRefNode.expression, ts.Diagnostics.A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments);
                          }
                          checkExpressionWithTypeArguments(typeRefNode);
                          if (produceDiagnostics) {
                              var t = getTypeFromTypeNode(typeRefNode);
                              if (t !== unknownType) {
                                  var declaredType = (t.flags & 4096) ? t.target : t;
                                  if (declaredType.flags & (1024 | 2048)) {
                                      checkTypeAssignableTo(type, t, node.name || node, ts.Diagnostics.Class_0_incorrectly_implements_interface_1);
                                  }
                                  else {
                                      error(typeRefNode, ts.Diagnostics.A_class_may_only_implement_another_class_or_interface);
                                  }
                              }
                          }
                      });
                  }
                  ts.forEach(node.members, checkSourceElement);
                  if (produceDiagnostics) {
                      checkIndexConstraints(type);
                      checkTypeForDuplicateIndexSignatures(node);
                  }
              }
              function getTargetSymbol(s) {
                  return s.flags & 16777216 ? getSymbolLinks(s).target : s;
              }
              function checkKindsOfPropertyMemberOverrides(type, baseType) {
                  // TypeScript 1.0 spec (April 2014): 8.2.3
                  // A derived class inherits all members from its base class it doesn't override.
                  // Inheritance means that a derived class implicitly contains all non - overridden members of the base class.
                  // Both public and private property members are inherited, but only public property members can be overridden.
                  // A property member in a derived class is said to override a property member in a base class
                  // when the derived class property member has the same name and kind(instance or static)
                  // as the base class property member.
                  // The type of an overriding property member must be assignable(section 3.8.4)
                  // to the type of the overridden property member, or otherwise a compile - time error occurs.
                  // Base class instance member functions can be overridden by derived class instance member functions,
                  // but not by other kinds of members.
                  // Base class instance member variables and accessors can be overridden by
                  // derived class instance member variables and accessors, but not by other kinds of members.
                  var baseProperties = getPropertiesOfObjectType(baseType);
                  for (var _i = 0; _i < baseProperties.length; _i++) {
                      var baseProperty = baseProperties[_i];
                      var base = getTargetSymbol(baseProperty);
                      if (base.flags & 134217728) {
                          continue;
                      }
                      var derived = getTargetSymbol(getPropertyOfObjectType(type, base.name));
                      if (derived) {
                          var baseDeclarationFlags = getDeclarationFlagsFromSymbol(base);
                          var derivedDeclarationFlags = getDeclarationFlagsFromSymbol(derived);
                          if ((baseDeclarationFlags & 32) || (derivedDeclarationFlags & 32)) {
                              continue;
                          }
                          if ((baseDeclarationFlags & 128) !== (derivedDeclarationFlags & 128)) {
                              continue;
                          }
                          if ((base.flags & derived.flags & 8192) || ((base.flags & 98308) && (derived.flags & 98308))) {
                              continue;
                          }
                          var errorMessage = void 0;
                          if (base.flags & 8192) {
                              if (derived.flags & 98304) {
                                  errorMessage = ts.Diagnostics.Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor;
                              }
                              else {
                                  ts.Debug.assert((derived.flags & 4) !== 0);
                                  errorMessage = ts.Diagnostics.Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_property;
                              }
                          }
                          else if (base.flags & 4) {
                              ts.Debug.assert((derived.flags & 8192) !== 0);
                              errorMessage = ts.Diagnostics.Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function;
                          }
                          else {
                              ts.Debug.assert((base.flags & 98304) !== 0);
                              ts.Debug.assert((derived.flags & 8192) !== 0);
                              errorMessage = ts.Diagnostics.Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function;
                          }
                          error(derived.valueDeclaration.name, errorMessage, typeToString(baseType), symbolToString(base), typeToString(type));
                      }
                  }
              }
              function isAccessor(kind) {
                  return kind === 137 || kind === 138;
              }
              function areTypeParametersIdentical(list1, list2) {
                  if (!list1 && !list2) {
                      return true;
                  }
                  if (!list1 || !list2 || list1.length !== list2.length) {
                      return false;
                  }
                  for (var i = 0, len = list1.length; i < len; i++) {
                      var tp1 = list1[i];
                      var tp2 = list2[i];
                      if (tp1.name.text !== tp2.name.text) {
                          return false;
                      }
                      if (!tp1.constraint && !tp2.constraint) {
                          continue;
                      }
                      if (!tp1.constraint || !tp2.constraint) {
                          return false;
                      }
                      if (!isTypeIdenticalTo(getTypeFromTypeNode(tp1.constraint), getTypeFromTypeNode(tp2.constraint))) {
                          return false;
                      }
                  }
                  return true;
              }
              function checkInheritedPropertiesAreIdentical(type, typeNode) {
                  var baseTypes = getBaseTypes(type);
                  if (baseTypes.length < 2) {
                      return true;
                  }
                  var seen = {};
                  ts.forEach(resolveDeclaredMembers(type).declaredProperties, function (p) { seen[p.name] = { prop: p, containingType: type }; });
                  var ok = true;
                  for (var _i = 0; _i < baseTypes.length; _i++) {
                      var base = baseTypes[_i];
                      var properties = getPropertiesOfObjectType(base);
                      for (var _a = 0; _a < properties.length; _a++) {
                          var prop = properties[_a];
                          if (!ts.hasProperty(seen, prop.name)) {
                              seen[prop.name] = { prop: prop, containingType: base };
                          }
                          else {
                              var existing = seen[prop.name];
                              var isInheritedProperty = existing.containingType !== type;
                              if (isInheritedProperty && !isPropertyIdenticalTo(existing.prop, prop)) {
                                  ok = false;
                                  var typeName1 = typeToString(existing.containingType);
                                  var typeName2 = typeToString(base);
                                  var errorInfo = ts.chainDiagnosticMessages(undefined, ts.Diagnostics.Named_property_0_of_types_1_and_2_are_not_identical, symbolToString(prop), typeName1, typeName2);
                                  errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.Interface_0_cannot_simultaneously_extend_types_1_and_2, typeToString(type), typeName1, typeName2);
                                  diagnostics.add(ts.createDiagnosticForNodeFromMessageChain(typeNode, errorInfo));
                              }
                          }
                      }
                  }
                  return ok;
              }
              function checkInterfaceDeclaration(node) {
                  checkGrammarDeclarationNameInStrictMode(node) || checkGrammarDecorators(node) || checkGrammarModifiers(node) || checkGrammarInterfaceDeclaration(node);
                  checkTypeParameters(node.typeParameters);
                  if (produceDiagnostics) {
                      checkTypeNameIsReserved(node.name, ts.Diagnostics.Interface_name_cannot_be_0);
                      checkExportsOnMergedDeclarations(node);
                      var symbol = getSymbolOfNode(node);
                      var firstInterfaceDecl = ts.getDeclarationOfKind(symbol, 203);
                      if (symbol.declarations.length > 1) {
                          if (node !== firstInterfaceDecl && !areTypeParametersIdentical(firstInterfaceDecl.typeParameters, node.typeParameters)) {
                              error(node.name, ts.Diagnostics.All_declarations_of_an_interface_must_have_identical_type_parameters);
                          }
                      }
                      if (node === firstInterfaceDecl) {
                          var type = getDeclaredTypeOfSymbol(symbol);
                          if (checkInheritedPropertiesAreIdentical(type, node.name)) {
                              ts.forEach(getBaseTypes(type), function (baseType) {
                                  checkTypeAssignableTo(type, baseType, node.name, ts.Diagnostics.Interface_0_incorrectly_extends_interface_1);
                              });
                              checkIndexConstraints(type);
                          }
                      }
                  }
                  ts.forEach(ts.getInterfaceBaseTypeNodes(node), function (heritageElement) {
                      if (!ts.isSupportedExpressionWithTypeArguments(heritageElement)) {
                          error(heritageElement.expression, ts.Diagnostics.An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments);
                      }
                      checkExpressionWithTypeArguments(heritageElement);
                  });
                  ts.forEach(node.members, checkSourceElement);
                  if (produceDiagnostics) {
                      checkTypeForDuplicateIndexSignatures(node);
                  }
              }
              function checkTypeAliasDeclaration(node) {
                  checkGrammarDecorators(node) || checkGrammarModifiers(node);
                  checkTypeNameIsReserved(node.name, ts.Diagnostics.Type_alias_name_cannot_be_0);
                  checkSourceElement(node.type);
              }
              function computeEnumMemberValues(node) {
                  var nodeLinks = getNodeLinks(node);
                  if (!(nodeLinks.flags & 128)) {
                      var enumSymbol = getSymbolOfNode(node);
                      var enumType = getDeclaredTypeOfSymbol(enumSymbol);
                      var autoValue = 0;
                      var ambient = ts.isInAmbientContext(node);
                      var enumIsConst = ts.isConst(node);
                      ts.forEach(node.members, function (member) {
                          if (member.name.kind !== 128 && isNumericLiteralName(member.name.text)) {
                              error(member.name, ts.Diagnostics.An_enum_member_cannot_have_a_numeric_name);
                          }
                          var initializer = member.initializer;
                          if (initializer) {
                              autoValue = getConstantValueForEnumMemberInitializer(initializer);
                              if (autoValue === undefined) {
                                  if (enumIsConst) {
                                      error(initializer, ts.Diagnostics.In_const_enum_declarations_member_initializer_must_be_constant_expression);
                                  }
                                  else if (!ambient) {
                                      checkTypeAssignableTo(checkExpression(initializer), enumType, initializer, undefined);
                                  }
                              }
                              else if (enumIsConst) {
                                  if (isNaN(autoValue)) {
                                      error(initializer, ts.Diagnostics.const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN);
                                  }
                                  else if (!isFinite(autoValue)) {
                                      error(initializer, ts.Diagnostics.const_enum_member_initializer_was_evaluated_to_a_non_finite_value);
                                  }
                              }
                          }
                          else if (ambient && !enumIsConst) {
                              autoValue = undefined;
                          }
                          if (autoValue !== undefined) {
                              getNodeLinks(member).enumMemberValue = autoValue++;
                          }
                      });
                      nodeLinks.flags |= 128;
                  }
                  function getConstantValueForEnumMemberInitializer(initializer) {
                      return evalConstant(initializer);
                      function evalConstant(e) {
                          switch (e.kind) {
                              case 168:
                                  var value = evalConstant(e.operand);
                                  if (value === undefined) {
                                      return undefined;
                                  }
                                  switch (e.operator) {
                                      case 33: return value;
                                      case 34: return -value;
                                      case 47: return ~value;
                                  }
                                  return undefined;
                              case 170:
                                  var left = evalConstant(e.left);
                                  if (left === undefined) {
                                      return undefined;
                                  }
                                  var right = evalConstant(e.right);
                                  if (right === undefined) {
                                      return undefined;
                                  }
                                  switch (e.operatorToken.kind) {
                                      case 44: return left | right;
                                      case 43: return left & right;
                                      case 41: return left >> right;
                                      case 42: return left >>> right;
                                      case 40: return left << right;
                                      case 45: return left ^ right;
                                      case 35: return left * right;
                                      case 36: return left / right;
                                      case 33: return left + right;
                                      case 34: return left - right;
                                      case 37: return left % right;
                                  }
                                  return undefined;
                              case 7:
                                  return +e.text;
                              case 162:
                                  return evalConstant(e.expression);
                              case 65:
                              case 157:
                              case 156:
                                  var member = initializer.parent;
                                  var currentType = getTypeOfSymbol(getSymbolOfNode(member.parent));
                                  var enumType;
                                  var propertyName;
                                  if (e.kind === 65) {
                                      enumType = currentType;
                                      propertyName = e.text;
                                  }
                                  else {
                                      var expression;
                                      if (e.kind === 157) {
                                          if (e.argumentExpression === undefined ||
                                              e.argumentExpression.kind !== 8) {
                                              return undefined;
                                          }
                                          expression = e.expression;
                                          propertyName = e.argumentExpression.text;
                                      }
                                      else {
                                          expression = e.expression;
                                          propertyName = e.name.text;
                                      }
                                      var current = expression;
                                      while (current) {
                                          if (current.kind === 65) {
                                              break;
                                          }
                                          else if (current.kind === 156) {
                                              current = current.expression;
                                          }
                                          else {
                                              return undefined;
                                          }
                                      }
                                      enumType = checkExpression(expression);
                                      if (!(enumType.symbol && (enumType.symbol.flags & 384))) {
                                          return undefined;
                                      }
                                  }
                                  if (propertyName === undefined) {
                                      return undefined;
                                  }
                                  var property = getPropertyOfObjectType(enumType, propertyName);
                                  if (!property || !(property.flags & 8)) {
                                      return undefined;
                                  }
                                  var propertyDecl = property.valueDeclaration;
                                  if (member === propertyDecl) {
                                      return undefined;
                                  }
                                  if (!isDefinedBefore(propertyDecl, member)) {
                                      return undefined;
                                  }
                                  return getNodeLinks(propertyDecl).enumMemberValue;
                          }
                      }
                  }
              }
              function checkEnumDeclaration(node) {
                  if (!produceDiagnostics) {
                      return;
                  }
                  checkGrammarDeclarationNameInStrictMode(node) || checkGrammarDecorators(node) || checkGrammarModifiers(node) || checkGrammarEnumDeclaration(node);
                  checkTypeNameIsReserved(node.name, ts.Diagnostics.Enum_name_cannot_be_0);
                  checkCollisionWithCapturedThisVariable(node, node.name);
                  checkCollisionWithRequireExportsInGeneratedCode(node, node.name);
                  checkExportsOnMergedDeclarations(node);
                  computeEnumMemberValues(node);
                  var enumIsConst = ts.isConst(node);
                  if (compilerOptions.separateCompilation && enumIsConst && ts.isInAmbientContext(node)) {
                      error(node.name, ts.Diagnostics.Ambient_const_enums_are_not_allowed_when_the_separateCompilation_flag_is_provided);
                  }
                  var enumSymbol = getSymbolOfNode(node);
                  var firstDeclaration = ts.getDeclarationOfKind(enumSymbol, node.kind);
                  if (node === firstDeclaration) {
                      if (enumSymbol.declarations.length > 1) {
                          ts.forEach(enumSymbol.declarations, function (decl) {
                              if (ts.isConstEnumDeclaration(decl) !== enumIsConst) {
                                  error(decl.name, ts.Diagnostics.Enum_declarations_must_all_be_const_or_non_const);
                              }
                          });
                      }
                      var seenEnumMissingInitialInitializer = false;
                      ts.forEach(enumSymbol.declarations, function (declaration) {
                          if (declaration.kind !== 205) {
                              return false;
                          }
                          var enumDeclaration = declaration;
                          if (!enumDeclaration.members.length) {
                              return false;
                          }
                          var firstEnumMember = enumDeclaration.members[0];
                          if (!firstEnumMember.initializer) {
                              if (seenEnumMissingInitialInitializer) {
                                  error(firstEnumMember.name, ts.Diagnostics.In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element);
                              }
                              else {
                                  seenEnumMissingInitialInitializer = true;
                              }
                          }
                      });
                  }
              }
              function getFirstNonAmbientClassOrFunctionDeclaration(symbol) {
                  var declarations = symbol.declarations;
                  for (var _i = 0; _i < declarations.length; _i++) {
                      var declaration = declarations[_i];
                      if ((declaration.kind === 202 ||
                          (declaration.kind === 201 && ts.nodeIsPresent(declaration.body))) &&
                          !ts.isInAmbientContext(declaration)) {
                          return declaration;
                      }
                  }
                  return undefined;
              }
              function inSameLexicalScope(node1, node2) {
                  var container1 = ts.getEnclosingBlockScopeContainer(node1);
                  var container2 = ts.getEnclosingBlockScopeContainer(node2);
                  if (isGlobalSourceFile(container1)) {
                      return isGlobalSourceFile(container2);
                  }
                  else if (isGlobalSourceFile(container2)) {
                      return false;
                  }
                  else {
                      return container1 === container2;
                  }
              }
              function checkModuleDeclaration(node) {
                  if (produceDiagnostics) {
                      if (!checkGrammarDeclarationNameInStrictMode(node) && !checkGrammarDecorators(node) && !checkGrammarModifiers(node)) {
                          if (!ts.isInAmbientContext(node) && node.name.kind === 8) {
                              grammarErrorOnNode(node.name, ts.Diagnostics.Only_ambient_modules_can_use_quoted_names);
                          }
                      }
                      checkCollisionWithCapturedThisVariable(node, node.name);
                      checkCollisionWithRequireExportsInGeneratedCode(node, node.name);
                      checkExportsOnMergedDeclarations(node);
                      var symbol = getSymbolOfNode(node);
                      if (symbol.flags & 512
                          && symbol.declarations.length > 1
                          && !ts.isInAmbientContext(node)
                          && ts.isInstantiatedModule(node, compilerOptions.preserveConstEnums || compilerOptions.separateCompilation)) {
                          var firstNonAmbientClassOrFunc = getFirstNonAmbientClassOrFunctionDeclaration(symbol);
                          if (firstNonAmbientClassOrFunc) {
                              if (ts.getSourceFileOfNode(node) !== ts.getSourceFileOfNode(firstNonAmbientClassOrFunc)) {
                                  error(node.name, ts.Diagnostics.A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged);
                              }
                              else if (node.pos < firstNonAmbientClassOrFunc.pos) {
                                  error(node.name, ts.Diagnostics.A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged);
                              }
                          }
                          var mergedClass = ts.getDeclarationOfKind(symbol, 202);
                          if (mergedClass &&
                              inSameLexicalScope(node, mergedClass)) {
                              getNodeLinks(node).flags |= 2048;
                          }
                      }
                      if (node.name.kind === 8) {
                          if (!isGlobalSourceFile(node.parent)) {
                              error(node.name, ts.Diagnostics.Ambient_modules_cannot_be_nested_in_other_modules);
                          }
                          if (isExternalModuleNameRelative(node.name.text)) {
                              error(node.name, ts.Diagnostics.Ambient_module_declaration_cannot_specify_relative_module_name);
                          }
                      }
                  }
                  checkSourceElement(node.body);
              }
              function getFirstIdentifier(node) {
                  while (true) {
                      if (node.kind === 127) {
                          node = node.left;
                      }
                      else if (node.kind === 156) {
                          node = node.expression;
                      }
                      else {
                          break;
                      }
                  }
                  ts.Debug.assert(node.kind === 65);
                  return node;
              }
              function checkExternalImportOrExportDeclaration(node) {
                  var moduleName = ts.getExternalModuleName(node);
                  if (!ts.nodeIsMissing(moduleName) && moduleName.kind !== 8) {
                      error(moduleName, ts.Diagnostics.String_literal_expected);
                      return false;
                  }
                  var inAmbientExternalModule = node.parent.kind === 207 && node.parent.parent.name.kind === 8;
                  if (node.parent.kind !== 228 && !inAmbientExternalModule) {
                      error(moduleName, node.kind === 216 ?
                          ts.Diagnostics.Export_declarations_are_not_permitted_in_a_namespace :
                          ts.Diagnostics.Import_declarations_in_a_namespace_cannot_reference_a_module);
                      return false;
                  }
                  if (inAmbientExternalModule && isExternalModuleNameRelative(moduleName.text)) {
                      error(node, ts.Diagnostics.Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name);
                      return false;
                  }
                  return true;
              }
              function checkAliasSymbol(node) {
                  var symbol = getSymbolOfNode(node);
                  var target = resolveAlias(symbol);
                  if (target !== unknownSymbol) {
                      var excludedMeanings = (symbol.flags & 107455 ? 107455 : 0) |
                          (symbol.flags & 793056 ? 793056 : 0) |
                          (symbol.flags & 1536 ? 1536 : 0);
                      if (target.flags & excludedMeanings) {
                          var message = node.kind === 218 ?
                              ts.Diagnostics.Export_declaration_conflicts_with_exported_declaration_of_0 :
                              ts.Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0;
                          error(node, message, symbolToString(symbol));
                      }
                  }
              }
              function checkImportBinding(node) {
                  checkCollisionWithCapturedThisVariable(node, node.name);
                  checkCollisionWithRequireExportsInGeneratedCode(node, node.name);
                  checkAliasSymbol(node);
              }
              function checkImportDeclaration(node) {
                  if (!checkGrammarImportDeclarationNameInStrictMode(node) && !checkGrammarDecorators(node) && !checkGrammarModifiers(node) && (node.flags & 499)) {
                      grammarErrorOnFirstToken(node, ts.Diagnostics.An_import_declaration_cannot_have_modifiers);
                  }
                  if (checkExternalImportOrExportDeclaration(node)) {
                      var importClause = node.importClause;
                      if (importClause) {
                          if (importClause.name) {
                              checkImportBinding(importClause);
                          }
                          if (importClause.namedBindings) {
                              if (importClause.namedBindings.kind === 212) {
                                  checkImportBinding(importClause.namedBindings);
                              }
                              else {
                                  ts.forEach(importClause.namedBindings.elements, checkImportBinding);
                              }
                          }
                      }
                  }
              }
              function checkImportEqualsDeclaration(node) {
                  checkGrammarDeclarationNameInStrictMode(node) || checkGrammarDecorators(node) || checkGrammarModifiers(node);
                  if (ts.isInternalModuleImportEqualsDeclaration(node) || checkExternalImportOrExportDeclaration(node)) {
                      checkImportBinding(node);
                      if (node.flags & 1) {
                          markExportAsReferenced(node);
                      }
                      if (ts.isInternalModuleImportEqualsDeclaration(node)) {
                          var target = resolveAlias(getSymbolOfNode(node));
                          if (target !== unknownSymbol) {
                              if (target.flags & 107455) {
                                  var moduleName = getFirstIdentifier(node.moduleReference);
                                  if (!(resolveEntityName(moduleName, 107455 | 1536).flags & 1536)) {
                                      error(moduleName, ts.Diagnostics.Module_0_is_hidden_by_a_local_declaration_with_the_same_name, ts.declarationNameToString(moduleName));
                                  }
                              }
                              if (target.flags & 793056) {
                                  checkTypeNameIsReserved(node.name, ts.Diagnostics.Import_name_cannot_be_0);
                              }
                          }
                      }
                      else {
                          if (languageVersion >= 2) {
                              grammarErrorOnNode(node, ts.Diagnostics.Import_assignment_cannot_be_used_when_targeting_ECMAScript_6_or_higher_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_or_import_d_from_mod_instead);
                          }
                      }
                  }
              }
              function checkExportDeclaration(node) {
                  if (!checkGrammarDecorators(node) && !checkGrammarModifiers(node) && (node.flags & 499)) {
                      grammarErrorOnFirstToken(node, ts.Diagnostics.An_export_declaration_cannot_have_modifiers);
                  }
                  if (!node.moduleSpecifier || checkExternalImportOrExportDeclaration(node)) {
                      if (node.exportClause) {
                          ts.forEach(node.exportClause.elements, checkExportSpecifier);
                          var inAmbientExternalModule = node.parent.kind === 207 && node.parent.parent.name.kind === 8;
                          if (node.parent.kind !== 228 && !inAmbientExternalModule) {
                              error(node, ts.Diagnostics.Export_declarations_are_not_permitted_in_a_namespace);
                          }
                      }
                      else {
                          var moduleSymbol = resolveExternalModuleName(node, node.moduleSpecifier);
                          if (moduleSymbol && moduleSymbol.exports["export="]) {
                              error(node.moduleSpecifier, ts.Diagnostics.Module_0_uses_export_and_cannot_be_used_with_export_Asterisk, symbolToString(moduleSymbol));
                          }
                      }
                  }
              }
              function checkExportSpecifier(node) {
                  checkAliasSymbol(node);
                  if (!node.parent.parent.moduleSpecifier) {
                      markExportAsReferenced(node);
                  }
              }
              function checkExportAssignment(node) {
                  var container = node.parent.kind === 228 ? node.parent : node.parent.parent;
                  if (container.kind === 206 && container.name.kind === 65) {
                      error(node, ts.Diagnostics.An_export_assignment_cannot_be_used_in_a_namespace);
                      return;
                  }
                  if (!checkGrammarDecorators(node) && !checkGrammarModifiers(node) && (node.flags & 499)) {
                      grammarErrorOnFirstToken(node, ts.Diagnostics.An_export_assignment_cannot_have_modifiers);
                  }
                  if (node.expression.kind === 65) {
                      markExportAsReferenced(node);
                  }
                  else {
                      checkExpressionCached(node.expression);
                  }
                  checkExternalModuleExports(container);
                  if (node.isExportEquals && !ts.isInAmbientContext(node)) {
                      if (languageVersion >= 2) {
                          grammarErrorOnNode(node, ts.Diagnostics.Export_assignment_cannot_be_used_when_targeting_ECMAScript_6_or_higher_Consider_using_export_default_instead);
                      }
                      else if (compilerOptions.module === 4) {
                          grammarErrorOnNode(node, ts.Diagnostics.Export_assignment_is_not_supported_when_module_flag_is_system);
                      }
                  }
              }
              function getModuleStatements(node) {
                  if (node.kind === 228) {
                      return node.statements;
                  }
                  if (node.kind === 206 && node.body.kind === 207) {
                      return node.body.statements;
                  }
                  return emptyArray;
              }
              function hasExportedMembers(moduleSymbol) {
                  for (var id in moduleSymbol.exports) {
                      if (id !== "export=") {
                          return true;
                      }
                  }
                  return false;
              }
              function checkExternalModuleExports(node) {
                  var moduleSymbol = getSymbolOfNode(node);
                  var links = getSymbolLinks(moduleSymbol);
                  if (!links.exportsChecked) {
                      var exportEqualsSymbol = moduleSymbol.exports["export="];
                      if (exportEqualsSymbol && hasExportedMembers(moduleSymbol)) {
                          var declaration = getDeclarationOfAliasSymbol(exportEqualsSymbol) || exportEqualsSymbol.valueDeclaration;
                          error(declaration, ts.Diagnostics.An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements);
                      }
                      links.exportsChecked = true;
                  }
              }
              function checkSourceElement(node) {
                  if (!node)
                      return;
                  switch (node.kind) {
                      case 129:
                          return checkTypeParameter(node);
                      case 130:
                          return checkParameter(node);
                      case 133:
                      case 132:
                          return checkPropertyDeclaration(node);
                      case 143:
                      case 144:
                      case 139:
                      case 140:
                          return checkSignatureDeclaration(node);
                      case 141:
                          return checkSignatureDeclaration(node);
                      case 135:
                      case 134:
                          return checkMethodDeclaration(node);
                      case 136:
                          return checkConstructorDeclaration(node);
                      case 137:
                      case 138:
                          return checkAccessorDeclaration(node);
                      case 142:
                          return checkTypeReferenceNode(node);
                      case 145:
                          return checkTypeQuery(node);
                      case 146:
                          return checkTypeLiteral(node);
                      case 147:
                          return checkArrayType(node);
                      case 148:
                          return checkTupleType(node);
                      case 149:
                          return checkUnionType(node);
                      case 150:
                          return checkSourceElement(node.type);
                      case 201:
                          return checkFunctionDeclaration(node);
                      case 180:
                      case 207:
                          return checkBlock(node);
                      case 181:
                          return checkVariableStatement(node);
                      case 183:
                          return checkExpressionStatement(node);
                      case 184:
                          return checkIfStatement(node);
                      case 185:
                          return checkDoStatement(node);
                      case 186:
                          return checkWhileStatement(node);
                      case 187:
                          return checkForStatement(node);
                      case 188:
                          return checkForInStatement(node);
                      case 189:
                          return checkForOfStatement(node);
                      case 190:
                      case 191:
                          return checkBreakOrContinueStatement(node);
                      case 192:
                          return checkReturnStatement(node);
                      case 193:
                          return checkWithStatement(node);
                      case 194:
                          return checkSwitchStatement(node);
                      case 195:
                          return checkLabeledStatement(node);
                      case 196:
                          return checkThrowStatement(node);
                      case 197:
                          return checkTryStatement(node);
                      case 199:
                          return checkVariableDeclaration(node);
                      case 153:
                          return checkBindingElement(node);
                      case 202:
                          return checkClassDeclaration(node);
                      case 203:
                          return checkInterfaceDeclaration(node);
                      case 204:
                          return checkTypeAliasDeclaration(node);
                      case 205:
                          return checkEnumDeclaration(node);
                      case 206:
                          return checkModuleDeclaration(node);
                      case 210:
                          return checkImportDeclaration(node);
                      case 209:
                          return checkImportEqualsDeclaration(node);
                      case 216:
                          return checkExportDeclaration(node);
                      case 215:
                          return checkExportAssignment(node);
                      case 182:
                          checkGrammarStatementInAmbientContext(node);
                          return;
                      case 198:
                          checkGrammarStatementInAmbientContext(node);
                          return;
                      case 219:
                          return checkMissingDeclaration(node);
                  }
              }
              function checkFunctionExpressionBodies(node) {
                  switch (node.kind) {
                      case 163:
                      case 164:
                          ts.forEach(node.parameters, checkFunctionExpressionBodies);
                          checkFunctionExpressionOrObjectLiteralMethodBody(node);
                          break;
                      case 135:
                      case 134:
                          ts.forEach(node.parameters, checkFunctionExpressionBodies);
                          if (ts.isObjectLiteralMethod(node)) {
                              checkFunctionExpressionOrObjectLiteralMethodBody(node);
                          }
                          break;
                      case 136:
                      case 137:
                      case 138:
                      case 201:
                          ts.forEach(node.parameters, checkFunctionExpressionBodies);
                          break;
                      case 193:
                          checkFunctionExpressionBodies(node.expression);
                          break;
                      case 130:
                      case 133:
                      case 132:
                      case 151:
                      case 152:
                      case 153:
                      case 154:
                      case 155:
                      case 225:
                      case 156:
                      case 157:
                      case 158:
                      case 159:
                      case 160:
                      case 172:
                      case 178:
                      case 161:
                      case 162:
                      case 166:
                      case 167:
                      case 165:
                      case 168:
                      case 169:
                      case 170:
                      case 171:
                      case 174:
                      case 180:
                      case 207:
                      case 181:
                      case 183:
                      case 184:
                      case 185:
                      case 186:
                      case 187:
                      case 188:
                      case 189:
                      case 190:
                      case 191:
                      case 192:
                      case 194:
                      case 208:
                      case 221:
                      case 222:
                      case 195:
                      case 196:
                      case 197:
                      case 224:
                      case 199:
                      case 200:
                      case 202:
                      case 205:
                      case 227:
                      case 215:
                      case 228:
                          ts.forEachChild(node, checkFunctionExpressionBodies);
                          break;
                  }
              }
              function checkSourceFile(node) {
                  var start = new Date().getTime();
                  checkSourceFileWorker(node);
                  ts.checkTime += new Date().getTime() - start;
              }
              function checkSourceFileWorker(node) {
                  var links = getNodeLinks(node);
                  if (!(links.flags & 1)) {
                      checkGrammarSourceFile(node);
                      emitExtends = false;
                      emitDecorate = false;
                      emitParam = false;
                      potentialThisCollisions.length = 0;
                      ts.forEach(node.statements, checkSourceElement);
                      checkFunctionExpressionBodies(node);
                      if (ts.isExternalModule(node)) {
                          checkExternalModuleExports(node);
                      }
                      if (potentialThisCollisions.length) {
                          ts.forEach(potentialThisCollisions, checkIfThisIsCapturedInEnclosingScope);
                          potentialThisCollisions.length = 0;
                      }
                      if (emitExtends) {
                          links.flags |= 8;
                      }
                      if (emitDecorate) {
                          links.flags |= 512;
                      }
                      if (emitParam) {
                          links.flags |= 1024;
                      }
                      links.flags |= 1;
                  }
              }
              function getDiagnostics(sourceFile) {
                  throwIfNonDiagnosticsProducing();
                  if (sourceFile) {
                      checkSourceFile(sourceFile);
                      return diagnostics.getDiagnostics(sourceFile.fileName);
                  }
                  ts.forEach(host.getSourceFiles(), checkSourceFile);
                  return diagnostics.getDiagnostics();
              }
              function getGlobalDiagnostics() {
                  throwIfNonDiagnosticsProducing();
                  return diagnostics.getGlobalDiagnostics();
              }
              function throwIfNonDiagnosticsProducing() {
                  if (!produceDiagnostics) {
                      throw new Error("Trying to get diagnostics from a type checker that does not produce them.");
                  }
              }
              function isInsideWithStatementBody(node) {
                  if (node) {
                      while (node.parent) {
                          if (node.parent.kind === 193 && node.parent.statement === node) {
                              return true;
                          }
                          node = node.parent;
                      }
                  }
                  return false;
              }
              function getSymbolsInScope(location, meaning) {
                  var symbols = {};
                  var memberFlags = 0;
                  if (isInsideWithStatementBody(location)) {
                      return [];
                  }
                  populateSymbols();
                  return symbolsToArray(symbols);
                  function populateSymbols() {
                      while (location) {
                          if (location.locals && !isGlobalSourceFile(location)) {
                              copySymbols(location.locals, meaning);
                          }
                          switch (location.kind) {
                              case 228:
                                  if (!ts.isExternalModule(location)) {
                                      break;
                                  }
                              case 206:
                                  copySymbols(getSymbolOfNode(location).exports, meaning & 8914931);
                                  break;
                              case 205:
                                  copySymbols(getSymbolOfNode(location).exports, meaning & 8);
                                  break;
                              case 202:
                              case 203:
                                  if (!(memberFlags & 128)) {
                                      copySymbols(getSymbolOfNode(location).members, meaning & 793056);
                                  }
                                  break;
                              case 163:
                                  if (location.name) {
                                      copySymbol(location.symbol, meaning);
                                  }
                                  break;
                          }
                          memberFlags = location.flags;
                          location = location.parent;
                      }
                      copySymbols(globals, meaning);
                  }
                  function copySymbol(symbol, meaning) {
                      if (symbol.flags & meaning) {
                          var id = symbol.name;
                          if (!isReservedMemberName(id) && !ts.hasProperty(symbols, id)) {
                              symbols[id] = symbol;
                          }
                      }
                  }
                  function copySymbols(source, meaning) {
                      if (meaning) {
                          for (var id in source) {
                              if (ts.hasProperty(source, id)) {
                                  copySymbol(source[id], meaning);
                              }
                          }
                      }
                  }
                  if (isInsideWithStatementBody(location)) {
                      return [];
                  }
                  while (location) {
                      if (location.locals && !isGlobalSourceFile(location)) {
                          copySymbols(location.locals, meaning);
                      }
                      switch (location.kind) {
                          case 228:
                              if (!ts.isExternalModule(location))
                                  break;
                          case 206:
                              copySymbols(getSymbolOfNode(location).exports, meaning & 8914931);
                              break;
                          case 205:
                              copySymbols(getSymbolOfNode(location).exports, meaning & 8);
                              break;
                          case 202:
                          case 203:
                              if (!(memberFlags & 128)) {
                                  copySymbols(getSymbolOfNode(location).members, meaning & 793056);
                              }
                              break;
                          case 163:
                              if (location.name) {
                                  copySymbol(location.symbol, meaning);
                              }
                              break;
                      }
                      memberFlags = location.flags;
                      location = location.parent;
                  }
                  copySymbols(globals, meaning);
                  return symbolsToArray(symbols);
              }
              function isTypeDeclarationName(name) {
                  return name.kind == 65 &&
                      isTypeDeclaration(name.parent) &&
                      name.parent.name === name;
              }
              function isTypeDeclaration(node) {
                  switch (node.kind) {
                      case 129:
                      case 202:
                      case 203:
                      case 204:
                      case 205:
                          return true;
                  }
              }
              function isTypeReferenceIdentifier(entityName) {
                  var node = entityName;
                  while (node.parent && node.parent.kind === 127) {
                      node = node.parent;
                  }
                  return node.parent && node.parent.kind === 142;
              }
              function isHeritageClauseElementIdentifier(entityName) {
                  var node = entityName;
                  while (node.parent && node.parent.kind === 156) {
                      node = node.parent;
                  }
                  return node.parent && node.parent.kind === 177;
              }
              function isTypeNode(node) {
                  if (142 <= node.kind && node.kind <= 150) {
                      return true;
                  }
                  switch (node.kind) {
                      case 112:
                      case 120:
                      case 122:
                      case 113:
                      case 123:
                          return true;
                      case 99:
                          return node.parent.kind !== 167;
                      case 8:
                          return node.parent.kind === 130;
                      case 177:
                          return true;
                      case 65:
                          if (node.parent.kind === 127 && node.parent.right === node) {
                              node = node.parent;
                          }
                          else if (node.parent.kind === 156 && node.parent.name === node) {
                              node = node.parent;
                          }
                      case 127:
                      case 156:
                          ts.Debug.assert(node.kind === 65 || node.kind === 127 || node.kind === 156, "'node' was expected to be a qualified name, identifier or property access in 'isTypeNode'.");
                          var parent_5 = node.parent;
                          if (parent_5.kind === 145) {
                              return false;
                          }
                          if (142 <= parent_5.kind && parent_5.kind <= 150) {
                              return true;
                          }
                          switch (parent_5.kind) {
                              case 177:
                                  return true;
                              case 129:
                                  return node === parent_5.constraint;
                              case 133:
                              case 132:
                              case 130:
                              case 199:
                                  return node === parent_5.type;
                              case 201:
                              case 163:
                              case 164:
                              case 136:
                              case 135:
                              case 134:
                              case 137:
                              case 138:
                                  return node === parent_5.type;
                              case 139:
                              case 140:
                              case 141:
                                  return node === parent_5.type;
                              case 161:
                                  return node === parent_5.type;
                              case 158:
                              case 159:
                                  return parent_5.typeArguments && ts.indexOf(parent_5.typeArguments, node) >= 0;
                              case 160:
                                  return false;
                          }
                  }
                  return false;
              }
              function getLeftSideOfImportEqualsOrExportAssignment(nodeOnRightSide) {
                  while (nodeOnRightSide.parent.kind === 127) {
                      nodeOnRightSide = nodeOnRightSide.parent;
                  }
                  if (nodeOnRightSide.parent.kind === 209) {
                      return nodeOnRightSide.parent.moduleReference === nodeOnRightSide && nodeOnRightSide.parent;
                  }
                  if (nodeOnRightSide.parent.kind === 215) {
                      return nodeOnRightSide.parent.expression === nodeOnRightSide && nodeOnRightSide.parent;
                  }
                  return undefined;
              }
              function isInRightSideOfImportOrExportAssignment(node) {
                  return getLeftSideOfImportEqualsOrExportAssignment(node) !== undefined;
              }
              function getSymbolOfEntityNameOrPropertyAccessExpression(entityName) {
                  if (ts.isDeclarationName(entityName)) {
                      return getSymbolOfNode(entityName.parent);
                  }
                  if (entityName.parent.kind === 215) {
                      return resolveEntityName(entityName, 107455 | 793056 | 1536 | 8388608);
                  }
                  if (entityName.kind !== 156) {
                      if (isInRightSideOfImportOrExportAssignment(entityName)) {
                          return getSymbolOfPartOfRightHandSideOfImportEquals(entityName);
                      }
                  }
                  if (ts.isRightSideOfQualifiedNameOrPropertyAccess(entityName)) {
                      entityName = entityName.parent;
                  }
                  if (isHeritageClauseElementIdentifier(entityName)) {
                      var meaning = entityName.parent.kind === 177 ? 793056 : 1536;
                      meaning |= 8388608;
                      return resolveEntityName(entityName, meaning);
                  }
                  else if (ts.isExpression(entityName)) {
                      if (ts.nodeIsMissing(entityName)) {
                          return undefined;
                      }
                      if (entityName.kind === 65) {
                          var meaning = 107455 | 8388608;
                          return resolveEntityName(entityName, meaning);
                      }
                      else if (entityName.kind === 156) {
                          var symbol = getNodeLinks(entityName).resolvedSymbol;
                          if (!symbol) {
                              checkPropertyAccessExpression(entityName);
                          }
                          return getNodeLinks(entityName).resolvedSymbol;
                      }
                      else if (entityName.kind === 127) {
                          var symbol = getNodeLinks(entityName).resolvedSymbol;
                          if (!symbol) {
                              checkQualifiedName(entityName);
                          }
                          return getNodeLinks(entityName).resolvedSymbol;
                      }
                  }
                  else if (isTypeReferenceIdentifier(entityName)) {
                      var meaning = entityName.parent.kind === 142 ? 793056 : 1536;
                      meaning |= 8388608;
                      return resolveEntityName(entityName, meaning);
                  }
                  return undefined;
              }
              function getSymbolInfo(node) {
                  if (isInsideWithStatementBody(node)) {
                      return undefined;
                  }
                  if (ts.isDeclarationName(node)) {
                      return getSymbolOfNode(node.parent);
                  }
                  if (node.kind === 65 && isInRightSideOfImportOrExportAssignment(node)) {
                      return node.parent.kind === 215
                          ? getSymbolOfEntityNameOrPropertyAccessExpression(node)
                          : getSymbolOfPartOfRightHandSideOfImportEquals(node);
                  }
                  switch (node.kind) {
                      case 65:
                      case 156:
                      case 127:
                          return getSymbolOfEntityNameOrPropertyAccessExpression(node);
                      case 93:
                      case 91:
                          var type = checkExpression(node);
                          return type.symbol;
                      case 114:
                          var constructorDeclaration = node.parent;
                          if (constructorDeclaration && constructorDeclaration.kind === 136) {
                              return constructorDeclaration.parent.symbol;
                          }
                          return undefined;
                      case 8:
                          var moduleName;
                          if ((ts.isExternalModuleImportEqualsDeclaration(node.parent.parent) &&
                              ts.getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node) ||
                              ((node.parent.kind === 210 || node.parent.kind === 216) &&
                                  node.parent.moduleSpecifier === node)) {
                              return resolveExternalModuleName(node, node);
                          }
                      case 7:
                          if (node.parent.kind == 157 && node.parent.argumentExpression === node) {
                              var objectType = checkExpression(node.parent.expression);
                              if (objectType === unknownType)
                                  return undefined;
                              var apparentType = getApparentType(objectType);
                              if (apparentType === unknownType)
                                  return undefined;
                              return getPropertyOfType(apparentType, node.text);
                          }
                          break;
                  }
                  return undefined;
              }
              function getShorthandAssignmentValueSymbol(location) {
                  if (location && location.kind === 226) {
                      return resolveEntityName(location.name, 107455);
                  }
                  return undefined;
              }
              function getTypeOfNode(node) {
                  if (isInsideWithStatementBody(node)) {
                      return unknownType;
                  }
                  if (isTypeNode(node)) {
                      return getTypeFromTypeNode(node);
                  }
                  if (ts.isExpression(node)) {
                      return getTypeOfExpression(node);
                  }
                  if (isTypeDeclaration(node)) {
                      var symbol = getSymbolOfNode(node);
                      return getDeclaredTypeOfSymbol(symbol);
                  }
                  if (isTypeDeclarationName(node)) {
                      var symbol = getSymbolInfo(node);
                      return symbol && getDeclaredTypeOfSymbol(symbol);
                  }
                  if (ts.isDeclaration(node)) {
                      var symbol = getSymbolOfNode(node);
                      return getTypeOfSymbol(symbol);
                  }
                  if (ts.isDeclarationName(node)) {
                      var symbol = getSymbolInfo(node);
                      return symbol && getTypeOfSymbol(symbol);
                  }
                  if (isInRightSideOfImportOrExportAssignment(node)) {
                      var symbol = getSymbolInfo(node);
                      var declaredType = symbol && getDeclaredTypeOfSymbol(symbol);
                      return declaredType !== unknownType ? declaredType : getTypeOfSymbol(symbol);
                  }
                  return unknownType;
              }
              function getTypeOfExpression(expr) {
                  if (ts.isRightSideOfQualifiedNameOrPropertyAccess(expr)) {
                      expr = expr.parent;
                  }
                  return checkExpression(expr);
              }
              function getAugmentedPropertiesOfType(type) {
                  type = getApparentType(type);
                  var propsByName = createSymbolTable(getPropertiesOfType(type));
                  if (getSignaturesOfType(type, 0).length || getSignaturesOfType(type, 1).length) {
                      ts.forEach(getPropertiesOfType(globalFunctionType), function (p) {
                          if (!ts.hasProperty(propsByName, p.name)) {
                              propsByName[p.name] = p;
                          }
                      });
                  }
                  return getNamedMembers(propsByName);
              }
              function getRootSymbols(symbol) {
                  if (symbol.flags & 268435456) {
                      var symbols = [];
                      var name_10 = symbol.name;
                      ts.forEach(getSymbolLinks(symbol).unionType.types, function (t) {
                          symbols.push(getPropertyOfType(t, name_10));
                      });
                      return symbols;
                  }
                  else if (symbol.flags & 67108864) {
                      var target = getSymbolLinks(symbol).target;
                      if (target) {
                          return [target];
                      }
                  }
                  return [symbol];
              }
              function isExternalModuleSymbol(symbol) {
                  return symbol.flags & 512 && symbol.declarations.length === 1 && symbol.declarations[0].kind === 228;
              }
              function getAliasNameSubstitution(symbol, getGeneratedNameForNode) {
                  if (languageVersion >= 2) {
                      return undefined;
                  }
                  var node = getDeclarationOfAliasSymbol(symbol);
                  if (node) {
                      if (node.kind === 211) {
                          var defaultKeyword;
                          if (languageVersion === 0) {
                              defaultKeyword = "[\"default\"]";
                          }
                          else {
                              defaultKeyword = ".default";
                          }
                          return getGeneratedNameForNode(node.parent) + defaultKeyword;
                      }
                      if (node.kind === 214) {
                          var moduleName = getGeneratedNameForNode(node.parent.parent.parent);
                          var propertyName = node.propertyName || node.name;
                          return moduleName + "." + ts.unescapeIdentifier(propertyName.text);
                      }
                  }
              }
              function getExportNameSubstitution(symbol, location, getGeneratedNameForNode) {
                  if (isExternalModuleSymbol(symbol.parent)) {
                      if (languageVersion >= 2 || compilerOptions.module === 4) {
                          return undefined;
                      }
                      return "exports." + ts.unescapeIdentifier(symbol.name);
                  }
                  var node = location;
                  var containerSymbol = getParentOfSymbol(symbol);
                  while (node) {
                      if ((node.kind === 206 || node.kind === 205) && getSymbolOfNode(node) === containerSymbol) {
                          return getGeneratedNameForNode(node) + "." + ts.unescapeIdentifier(symbol.name);
                      }
                      node = node.parent;
                  }
              }
              function getExpressionNameSubstitution(node, getGeneratedNameForNode) {
                  var symbol = getNodeLinks(node).resolvedSymbol || (ts.isDeclarationName(node) ? getSymbolOfNode(node.parent) : undefined);
                  if (symbol) {
                      if (symbol.parent) {
                          return getExportNameSubstitution(symbol, node.parent, getGeneratedNameForNode);
                      }
                      var exportSymbol = getExportSymbolOfValueSymbolIfExported(symbol);
                      if (symbol !== exportSymbol && !(exportSymbol.flags & 944)) {
                          return getExportNameSubstitution(exportSymbol, node.parent, getGeneratedNameForNode);
                      }
                      if (symbol.flags & 8388608) {
                          return getAliasNameSubstitution(symbol, getGeneratedNameForNode);
                      }
                  }
              }
              function isValueAliasDeclaration(node) {
                  switch (node.kind) {
                      case 209:
                      case 211:
                      case 212:
                      case 214:
                      case 218:
                          return isAliasResolvedToValue(getSymbolOfNode(node));
                      case 216:
                          var exportClause = node.exportClause;
                          return exportClause && ts.forEach(exportClause.elements, isValueAliasDeclaration);
                      case 215:
                          return node.expression && node.expression.kind === 65 ? isAliasResolvedToValue(getSymbolOfNode(node)) : true;
                  }
                  return false;
              }
              function isTopLevelValueImportEqualsWithEntityName(node) {
                  if (node.parent.kind !== 228 || !ts.isInternalModuleImportEqualsDeclaration(node)) {
                      return false;
                  }
                  var isValue = isAliasResolvedToValue(getSymbolOfNode(node));
                  return isValue && node.moduleReference && !ts.nodeIsMissing(node.moduleReference);
              }
              function isAliasResolvedToValue(symbol) {
                  var target = resolveAlias(symbol);
                  if (target === unknownSymbol && compilerOptions.separateCompilation) {
                      return true;
                  }
                  return target !== unknownSymbol && target && target.flags & 107455 && !isConstEnumOrConstEnumOnlyModule(target);
              }
              function isConstEnumOrConstEnumOnlyModule(s) {
                  return isConstEnumSymbol(s) || s.constEnumOnlyModule;
              }
              function isReferencedAliasDeclaration(node, checkChildren) {
                  if (ts.isAliasSymbolDeclaration(node)) {
                      var symbol = getSymbolOfNode(node);
                      if (getSymbolLinks(symbol).referenced) {
                          return true;
                      }
                  }
                  if (checkChildren) {
                      return ts.forEachChild(node, function (node) { return isReferencedAliasDeclaration(node, checkChildren); });
                  }
                  return false;
              }
              function isImplementationOfOverload(node) {
                  if (ts.nodeIsPresent(node.body)) {
                      var symbol = getSymbolOfNode(node);
                      var signaturesOfSymbol = getSignaturesOfSymbol(symbol);
                      return signaturesOfSymbol.length > 1 ||
                          (signaturesOfSymbol.length === 1 && signaturesOfSymbol[0].declaration !== node);
                  }
                  return false;
              }
              function getNodeCheckFlags(node) {
                  return getNodeLinks(node).flags;
              }
              function getEnumMemberValue(node) {
                  computeEnumMemberValues(node.parent);
                  return getNodeLinks(node).enumMemberValue;
              }
              function getConstantValue(node) {
                  if (node.kind === 227) {
                      return getEnumMemberValue(node);
                  }
                  var symbol = getNodeLinks(node).resolvedSymbol;
                  if (symbol && (symbol.flags & 8)) {
                      if (ts.isConstEnumDeclaration(symbol.valueDeclaration.parent)) {
                          return getEnumMemberValue(symbol.valueDeclaration);
                      }
                  }
                  return undefined;
              }
              function serializeEntityName(node, getGeneratedNameForNode, fallbackPath) {
                  if (node.kind === 65) {
                      var substitution = getExpressionNameSubstitution(node, getGeneratedNameForNode);
                      var text = substitution || node.text;
                      if (fallbackPath) {
                          fallbackPath.push(text);
                      }
                      else {
                          return text;
                      }
                  }
                  else {
                      var left = serializeEntityName(node.left, getGeneratedNameForNode, fallbackPath);
                      var right = serializeEntityName(node.right, getGeneratedNameForNode, fallbackPath);
                      if (!fallbackPath) {
                          return left + "." + right;
                      }
                  }
              }
              function serializeTypeReferenceNode(node, getGeneratedNameForNode) {
                  var type = getTypeFromTypeNode(node);
                  if (type.flags & 16) {
                      return "void 0";
                  }
                  else if (type.flags & 8) {
                      return "Boolean";
                  }
                  else if (type.flags & 132) {
                      return "Number";
                  }
                  else if (type.flags & 258) {
                      return "String";
                  }
                  else if (type.flags & 8192) {
                      return "Array";
                  }
                  else if (type.flags & 1048576) {
                      return "Symbol";
                  }
                  else if (type === unknownType) {
                      var fallbackPath = [];
                      serializeEntityName(node.typeName, getGeneratedNameForNode, fallbackPath);
                      return fallbackPath;
                  }
                  else if (type.symbol && type.symbol.valueDeclaration) {
                      return serializeEntityName(node.typeName, getGeneratedNameForNode);
                  }
                  else if (typeHasCallOrConstructSignatures(type)) {
                      return "Function";
                  }
                  return "Object";
              }
              function serializeTypeNode(node, getGeneratedNameForNode) {
                  if (node) {
                      switch (node.kind) {
                          case 99:
                              return "void 0";
                          case 150:
                              return serializeTypeNode(node.type, getGeneratedNameForNode);
                          case 143:
                          case 144:
                              return "Function";
                          case 147:
                          case 148:
                              return "Array";
                          case 113:
                              return "Boolean";
                          case 122:
                          case 8:
                              return "String";
                          case 120:
                              return "Number";
                          case 142:
                              return serializeTypeReferenceNode(node, getGeneratedNameForNode);
                          case 145:
                          case 146:
                          case 149:
                          case 112:
                              break;
                          default:
                              ts.Debug.fail("Cannot serialize unexpected type node.");
                              break;
                      }
                  }
                  return "Object";
              }
              function serializeTypeOfNode(node, getGeneratedNameForNode) {
                  switch (node.kind) {
                      case 202: return "Function";
                      case 133: return serializeTypeNode(node.type, getGeneratedNameForNode);
                      case 130: return serializeTypeNode(node.type, getGeneratedNameForNode);
                      case 137: return serializeTypeNode(node.type, getGeneratedNameForNode);
                      case 138: return serializeTypeNode(getSetAccessorTypeAnnotationNode(node), getGeneratedNameForNode);
                  }
                  if (ts.isFunctionLike(node)) {
                      return "Function";
                  }
                  return "void 0";
              }
              function serializeParameterTypesOfNode(node, getGeneratedNameForNode) {
                  if (node) {
                      var valueDeclaration;
                      if (node.kind === 202) {
                          valueDeclaration = ts.getFirstConstructorWithBody(node);
                      }
                      else if (ts.isFunctionLike(node) && ts.nodeIsPresent(node.body)) {
                          valueDeclaration = node;
                      }
                      if (valueDeclaration) {
                          var result;
                          var parameters = valueDeclaration.parameters;
                          var parameterCount = parameters.length;
                          if (parameterCount > 0) {
                              result = new Array(parameterCount);
                              for (var i = 0; i < parameterCount; i++) {
                                  if (parameters[i].dotDotDotToken) {
                                      var parameterType = parameters[i].type;
                                      if (parameterType.kind === 147) {
                                          parameterType = parameterType.elementType;
                                      }
                                      else if (parameterType.kind === 142 && parameterType.typeArguments && parameterType.typeArguments.length === 1) {
                                          parameterType = parameterType.typeArguments[0];
                                      }
                                      else {
                                          parameterType = undefined;
                                      }
                                      result[i] = serializeTypeNode(parameterType, getGeneratedNameForNode);
                                  }
                                  else {
                                      result[i] = serializeTypeOfNode(parameters[i], getGeneratedNameForNode);
                                  }
                              }
                              return result;
                          }
                      }
                  }
                  return emptyArray;
              }
              function serializeReturnTypeOfNode(node, getGeneratedNameForNode) {
                  if (node && ts.isFunctionLike(node)) {
                      return serializeTypeNode(node.type, getGeneratedNameForNode);
                  }
                  return "void 0";
              }
              function writeTypeOfDeclaration(declaration, enclosingDeclaration, flags, writer) {
                  var symbol = getSymbolOfNode(declaration);
                  var type = symbol && !(symbol.flags & (2048 | 131072))
                      ? getTypeOfSymbol(symbol)
                      : unknownType;
                  getSymbolDisplayBuilder().buildTypeDisplay(type, writer, enclosingDeclaration, flags);
              }
              function writeReturnTypeOfSignatureDeclaration(signatureDeclaration, enclosingDeclaration, flags, writer) {
                  var signature = getSignatureFromDeclaration(signatureDeclaration);
                  getSymbolDisplayBuilder().buildTypeDisplay(getReturnTypeOfSignature(signature), writer, enclosingDeclaration, flags);
              }
              function writeTypeOfExpression(expr, enclosingDeclaration, flags, writer) {
                  var type = getTypeOfExpression(expr);
                  getSymbolDisplayBuilder().buildTypeDisplay(type, writer, enclosingDeclaration, flags);
              }
              function hasGlobalName(name) {
                  return ts.hasProperty(globals, name);
              }
              function resolvesToSomeValue(location, name) {
                  ts.Debug.assert(!ts.nodeIsSynthesized(location), "resolvesToSomeValue called with a synthesized location");
                  return !!resolveName(location, name, 107455, undefined, undefined);
              }
              function getReferencedValueDeclaration(reference) {
                  ts.Debug.assert(!ts.nodeIsSynthesized(reference));
                  var symbol = getNodeLinks(reference).resolvedSymbol ||
                      resolveName(reference, reference.text, 107455 | 8388608, undefined, undefined);
                  return symbol && getExportSymbolOfValueSymbolIfExported(symbol).valueDeclaration;
              }
              function getBlockScopedVariableId(n) {
                  ts.Debug.assert(!ts.nodeIsSynthesized(n));
                  var isVariableDeclarationOrBindingElement = n.parent.kind === 153 || (n.parent.kind === 199 && n.parent.name === n);
                  var symbol = (isVariableDeclarationOrBindingElement ? getSymbolOfNode(n.parent) : undefined) ||
                      getNodeLinks(n).resolvedSymbol ||
                      resolveName(n, n.text, 107455 | 8388608, undefined, undefined);
                  var isLetOrConst = symbol &&
                      (symbol.flags & 2) &&
                      symbol.valueDeclaration.parent.kind !== 224;
                  if (isLetOrConst) {
                      getSymbolLinks(symbol);
                      return symbol.id;
                  }
                  return undefined;
              }
              function instantiateSingleCallFunctionType(functionType, typeArguments) {
                  if (functionType === unknownType) {
                      return unknownType;
                  }
                  var signature = getSingleCallSignature(functionType);
                  if (!signature) {
                      return unknownType;
                  }
                  var instantiatedSignature = getSignatureInstantiation(signature, typeArguments);
                  return getOrCreateTypeFromSignature(instantiatedSignature);
              }
              function createResolver() {
                  return {
                      getExpressionNameSubstitution: getExpressionNameSubstitution,
                      isValueAliasDeclaration: isValueAliasDeclaration,
                      hasGlobalName: hasGlobalName,
                      isReferencedAliasDeclaration: isReferencedAliasDeclaration,
                      getNodeCheckFlags: getNodeCheckFlags,
                      isTopLevelValueImportEqualsWithEntityName: isTopLevelValueImportEqualsWithEntityName,
                      isDeclarationVisible: isDeclarationVisible,
                      isImplementationOfOverload: isImplementationOfOverload,
                      writeTypeOfDeclaration: writeTypeOfDeclaration,
                      writeReturnTypeOfSignatureDeclaration: writeReturnTypeOfSignatureDeclaration,
                      writeTypeOfExpression: writeTypeOfExpression,
                      isSymbolAccessible: isSymbolAccessible,
                      isEntityNameVisible: isEntityNameVisible,
                      getConstantValue: getConstantValue,
                      resolvesToSomeValue: resolvesToSomeValue,
                      collectLinkedAliases: collectLinkedAliases,
                      getBlockScopedVariableId: getBlockScopedVariableId,
                      getReferencedValueDeclaration: getReferencedValueDeclaration,
                      serializeTypeOfNode: serializeTypeOfNode,
                      serializeParameterTypesOfNode: serializeParameterTypesOfNode,
                      serializeReturnTypeOfNode: serializeReturnTypeOfNode
                  };
              }
              function initializeTypeChecker() {
                  ts.forEach(host.getSourceFiles(), function (file) {
                      ts.bindSourceFile(file);
                  });
                  ts.forEach(host.getSourceFiles(), function (file) {
                      if (!ts.isExternalModule(file)) {
                          mergeSymbolTable(globals, file.locals);
                      }
                  });
                  getSymbolLinks(undefinedSymbol).type = undefinedType;
                  getSymbolLinks(argumentsSymbol).type = getGlobalType("IArguments");
                  getSymbolLinks(unknownSymbol).type = unknownType;
                  globals[undefinedSymbol.name] = undefinedSymbol;
                  globalArraySymbol = getGlobalTypeSymbol("Array");
                  globalArrayType = getTypeOfGlobalSymbol(globalArraySymbol, 1);
                  globalObjectType = getGlobalType("Object");
                  globalFunctionType = getGlobalType("Function");
                  globalStringType = getGlobalType("String");
                  globalNumberType = getGlobalType("Number");
                  globalBooleanType = getGlobalType("Boolean");
                  globalRegExpType = getGlobalType("RegExp");
                  getGlobalClassDecoratorType = ts.memoize(function () { return getGlobalType("ClassDecorator"); });
                  getGlobalPropertyDecoratorType = ts.memoize(function () { return getGlobalType("PropertyDecorator"); });
                  getGlobalMethodDecoratorType = ts.memoize(function () { return getGlobalType("MethodDecorator"); });
                  getGlobalParameterDecoratorType = ts.memoize(function () { return getGlobalType("ParameterDecorator"); });
                  if (languageVersion >= 2) {
                      globalTemplateStringsArrayType = getGlobalType("TemplateStringsArray");
                      globalESSymbolType = getGlobalType("Symbol");
                      globalESSymbolConstructorSymbol = getGlobalValueSymbol("Symbol");
                      globalIterableType = getGlobalType("Iterable", 1);
                  }
                  else {
                      globalTemplateStringsArrayType = unknownType;
                      globalESSymbolType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined);
                      globalESSymbolConstructorSymbol = undefined;
                  }
                  anyArrayType = createArrayType(anyType);
              }
              function isReservedWordInStrictMode(node) {
                  return (node.parserContextFlags & 1) &&
                      (102 <= node.originalKeywordKind && node.originalKeywordKind <= 110);
              }
              function reportStrictModeGrammarErrorInClassDeclaration(identifier, message, arg0, arg1, arg2) {
                  if (ts.getAncestor(identifier, 202) || ts.getAncestor(identifier, 175)) {
                      return grammarErrorOnNode(identifier, message, arg0);
                  }
                  return false;
              }
              function checkGrammarImportDeclarationNameInStrictMode(node) {
                  if (node.importClause) {
                      var impotClause = node.importClause;
                      if (impotClause.namedBindings) {
                          var nameBindings = impotClause.namedBindings;
                          if (nameBindings.kind === 212) {
                              var name_11 = nameBindings.name;
                              if (isReservedWordInStrictMode(name_11)) {
                                  var nameText = ts.declarationNameToString(name_11);
                                  return grammarErrorOnNode(name_11, ts.Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode, nameText);
                              }
                          }
                          else if (nameBindings.kind === 213) {
                              var reportError = false;
                              for (var _i = 0, _a = nameBindings.elements; _i < _a.length; _i++) {
                                  var element = _a[_i];
                                  var name_12 = element.name;
                                  if (isReservedWordInStrictMode(name_12)) {
                                      var nameText = ts.declarationNameToString(name_12);
                                      reportError = reportError || grammarErrorOnNode(name_12, ts.Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode, nameText);
                                  }
                              }
                              return reportError;
                          }
                      }
                  }
                  return false;
              }
              function checkGrammarDeclarationNameInStrictMode(node) {
                  var name = node.name;
                  if (name && name.kind === 65 && isReservedWordInStrictMode(name)) {
                      var nameText = ts.declarationNameToString(name);
                      switch (node.kind) {
                          case 130:
                          case 199:
                          case 201:
                          case 129:
                          case 153:
                          case 203:
                          case 204:
                          case 205:
                              return checkGrammarIdentifierInStrictMode(name);
                          case 202:
                              return grammarErrorOnNode(name, ts.Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode, nameText);
                          case 206:
                              return grammarErrorOnNode(name, ts.Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode, nameText);
                          case 209:
                              return grammarErrorOnNode(name, ts.Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode, nameText);
                      }
                  }
                  return false;
              }
              function checkGrammarTypeReferenceInStrictMode(typeName) {
                  if (typeName.kind === 65) {
                      checkGrammarTypeNameInStrictMode(typeName);
                  }
                  else if (typeName.kind === 127) {
                      checkGrammarTypeNameInStrictMode(typeName.right);
                      checkGrammarTypeReferenceInStrictMode(typeName.left);
                  }
              }
              function checkGrammarExpressionWithTypeArgumentsInStrictMode(expression) {
                  if (expression && expression.kind === 65) {
                      return checkGrammarIdentifierInStrictMode(expression);
                  }
                  else if (expression && expression.kind === 156) {
                      checkGrammarExpressionWithTypeArgumentsInStrictMode(expression.expression);
                  }
              }
              function checkGrammarIdentifierInStrictMode(node, nameText) {
                  if (node && node.kind === 65 && isReservedWordInStrictMode(node)) {
                      if (!nameText) {
                          nameText = ts.declarationNameToString(node);
                      }
                      var errorReport = reportStrictModeGrammarErrorInClassDeclaration(node, ts.Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode, nameText) ||
                          grammarErrorOnNode(node, ts.Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode, nameText);
                      return errorReport;
                  }
                  return false;
              }
              function checkGrammarTypeNameInStrictMode(node) {
                  if (node && node.kind === 65 && isReservedWordInStrictMode(node)) {
                      var nameText = ts.declarationNameToString(node);
                      var errorReport = reportStrictModeGrammarErrorInClassDeclaration(node, ts.Diagnostics.Type_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode, nameText) ||
                          grammarErrorOnNode(node, ts.Diagnostics.Type_expected_0_is_a_reserved_word_in_strict_mode, nameText);
                      return errorReport;
                  }
                  return false;
              }
              function checkGrammarDecorators(node) {
                  if (!node.decorators) {
                      return false;
                  }
                  if (!ts.nodeCanBeDecorated(node)) {
                      return grammarErrorOnFirstToken(node, ts.Diagnostics.Decorators_are_not_valid_here);
                  }
                  else if (languageVersion < 1) {
                      return grammarErrorOnFirstToken(node, ts.Diagnostics.Decorators_are_only_available_when_targeting_ECMAScript_5_and_higher);
                  }
                  else if (node.kind === 137 || node.kind === 138) {
                      var accessors = ts.getAllAccessorDeclarations(node.parent.members, node);
                      if (accessors.firstAccessor.decorators && node === accessors.secondAccessor) {
                          return grammarErrorOnFirstToken(node, ts.Diagnostics.Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name);
                      }
                  }
                  return false;
              }
              function checkGrammarModifiers(node) {
                  switch (node.kind) {
                      case 137:
                      case 138:
                      case 136:
                      case 133:
                      case 132:
                      case 135:
                      case 134:
                      case 141:
                      case 202:
                      case 203:
                      case 206:
                      case 205:
                      case 181:
                      case 201:
                      case 204:
                      case 210:
                      case 209:
                      case 216:
                      case 215:
                      case 130:
                          break;
                      default:
                          return false;
                  }
                  if (!node.modifiers) {
                      return;
                  }
                  var lastStatic, lastPrivate, lastProtected, lastDeclare;
                  var flags = 0;
                  for (var _i = 0, _a = node.modifiers; _i < _a.length; _i++) {
                      var modifier = _a[_i];
                      switch (modifier.kind) {
                          case 108:
                          case 107:
                          case 106:
                              var text = void 0;
                              if (modifier.kind === 108) {
                                  text = "public";
                              }
                              else if (modifier.kind === 107) {
                                  text = "protected";
                                  lastProtected = modifier;
                              }
                              else {
                                  text = "private";
                                  lastPrivate = modifier;
                              }
                              if (flags & 112) {
                                  return grammarErrorOnNode(modifier, ts.Diagnostics.Accessibility_modifier_already_seen);
                              }
                              else if (flags & 128) {
                                  return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, text, "static");
                              }
                              else if (node.parent.kind === 207 || node.parent.kind === 228) {
                                  return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_module_element, text);
                              }
                              flags |= ts.modifierToFlag(modifier.kind);
                              break;
                          case 109:
                              if (flags & 128) {
                                  return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "static");
                              }
                              else if (node.parent.kind === 207 || node.parent.kind === 228) {
                                  return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_module_element, "static");
                              }
                              else if (node.kind === 130) {
                                  return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "static");
                              }
                              flags |= 128;
                              lastStatic = modifier;
                              break;
                          case 78:
                              if (flags & 1) {
                                  return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "export");
                              }
                              else if (flags & 2) {
                                  return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, "export", "declare");
                              }
                              else if (node.parent.kind === 202) {
                                  return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_class_element, "export");
                              }
                              else if (node.kind === 130) {
                                  return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "export");
                              }
                              flags |= 1;
                              break;
                          case 115:
                              if (flags & 2) {
                                  return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "declare");
                              }
                              else if (node.parent.kind === 202) {
                                  return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_class_element, "declare");
                              }
                              else if (node.kind === 130) {
                                  return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "declare");
                              }
                              else if (ts.isInAmbientContext(node.parent) && node.parent.kind === 207) {
                                  return grammarErrorOnNode(modifier, ts.Diagnostics.A_declare_modifier_cannot_be_used_in_an_already_ambient_context);
                              }
                              flags |= 2;
                              lastDeclare = modifier;
                              break;
                      }
                  }
                  if (node.kind === 136) {
                      if (flags & 128) {
                          return grammarErrorOnNode(lastStatic, ts.Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "static");
                      }
                      else if (flags & 64) {
                          return grammarErrorOnNode(lastProtected, ts.Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "protected");
                      }
                      else if (flags & 32) {
                          return grammarErrorOnNode(lastPrivate, ts.Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "private");
                      }
                  }
                  else if ((node.kind === 210 || node.kind === 209) && flags & 2) {
                      return grammarErrorOnNode(lastDeclare, ts.Diagnostics.A_declare_modifier_cannot_be_used_with_an_import_declaration, "declare");
                  }
                  else if (node.kind === 203 && flags & 2) {
                      return grammarErrorOnNode(lastDeclare, ts.Diagnostics.A_declare_modifier_cannot_be_used_with_an_interface_declaration, "declare");
                  }
                  else if (node.kind === 130 && (flags & 112) && ts.isBindingPattern(node.name)) {
                      return grammarErrorOnNode(node, ts.Diagnostics.A_parameter_property_may_not_be_a_binding_pattern);
                  }
              }
              function checkGrammarForDisallowedTrailingComma(list) {
                  if (list && list.hasTrailingComma) {
                      var start = list.end - ",".length;
                      var end = list.end;
                      var sourceFile = ts.getSourceFileOfNode(list[0]);
                      return grammarErrorAtPos(sourceFile, start, end - start, ts.Diagnostics.Trailing_comma_not_allowed);
                  }
              }
              function checkGrammarTypeParameterList(node, typeParameters, file) {
                  if (checkGrammarForDisallowedTrailingComma(typeParameters)) {
                      return true;
                  }
                  if (typeParameters && typeParameters.length === 0) {
                      var start = typeParameters.pos - "<".length;
                      var end = ts.skipTrivia(file.text, typeParameters.end) + ">".length;
                      return grammarErrorAtPos(file, start, end - start, ts.Diagnostics.Type_parameter_list_cannot_be_empty);
                  }
              }
              function checkGrammarParameterList(parameters) {
                  if (checkGrammarForDisallowedTrailingComma(parameters)) {
                      return true;
                  }
                  var seenOptionalParameter = false;
                  var parameterCount = parameters.length;
                  for (var i = 0; i < parameterCount; i++) {
                      var parameter = parameters[i];
                      if (parameter.dotDotDotToken) {
                          if (i !== (parameterCount - 1)) {
                              return grammarErrorOnNode(parameter.dotDotDotToken, ts.Diagnostics.A_rest_parameter_must_be_last_in_a_parameter_list);
                          }
                          if (ts.isBindingPattern(parameter.name)) {
                              return grammarErrorOnNode(parameter.name, ts.Diagnostics.A_rest_element_cannot_contain_a_binding_pattern);
                          }
                          if (parameter.questionToken) {
                              return grammarErrorOnNode(parameter.questionToken, ts.Diagnostics.A_rest_parameter_cannot_be_optional);
                          }
                          if (parameter.initializer) {
                              return grammarErrorOnNode(parameter.name, ts.Diagnostics.A_rest_parameter_cannot_have_an_initializer);
                          }
                      }
                      else if (parameter.questionToken || parameter.initializer) {
                          seenOptionalParameter = true;
                          if (parameter.questionToken && parameter.initializer) {
                              return grammarErrorOnNode(parameter.name, ts.Diagnostics.Parameter_cannot_have_question_mark_and_initializer);
                          }
                      }
                      else {
                          if (seenOptionalParameter) {
                              return grammarErrorOnNode(parameter.name, ts.Diagnostics.A_required_parameter_cannot_follow_an_optional_parameter);
                          }
                      }
                  }
              }
              function checkGrammarFunctionLikeDeclaration(node) {
                  var file = ts.getSourceFileOfNode(node);
                  return checkGrammarDecorators(node) || checkGrammarModifiers(node) || checkGrammarTypeParameterList(node, node.typeParameters, file) ||
                      checkGrammarParameterList(node.parameters) || checkGrammarArrowFunction(node, file);
              }
              function checkGrammarArrowFunction(node, file) {
                  if (node.kind === 164) {
                      var arrowFunction = node;
                      var startLine = ts.getLineAndCharacterOfPosition(file, arrowFunction.equalsGreaterThanToken.pos).line;
                      var endLine = ts.getLineAndCharacterOfPosition(file, arrowFunction.equalsGreaterThanToken.end).line;
                      if (startLine !== endLine) {
                          return grammarErrorOnNode(arrowFunction.equalsGreaterThanToken, ts.Diagnostics.Line_terminator_not_permitted_before_arrow);
                      }
                  }
                  return false;
              }
              function checkGrammarIndexSignatureParameters(node) {
                  var parameter = node.parameters[0];
                  if (node.parameters.length !== 1) {
                      if (parameter) {
                          return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_must_have_exactly_one_parameter);
                      }
                      else {
                          return grammarErrorOnNode(node, ts.Diagnostics.An_index_signature_must_have_exactly_one_parameter);
                      }
                  }
                  if (parameter.dotDotDotToken) {
                      return grammarErrorOnNode(parameter.dotDotDotToken, ts.Diagnostics.An_index_signature_cannot_have_a_rest_parameter);
                  }
                  if (parameter.flags & 499) {
                      return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_cannot_have_an_accessibility_modifier);
                  }
                  if (parameter.questionToken) {
                      return grammarErrorOnNode(parameter.questionToken, ts.Diagnostics.An_index_signature_parameter_cannot_have_a_question_mark);
                  }
                  if (parameter.initializer) {
                      return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_cannot_have_an_initializer);
                  }
                  if (!parameter.type) {
                      return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_must_have_a_type_annotation);
                  }
                  if (parameter.type.kind !== 122 && parameter.type.kind !== 120) {
                      return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_type_must_be_string_or_number);
                  }
                  if (!node.type) {
                      return grammarErrorOnNode(node, ts.Diagnostics.An_index_signature_must_have_a_type_annotation);
                  }
              }
              function checkGrammarForIndexSignatureModifier(node) {
                  if (node.flags & 499) {
                      grammarErrorOnFirstToken(node, ts.Diagnostics.Modifiers_not_permitted_on_index_signature_members);
                  }
              }
              function checkGrammarIndexSignature(node) {
                  return checkGrammarDecorators(node) || checkGrammarModifiers(node) || checkGrammarIndexSignatureParameters(node) || checkGrammarForIndexSignatureModifier(node);
              }
              function checkGrammarForAtLeastOneTypeArgument(node, typeArguments) {
                  if (typeArguments && typeArguments.length === 0) {
                      var sourceFile = ts.getSourceFileOfNode(node);
                      var start = typeArguments.pos - "<".length;
                      var end = ts.skipTrivia(sourceFile.text, typeArguments.end) + ">".length;
                      return grammarErrorAtPos(sourceFile, start, end - start, ts.Diagnostics.Type_argument_list_cannot_be_empty);
                  }
              }
              function checkGrammarTypeArguments(node, typeArguments) {
                  return checkGrammarForDisallowedTrailingComma(typeArguments) ||
                      checkGrammarForAtLeastOneTypeArgument(node, typeArguments);
              }
              function checkGrammarForOmittedArgument(node, arguments) {
                  if (arguments) {
                      var sourceFile = ts.getSourceFileOfNode(node);
                      for (var _i = 0; _i < arguments.length; _i++) {
                          var arg = arguments[_i];
                          if (arg.kind === 176) {
                              return grammarErrorAtPos(sourceFile, arg.pos, 0, ts.Diagnostics.Argument_expression_expected);
                          }
                      }
                  }
              }
              function checkGrammarArguments(node, arguments) {
                  return checkGrammarForDisallowedTrailingComma(arguments) ||
                      checkGrammarForOmittedArgument(node, arguments);
              }
              function checkGrammarHeritageClause(node) {
                  var types = node.types;
                  if (checkGrammarForDisallowedTrailingComma(types)) {
                      return true;
                  }
                  if (types && types.length === 0) {
                      var listType = ts.tokenToString(node.token);
                      var sourceFile = ts.getSourceFileOfNode(node);
                      return grammarErrorAtPos(sourceFile, types.pos, 0, ts.Diagnostics._0_list_cannot_be_empty, listType);
                  }
              }
              function checkGrammarClassDeclarationHeritageClauses(node) {
                  var seenExtendsClause = false;
                  var seenImplementsClause = false;
                  if (!checkGrammarDecorators(node) && !checkGrammarModifiers(node) && node.heritageClauses) {
                      for (var _i = 0, _a = node.heritageClauses; _i < _a.length; _i++) {
                          var heritageClause = _a[_i];
                          if (heritageClause.token === 79) {
                              if (seenExtendsClause) {
                                  return grammarErrorOnFirstToken(heritageClause, ts.Diagnostics.extends_clause_already_seen);
                              }
                              if (seenImplementsClause) {
                                  return grammarErrorOnFirstToken(heritageClause, ts.Diagnostics.extends_clause_must_precede_implements_clause);
                              }
                              if (heritageClause.types.length > 1) {
                                  return grammarErrorOnFirstToken(heritageClause.types[1], ts.Diagnostics.Classes_can_only_extend_a_single_class);
                              }
                              seenExtendsClause = true;
                          }
                          else {
                              ts.Debug.assert(heritageClause.token === 102);
                              if (seenImplementsClause) {
                                  return grammarErrorOnFirstToken(heritageClause, ts.Diagnostics.implements_clause_already_seen);
                              }
                              seenImplementsClause = true;
                          }
                          checkGrammarHeritageClause(heritageClause);
                      }
                  }
              }
              function checkGrammarInterfaceDeclaration(node) {
                  var seenExtendsClause = false;
                  if (node.heritageClauses) {
                      for (var _i = 0, _a = node.heritageClauses; _i < _a.length; _i++) {
                          var heritageClause = _a[_i];
                          if (heritageClause.token === 79) {
                              if (seenExtendsClause) {
                                  return grammarErrorOnFirstToken(heritageClause, ts.Diagnostics.extends_clause_already_seen);
                              }
                              seenExtendsClause = true;
                          }
                          else {
                              ts.Debug.assert(heritageClause.token === 102);
                              return grammarErrorOnFirstToken(heritageClause, ts.Diagnostics.Interface_declaration_cannot_have_implements_clause);
                          }
                          checkGrammarHeritageClause(heritageClause);
                      }
                  }
                  return false;
              }
              function checkGrammarComputedPropertyName(node) {
                  if (node.kind !== 128) {
                      return false;
                  }
                  var computedPropertyName = node;
                  if (computedPropertyName.expression.kind === 170 && computedPropertyName.expression.operatorToken.kind === 23) {
                      return grammarErrorOnNode(computedPropertyName.expression, ts.Diagnostics.A_comma_expression_is_not_allowed_in_a_computed_property_name);
                  }
              }
              function checkGrammarForGenerator(node) {
                  if (node.asteriskToken) {
                      return grammarErrorOnNode(node.asteriskToken, ts.Diagnostics.Generators_are_not_currently_supported);
                  }
              }
              function checkGrammarFunctionName(name) {
                  return checkGrammarEvalOrArgumentsInStrictMode(name, name);
              }
              function checkGrammarForInvalidQuestionMark(node, questionToken, message) {
                  if (questionToken) {
                      return grammarErrorOnNode(questionToken, message);
                  }
              }
              function checkGrammarObjectLiteralExpression(node) {
                  var seen = {};
                  var Property = 1;
                  var GetAccessor = 2;
                  var SetAccesor = 4;
                  var GetOrSetAccessor = GetAccessor | SetAccesor;
                  var inStrictMode = (node.parserContextFlags & 1) !== 0;
                  for (var _i = 0, _a = node.properties; _i < _a.length; _i++) {
                      var prop = _a[_i];
                      var name_13 = prop.name;
                      if (prop.kind === 176 ||
                          name_13.kind === 128) {
                          checkGrammarComputedPropertyName(name_13);
                          continue;
                      }
                      var currentKind = void 0;
                      if (prop.kind === 225 || prop.kind === 226) {
                          checkGrammarForInvalidQuestionMark(prop, prop.questionToken, ts.Diagnostics.An_object_member_cannot_be_declared_optional);
                          if (name_13.kind === 7) {
                              checkGrammarNumericLiteral(name_13);
                          }
                          currentKind = Property;
                      }
                      else if (prop.kind === 135) {
                          currentKind = Property;
                      }
                      else if (prop.kind === 137) {
                          currentKind = GetAccessor;
                      }
                      else if (prop.kind === 138) {
                          currentKind = SetAccesor;
                      }
                      else {
                          ts.Debug.fail("Unexpected syntax kind:" + prop.kind);
                      }
                      if (!ts.hasProperty(seen, name_13.text)) {
                          seen[name_13.text] = currentKind;
                      }
                      else {
                          var existingKind = seen[name_13.text];
                          if (currentKind === Property && existingKind === Property) {
                              if (inStrictMode) {
                                  grammarErrorOnNode(name_13, ts.Diagnostics.An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode);
                              }
                          }
                          else if ((currentKind & GetOrSetAccessor) && (existingKind & GetOrSetAccessor)) {
                              if (existingKind !== GetOrSetAccessor && currentKind !== existingKind) {
                                  seen[name_13.text] = currentKind | existingKind;
                              }
                              else {
                                  return grammarErrorOnNode(name_13, ts.Diagnostics.An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name);
                              }
                          }
                          else {
                              return grammarErrorOnNode(name_13, ts.Diagnostics.An_object_literal_cannot_have_property_and_accessor_with_the_same_name);
                          }
                      }
                  }
              }
              function checkGrammarForInOrForOfStatement(forInOrOfStatement) {
                  if (checkGrammarStatementInAmbientContext(forInOrOfStatement)) {
                      return true;
                  }
                  if (forInOrOfStatement.initializer.kind === 200) {
                      var variableList = forInOrOfStatement.initializer;
                      if (!checkGrammarVariableDeclarationList(variableList)) {
                          if (variableList.declarations.length > 1) {
                              var diagnostic = forInOrOfStatement.kind === 188
                                  ? ts.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement
                                  : ts.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement;
                              return grammarErrorOnFirstToken(variableList.declarations[1], diagnostic);
                          }
                          var firstDeclaration = variableList.declarations[0];
                          if (firstDeclaration.initializer) {
                              var diagnostic = forInOrOfStatement.kind === 188
                                  ? ts.Diagnostics.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer
                                  : ts.Diagnostics.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer;
                              return grammarErrorOnNode(firstDeclaration.name, diagnostic);
                          }
                          if (firstDeclaration.type) {
                              var diagnostic = forInOrOfStatement.kind === 188
                                  ? ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation
                                  : ts.Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation;
                              return grammarErrorOnNode(firstDeclaration, diagnostic);
                          }
                      }
                  }
                  return false;
              }
              function checkGrammarAccessor(accessor) {
                  var kind = accessor.kind;
                  if (languageVersion < 1) {
                      return grammarErrorOnNode(accessor.name, ts.Diagnostics.Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher);
                  }
                  else if (ts.isInAmbientContext(accessor)) {
                      return grammarErrorOnNode(accessor.name, ts.Diagnostics.An_accessor_cannot_be_declared_in_an_ambient_context);
                  }
                  else if (accessor.body === undefined) {
                      return grammarErrorAtPos(ts.getSourceFileOfNode(accessor), accessor.end - 1, ";".length, ts.Diagnostics._0_expected, "{");
                  }
                  else if (accessor.typeParameters) {
                      return grammarErrorOnNode(accessor.name, ts.Diagnostics.An_accessor_cannot_have_type_parameters);
                  }
                  else if (kind === 137 && accessor.parameters.length) {
                      return grammarErrorOnNode(accessor.name, ts.Diagnostics.A_get_accessor_cannot_have_parameters);
                  }
                  else if (kind === 138) {
                      if (accessor.type) {
                          return grammarErrorOnNode(accessor.name, ts.Diagnostics.A_set_accessor_cannot_have_a_return_type_annotation);
                      }
                      else if (accessor.parameters.length !== 1) {
                          return grammarErrorOnNode(accessor.name, ts.Diagnostics.A_set_accessor_must_have_exactly_one_parameter);
                      }
                      else {
                          var parameter = accessor.parameters[0];
                          if (parameter.dotDotDotToken) {
                              return grammarErrorOnNode(parameter.dotDotDotToken, ts.Diagnostics.A_set_accessor_cannot_have_rest_parameter);
                          }
                          else if (parameter.flags & 499) {
                              return grammarErrorOnNode(accessor.name, ts.Diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation);
                          }
                          else if (parameter.questionToken) {
                              return grammarErrorOnNode(parameter.questionToken, ts.Diagnostics.A_set_accessor_cannot_have_an_optional_parameter);
                          }
                          else if (parameter.initializer) {
                              return grammarErrorOnNode(accessor.name, ts.Diagnostics.A_set_accessor_parameter_cannot_have_an_initializer);
                          }
                      }
                  }
              }
              function checkGrammarForNonSymbolComputedProperty(node, message) {
                  if (node.kind === 128 && !ts.isWellKnownSymbolSyntactically(node.expression)) {
                      return grammarErrorOnNode(node, message);
                  }
              }
              function checkGrammarMethod(node) {
                  if (checkGrammarDisallowedModifiersInBlockOrObjectLiteralExpression(node) ||
                      checkGrammarFunctionLikeDeclaration(node) ||
                      checkGrammarForGenerator(node)) {
                      return true;
                  }
                  if (node.parent.kind === 155) {
                      if (checkGrammarForInvalidQuestionMark(node, node.questionToken, ts.Diagnostics.A_class_member_cannot_be_declared_optional)) {
                          return true;
                      }
                      else if (node.body === undefined) {
                          return grammarErrorAtPos(getSourceFile(node), node.end - 1, ";".length, ts.Diagnostics._0_expected, "{");
                      }
                  }
                  if (node.parent.kind === 202) {
                      if (checkGrammarForInvalidQuestionMark(node, node.questionToken, ts.Diagnostics.A_class_member_cannot_be_declared_optional)) {
                          return true;
                      }
                      if (ts.isInAmbientContext(node)) {
                          return checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_an_ambient_context_must_directly_refer_to_a_built_in_symbol);
                      }
                      else if (!node.body) {
                          return checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_a_method_overload_must_directly_refer_to_a_built_in_symbol);
                      }
                  }
                  else if (node.parent.kind === 203) {
                      return checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_an_interface_must_directly_refer_to_a_built_in_symbol);
                  }
                  else if (node.parent.kind === 146) {
                      return checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_a_type_literal_must_directly_refer_to_a_built_in_symbol);
                  }
              }
              function isIterationStatement(node, lookInLabeledStatements) {
                  switch (node.kind) {
                      case 187:
                      case 188:
                      case 189:
                      case 185:
                      case 186:
                          return true;
                      case 195:
                          return lookInLabeledStatements && isIterationStatement(node.statement, lookInLabeledStatements);
                  }
                  return false;
              }
              function checkGrammarBreakOrContinueStatement(node) {
                  var current = node;
                  while (current) {
                      if (ts.isFunctionLike(current)) {
                          return grammarErrorOnNode(node, ts.Diagnostics.Jump_target_cannot_cross_function_boundary);
                      }
                      switch (current.kind) {
                          case 195:
                              if (node.label && current.label.text === node.label.text) {
                                  var isMisplacedContinueLabel = node.kind === 190
                                      && !isIterationStatement(current.statement, true);
                                  if (isMisplacedContinueLabel) {
                                      return grammarErrorOnNode(node, ts.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement);
                                  }
                                  return false;
                              }
                              break;
                          case 194:
                              if (node.kind === 191 && !node.label) {
                                  return false;
                              }
                              break;
                          default:
                              if (isIterationStatement(current, false) && !node.label) {
                                  return false;
                              }
                              break;
                      }
                      current = current.parent;
                  }
                  if (node.label) {
                      var message = node.kind === 191
                          ? ts.Diagnostics.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement
                          : ts.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement;
                      return grammarErrorOnNode(node, message);
                  }
                  else {
                      var message = node.kind === 191
                          ? ts.Diagnostics.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement
                          : ts.Diagnostics.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement;
                      return grammarErrorOnNode(node, message);
                  }
              }
              function checkGrammarBindingElement(node) {
                  if (node.dotDotDotToken) {
                      var elements = node.parent.elements;
                      if (node !== ts.lastOrUndefined(elements)) {
                          return grammarErrorOnNode(node, ts.Diagnostics.A_rest_element_must_be_last_in_an_array_destructuring_pattern);
                      }
                      if (node.name.kind === 152 || node.name.kind === 151) {
                          return grammarErrorOnNode(node.name, ts.Diagnostics.A_rest_element_cannot_contain_a_binding_pattern);
                      }
                      if (node.initializer) {
                          return grammarErrorAtPos(ts.getSourceFileOfNode(node), node.initializer.pos - 1, 1, ts.Diagnostics.A_rest_element_cannot_have_an_initializer);
                      }
                  }
                  return checkGrammarEvalOrArgumentsInStrictMode(node, node.name);
              }
              function checkGrammarVariableDeclaration(node) {
                  if (node.parent.parent.kind !== 188 && node.parent.parent.kind !== 189) {
                      if (ts.isInAmbientContext(node)) {
                          if (node.initializer) {
                              var equalsTokenLength = "=".length;
                              return grammarErrorAtPos(ts.getSourceFileOfNode(node), node.initializer.pos - equalsTokenLength, equalsTokenLength, ts.Diagnostics.Initializers_are_not_allowed_in_ambient_contexts);
                          }
                      }
                      else if (!node.initializer) {
                          if (ts.isBindingPattern(node.name) && !ts.isBindingPattern(node.parent)) {
                              return grammarErrorOnNode(node, ts.Diagnostics.A_destructuring_declaration_must_have_an_initializer);
                          }
                          if (ts.isConst(node)) {
                              return grammarErrorOnNode(node, ts.Diagnostics.const_declarations_must_be_initialized);
                          }
                      }
                  }
                  var checkLetConstNames = languageVersion >= 2 && (ts.isLet(node) || ts.isConst(node));
                  return (checkLetConstNames && checkGrammarNameInLetOrConstDeclarations(node.name)) ||
                      checkGrammarEvalOrArgumentsInStrictMode(node, node.name);
              }
              function checkGrammarNameInLetOrConstDeclarations(name) {
                  if (name.kind === 65) {
                      if (name.text === "let") {
                          return grammarErrorOnNode(name, ts.Diagnostics.let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations);
                      }
                  }
                  else {
                      var elements = name.elements;
                      for (var _i = 0; _i < elements.length; _i++) {
                          var element = elements[_i];
                          if (element.kind !== 176) {
                              checkGrammarNameInLetOrConstDeclarations(element.name);
                          }
                      }
                  }
              }
              function checkGrammarVariableDeclarationList(declarationList) {
                  var declarations = declarationList.declarations;
                  if (checkGrammarForDisallowedTrailingComma(declarationList.declarations)) {
                      return true;
                  }
                  if (!declarationList.declarations.length) {
                      return grammarErrorAtPos(ts.getSourceFileOfNode(declarationList), declarations.pos, declarations.end - declarations.pos, ts.Diagnostics.Variable_declaration_list_cannot_be_empty);
                  }
              }
              function allowLetAndConstDeclarations(parent) {
                  switch (parent.kind) {
                      case 184:
                      case 185:
                      case 186:
                      case 193:
                      case 187:
                      case 188:
                      case 189:
                          return false;
                      case 195:
                          return allowLetAndConstDeclarations(parent.parent);
                  }
                  return true;
              }
              function checkGrammarForDisallowedLetOrConstStatement(node) {
                  if (!allowLetAndConstDeclarations(node.parent)) {
                      if (ts.isLet(node.declarationList)) {
                          return grammarErrorOnNode(node, ts.Diagnostics.let_declarations_can_only_be_declared_inside_a_block);
                      }
                      else if (ts.isConst(node.declarationList)) {
                          return grammarErrorOnNode(node, ts.Diagnostics.const_declarations_can_only_be_declared_inside_a_block);
                      }
                  }
              }
              function isIntegerLiteral(expression) {
                  if (expression.kind === 168) {
                      var unaryExpression = expression;
                      if (unaryExpression.operator === 33 || unaryExpression.operator === 34) {
                          expression = unaryExpression.operand;
                      }
                  }
                  if (expression.kind === 7) {
                      return /^[0-9]+([eE]\+?[0-9]+)?$/.test(expression.text);
                  }
                  return false;
              }
              function checkGrammarEnumDeclaration(enumDecl) {
                  var enumIsConst = (enumDecl.flags & 8192) !== 0;
                  var hasError = false;
                  if (!enumIsConst) {
                      var inConstantEnumMemberSection = true;
                      var inAmbientContext = ts.isInAmbientContext(enumDecl);
                      for (var _i = 0, _a = enumDecl.members; _i < _a.length; _i++) {
                          var node = _a[_i];
                          if (node.name.kind === 128) {
                              hasError = grammarErrorOnNode(node.name, ts.Diagnostics.Computed_property_names_are_not_allowed_in_enums);
                          }
                          else if (inAmbientContext) {
                              if (node.initializer && !isIntegerLiteral(node.initializer)) {
                                  hasError = grammarErrorOnNode(node.name, ts.Diagnostics.Ambient_enum_elements_can_only_have_integer_literal_initializers) || hasError;
                              }
                          }
                          else if (node.initializer) {
                              inConstantEnumMemberSection = isIntegerLiteral(node.initializer);
                          }
                          else if (!inConstantEnumMemberSection) {
                              hasError = grammarErrorOnNode(node.name, ts.Diagnostics.Enum_member_must_have_initializer) || hasError;
                          }
                      }
                  }
                  return hasError;
              }
              function hasParseDiagnostics(sourceFile) {
                  return sourceFile.parseDiagnostics.length > 0;
              }
              function grammarErrorOnFirstToken(node, message, arg0, arg1, arg2) {
                  var sourceFile = ts.getSourceFileOfNode(node);
                  if (!hasParseDiagnostics(sourceFile)) {
                      var span = ts.getSpanOfTokenAtPosition(sourceFile, node.pos);
                      diagnostics.add(ts.createFileDiagnostic(sourceFile, span.start, span.length, message, arg0, arg1, arg2));
                      return true;
                  }
              }
              function grammarErrorAtPos(sourceFile, start, length, message, arg0, arg1, arg2) {
                  if (!hasParseDiagnostics(sourceFile)) {
                      diagnostics.add(ts.createFileDiagnostic(sourceFile, start, length, message, arg0, arg1, arg2));
                      return true;
                  }
              }
              function grammarErrorOnNode(node, message, arg0, arg1, arg2) {
                  var sourceFile = ts.getSourceFileOfNode(node);
                  if (!hasParseDiagnostics(sourceFile)) {
                      diagnostics.add(ts.createDiagnosticForNode(node, message, arg0, arg1, arg2));
                      return true;
                  }
              }
              function checkGrammarEvalOrArgumentsInStrictMode(contextNode, name) {
                  if (name && name.kind === 65) {
                      var identifier = name;
                      if (contextNode && (contextNode.parserContextFlags & 1) && isEvalOrArgumentsIdentifier(identifier)) {
                          var nameText = ts.declarationNameToString(identifier);
                          var reportErrorInClassDeclaration = reportStrictModeGrammarErrorInClassDeclaration(identifier, ts.Diagnostics.Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode, nameText);
                          if (!reportErrorInClassDeclaration) {
                              return grammarErrorOnNode(identifier, ts.Diagnostics.Invalid_use_of_0_in_strict_mode, nameText);
                          }
                          return reportErrorInClassDeclaration;
                      }
                  }
              }
              function isEvalOrArgumentsIdentifier(node) {
                  return node.kind === 65 &&
                      (node.text === "eval" || node.text === "arguments");
              }
              function checkGrammarConstructorTypeParameters(node) {
                  if (node.typeParameters) {
                      return grammarErrorAtPos(ts.getSourceFileOfNode(node), node.typeParameters.pos, node.typeParameters.end - node.typeParameters.pos, ts.Diagnostics.Type_parameters_cannot_appear_on_a_constructor_declaration);
                  }
              }
              function checkGrammarConstructorTypeAnnotation(node) {
                  if (node.type) {
                      return grammarErrorOnNode(node.type, ts.Diagnostics.Type_annotation_cannot_appear_on_a_constructor_declaration);
                  }
              }
              function checkGrammarProperty(node) {
                  if (node.parent.kind === 202) {
                      if (checkGrammarForInvalidQuestionMark(node, node.questionToken, ts.Diagnostics.A_class_member_cannot_be_declared_optional) ||
                          checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_a_class_property_declaration_must_directly_refer_to_a_built_in_symbol)) {
                          return true;
                      }
                  }
                  else if (node.parent.kind === 203) {
                      if (checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_an_interface_must_directly_refer_to_a_built_in_symbol)) {
                          return true;
                      }
                  }
                  else if (node.parent.kind === 146) {
                      if (checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_a_type_literal_must_directly_refer_to_a_built_in_symbol)) {
                          return true;
                      }
                  }
                  if (ts.isInAmbientContext(node) && node.initializer) {
                      return grammarErrorOnFirstToken(node.initializer, ts.Diagnostics.Initializers_are_not_allowed_in_ambient_contexts);
                  }
              }
              function checkGrammarTopLevelElementForRequiredDeclareModifier(node) {
                  if (node.kind === 203 ||
                      node.kind === 210 ||
                      node.kind === 209 ||
                      node.kind === 216 ||
                      node.kind === 215 ||
                      (node.flags & 2) ||
                      (node.flags & (1 | 256))) {
                      return false;
                  }
                  return grammarErrorOnFirstToken(node, ts.Diagnostics.A_declare_modifier_is_required_for_a_top_level_declaration_in_a_d_ts_file);
              }
              function checkGrammarTopLevelElementsForRequiredDeclareModifier(file) {
                  for (var _i = 0, _a = file.statements; _i < _a.length; _i++) {
                      var decl = _a[_i];
                      if (ts.isDeclaration(decl) || decl.kind === 181) {
                          if (checkGrammarTopLevelElementForRequiredDeclareModifier(decl)) {
                              return true;
                          }
                      }
                  }
              }
              function checkGrammarSourceFile(node) {
                  return ts.isInAmbientContext(node) && checkGrammarTopLevelElementsForRequiredDeclareModifier(node);
              }
              function checkGrammarStatementInAmbientContext(node) {
                  if (ts.isInAmbientContext(node)) {
                      if (isAccessor(node.parent.kind)) {
                          return getNodeLinks(node).hasReportedStatementInAmbientContext = true;
                      }
                      var links = getNodeLinks(node);
                      if (!links.hasReportedStatementInAmbientContext && ts.isFunctionLike(node.parent)) {
                          return getNodeLinks(node).hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, ts.Diagnostics.An_implementation_cannot_be_declared_in_ambient_contexts);
                      }
                      if (node.parent.kind === 180 || node.parent.kind === 207 || node.parent.kind === 228) {
                          var links_1 = getNodeLinks(node.parent);
                          if (!links_1.hasReportedStatementInAmbientContext) {
                              return links_1.hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, ts.Diagnostics.Statements_are_not_allowed_in_ambient_contexts);
                          }
                      }
                      else {
                      }
                  }
              }
              function checkGrammarNumericLiteral(node) {
                  if (node.flags & 16384) {
                      if (node.parserContextFlags & 1) {
                          return grammarErrorOnNode(node, ts.Diagnostics.Octal_literals_are_not_allowed_in_strict_mode);
                      }
                      else if (languageVersion >= 1) {
                          return grammarErrorOnNode(node, ts.Diagnostics.Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher);
                      }
                  }
              }
              function grammarErrorAfterFirstToken(node, message, arg0, arg1, arg2) {
                  var sourceFile = ts.getSourceFileOfNode(node);
                  if (!hasParseDiagnostics(sourceFile)) {
                      var span = ts.getSpanOfTokenAtPosition(sourceFile, node.pos);
                      diagnostics.add(ts.createFileDiagnostic(sourceFile, ts.textSpanEnd(span), 0, message, arg0, arg1, arg2));
                      return true;
                  }
              }
              initializeTypeChecker();
              return checker;
          }
          ts.createTypeChecker = createTypeChecker;
      })(ts || (ts = {}));
      /// <reference path="checker.ts"/>
      var ts;
      (function (ts) {
          function getDeclarationDiagnostics(host, resolver, targetSourceFile) {
              var diagnostics = [];
              var jsFilePath = ts.getOwnEmitOutputFilePath(targetSourceFile, host, ".js");
              emitDeclarations(host, resolver, diagnostics, jsFilePath, targetSourceFile);
              return diagnostics;
          }
          ts.getDeclarationDiagnostics = getDeclarationDiagnostics;
          function emitDeclarations(host, resolver, diagnostics, jsFilePath, root) {
              var newLine = host.getNewLine();
              var compilerOptions = host.getCompilerOptions();
              var languageVersion = compilerOptions.target || 0;
              var write;
              var writeLine;
              var increaseIndent;
              var decreaseIndent;
              var writeTextOfNode;
              var writer = createAndSetNewTextWriterWithSymbolWriter();
              var enclosingDeclaration;
              var currentSourceFile;
              var reportedDeclarationError = false;
              var emitJsDocComments = compilerOptions.removeComments ? function (declaration) { } : writeJsDocComments;
              var emit = compilerOptions.stripInternal ? stripInternal : emitNode;
              var moduleElementDeclarationEmitInfo = [];
              var asynchronousSubModuleDeclarationEmitInfo;
              var referencePathsOutput = "";
              if (root) {
                  if (!compilerOptions.noResolve) {
                      var addedGlobalFileReference = false;
                      ts.forEach(root.referencedFiles, function (fileReference) {
                          var referencedFile = ts.tryResolveScriptReference(host, root, fileReference);
                          if (referencedFile && ((referencedFile.flags & 2048) ||
                              ts.shouldEmitToOwnFile(referencedFile, compilerOptions) ||
                              !addedGlobalFileReference)) {
                              writeReferencePath(referencedFile);
                              if (!ts.isExternalModuleOrDeclarationFile(referencedFile)) {
                                  addedGlobalFileReference = true;
                              }
                          }
                      });
                  }
                  emitSourceFile(root);
                  if (moduleElementDeclarationEmitInfo.length) {
                      var oldWriter = writer;
                      ts.forEach(moduleElementDeclarationEmitInfo, function (aliasEmitInfo) {
                          if (aliasEmitInfo.isVisible) {
                              ts.Debug.assert(aliasEmitInfo.node.kind === 210);
                              createAndSetNewTextWriterWithSymbolWriter();
                              ts.Debug.assert(aliasEmitInfo.indent === 0);
                              writeImportDeclaration(aliasEmitInfo.node);
                              aliasEmitInfo.asynchronousOutput = writer.getText();
                          }
                      });
                      setWriter(oldWriter);
                  }
              }
              else {
                  var emittedReferencedFiles = [];
                  ts.forEach(host.getSourceFiles(), function (sourceFile) {
                      if (!ts.isExternalModuleOrDeclarationFile(sourceFile)) {
                          if (!compilerOptions.noResolve) {
                              ts.forEach(sourceFile.referencedFiles, function (fileReference) {
                                  var referencedFile = ts.tryResolveScriptReference(host, sourceFile, fileReference);
                                  if (referencedFile && (ts.isExternalModuleOrDeclarationFile(referencedFile) &&
                                      !ts.contains(emittedReferencedFiles, referencedFile))) {
                                      writeReferencePath(referencedFile);
                                      emittedReferencedFiles.push(referencedFile);
                                  }
                              });
                          }
                          emitSourceFile(sourceFile);
                      }
                  });
              }
              return {
                  reportedDeclarationError: reportedDeclarationError,
                  moduleElementDeclarationEmitInfo: moduleElementDeclarationEmitInfo,
                  synchronousDeclarationOutput: writer.getText(),
                  referencePathsOutput: referencePathsOutput
              };
              function hasInternalAnnotation(range) {
                  var text = currentSourceFile.text;
                  var comment = text.substring(range.pos, range.end);
                  return comment.indexOf("@internal") >= 0;
              }
              function stripInternal(node) {
                  if (node) {
                      var leadingCommentRanges = ts.getLeadingCommentRanges(currentSourceFile.text, node.pos);
                      if (ts.forEach(leadingCommentRanges, hasInternalAnnotation)) {
                          return;
                      }
                      emitNode(node);
                  }
              }
              function createAndSetNewTextWriterWithSymbolWriter() {
                  var writer = ts.createTextWriter(newLine);
                  writer.trackSymbol = trackSymbol;
                  writer.writeKeyword = writer.write;
                  writer.writeOperator = writer.write;
                  writer.writePunctuation = writer.write;
                  writer.writeSpace = writer.write;
                  writer.writeStringLiteral = writer.writeLiteral;
                  writer.writeParameter = writer.write;
                  writer.writeSymbol = writer.write;
                  setWriter(writer);
                  return writer;
              }
              function setWriter(newWriter) {
                  writer = newWriter;
                  write = newWriter.write;
                  writeTextOfNode = newWriter.writeTextOfNode;
                  writeLine = newWriter.writeLine;
                  increaseIndent = newWriter.increaseIndent;
                  decreaseIndent = newWriter.decreaseIndent;
              }
              function writeAsynchronousModuleElements(nodes) {
                  var oldWriter = writer;
                  ts.forEach(nodes, function (declaration) {
                      var nodeToCheck;
                      if (declaration.kind === 199) {
                          nodeToCheck = declaration.parent.parent;
                      }
                      else if (declaration.kind === 213 || declaration.kind === 214 || declaration.kind === 211) {
                          ts.Debug.fail("We should be getting ImportDeclaration instead to write");
                      }
                      else {
                          nodeToCheck = declaration;
                      }
                      var moduleElementEmitInfo = ts.forEach(moduleElementDeclarationEmitInfo, function (declEmitInfo) { return declEmitInfo.node === nodeToCheck ? declEmitInfo : undefined; });
                      if (!moduleElementEmitInfo && asynchronousSubModuleDeclarationEmitInfo) {
                          moduleElementEmitInfo = ts.forEach(asynchronousSubModuleDeclarationEmitInfo, function (declEmitInfo) { return declEmitInfo.node === nodeToCheck ? declEmitInfo : undefined; });
                      }
                      if (moduleElementEmitInfo) {
                          if (moduleElementEmitInfo.node.kind === 210) {
                              moduleElementEmitInfo.isVisible = true;
                          }
                          else {
                              createAndSetNewTextWriterWithSymbolWriter();
                              for (var declarationIndent = moduleElementEmitInfo.indent; declarationIndent; declarationIndent--) {
                                  increaseIndent();
                              }
                              if (nodeToCheck.kind === 206) {
                                  ts.Debug.assert(asynchronousSubModuleDeclarationEmitInfo === undefined);
                                  asynchronousSubModuleDeclarationEmitInfo = [];
                              }
                              writeModuleElement(nodeToCheck);
                              if (nodeToCheck.kind === 206) {
                                  moduleElementEmitInfo.subModuleElementDeclarationEmitInfo = asynchronousSubModuleDeclarationEmitInfo;
                                  asynchronousSubModuleDeclarationEmitInfo = undefined;
                              }
                              moduleElementEmitInfo.asynchronousOutput = writer.getText();
                          }
                      }
                  });
                  setWriter(oldWriter);
              }
              function handleSymbolAccessibilityError(symbolAccesibilityResult) {
                  if (symbolAccesibilityResult.accessibility === 0) {
                      if (symbolAccesibilityResult && symbolAccesibilityResult.aliasesToMakeVisible) {
                          writeAsynchronousModuleElements(symbolAccesibilityResult.aliasesToMakeVisible);
                      }
                  }
                  else {
                      reportedDeclarationError = true;
                      var errorInfo = writer.getSymbolAccessibilityDiagnostic(symbolAccesibilityResult);
                      if (errorInfo) {
                          if (errorInfo.typeName) {
                              diagnostics.push(ts.createDiagnosticForNode(symbolAccesibilityResult.errorNode || errorInfo.errorNode, errorInfo.diagnosticMessage, ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, errorInfo.typeName), symbolAccesibilityResult.errorSymbolName, symbolAccesibilityResult.errorModuleName));
                          }
                          else {
                              diagnostics.push(ts.createDiagnosticForNode(symbolAccesibilityResult.errorNode || errorInfo.errorNode, errorInfo.diagnosticMessage, symbolAccesibilityResult.errorSymbolName, symbolAccesibilityResult.errorModuleName));
                          }
                      }
                  }
              }
              function trackSymbol(symbol, enclosingDeclaration, meaning) {
                  handleSymbolAccessibilityError(resolver.isSymbolAccessible(symbol, enclosingDeclaration, meaning));
              }
              function writeTypeOfDeclaration(declaration, type, getSymbolAccessibilityDiagnostic) {
                  writer.getSymbolAccessibilityDiagnostic = getSymbolAccessibilityDiagnostic;
                  write(": ");
                  if (type) {
                      emitType(type);
                  }
                  else {
                      resolver.writeTypeOfDeclaration(declaration, enclosingDeclaration, 2, writer);
                  }
              }
              function writeReturnTypeAtSignature(signature, getSymbolAccessibilityDiagnostic) {
                  writer.getSymbolAccessibilityDiagnostic = getSymbolAccessibilityDiagnostic;
                  write(": ");
                  if (signature.type) {
                      emitType(signature.type);
                  }
                  else {
                      resolver.writeReturnTypeOfSignatureDeclaration(signature, enclosingDeclaration, 2, writer);
                  }
              }
              function emitLines(nodes) {
                  for (var _i = 0; _i < nodes.length; _i++) {
                      var node = nodes[_i];
                      emit(node);
                  }
              }
              function emitSeparatedList(nodes, separator, eachNodeEmitFn, canEmitFn) {
                  var currentWriterPos = writer.getTextPos();
                  for (var _i = 0; _i < nodes.length; _i++) {
                      var node = nodes[_i];
                      if (!canEmitFn || canEmitFn(node)) {
                          if (currentWriterPos !== writer.getTextPos()) {
                              write(separator);
                          }
                          currentWriterPos = writer.getTextPos();
                          eachNodeEmitFn(node);
                      }
                  }
              }
              function emitCommaList(nodes, eachNodeEmitFn, canEmitFn) {
                  emitSeparatedList(nodes, ", ", eachNodeEmitFn, canEmitFn);
              }
              function writeJsDocComments(declaration) {
                  if (declaration) {
                      var jsDocComments = ts.getJsDocComments(declaration, currentSourceFile);
                      ts.emitNewLineBeforeLeadingComments(currentSourceFile, writer, declaration, jsDocComments);
                      ts.emitComments(currentSourceFile, writer, jsDocComments, true, newLine, ts.writeCommentRange);
                  }
              }
              function emitTypeWithNewGetSymbolAccessibilityDiagnostic(type, getSymbolAccessibilityDiagnostic) {
                  writer.getSymbolAccessibilityDiagnostic = getSymbolAccessibilityDiagnostic;
                  emitType(type);
              }
              function emitType(type) {
                  switch (type.kind) {
                      case 112:
                      case 122:
                      case 120:
                      case 113:
                      case 123:
                      case 99:
                      case 8:
                          return writeTextOfNode(currentSourceFile, type);
                      case 177:
                          return emitExpressionWithTypeArguments(type);
                      case 142:
                          return emitTypeReference(type);
                      case 145:
                          return emitTypeQuery(type);
                      case 147:
                          return emitArrayType(type);
                      case 148:
                          return emitTupleType(type);
                      case 149:
                          return emitUnionType(type);
                      case 150:
                          return emitParenType(type);
                      case 143:
                      case 144:
                          return emitSignatureDeclarationWithJsDocComments(type);
                      case 146:
                          return emitTypeLiteral(type);
                      case 65:
                          return emitEntityName(type);
                      case 127:
                          return emitEntityName(type);
                  }
                  function emitEntityName(entityName) {
                      var visibilityResult = resolver.isEntityNameVisible(entityName, entityName.parent.kind === 209 ? entityName.parent : enclosingDeclaration);
                      handleSymbolAccessibilityError(visibilityResult);
                      writeEntityName(entityName);
                      function writeEntityName(entityName) {
                          if (entityName.kind === 65) {
                              writeTextOfNode(currentSourceFile, entityName);
                          }
                          else {
                              var left = entityName.kind === 127 ? entityName.left : entityName.expression;
                              var right = entityName.kind === 127 ? entityName.right : entityName.name;
                              writeEntityName(left);
                              write(".");
                              writeTextOfNode(currentSourceFile, right);
                          }
                      }
                  }
                  function emitExpressionWithTypeArguments(node) {
                      if (ts.isSupportedExpressionWithTypeArguments(node)) {
                          ts.Debug.assert(node.expression.kind === 65 || node.expression.kind === 156);
                          emitEntityName(node.expression);
                          if (node.typeArguments) {
                              write("<");
                              emitCommaList(node.typeArguments, emitType);
                              write(">");
                          }
                      }
                  }
                  function emitTypeReference(type) {
                      emitEntityName(type.typeName);
                      if (type.typeArguments) {
                          write("<");
                          emitCommaList(type.typeArguments, emitType);
                          write(">");
                      }
                  }
                  function emitTypeQuery(type) {
                      write("typeof ");
                      emitEntityName(type.exprName);
                  }
                  function emitArrayType(type) {
                      emitType(type.elementType);
                      write("[]");
                  }
                  function emitTupleType(type) {
                      write("[");
                      emitCommaList(type.elementTypes, emitType);
                      write("]");
                  }
                  function emitUnionType(type) {
                      emitSeparatedList(type.types, " | ", emitType);
                  }
                  function emitParenType(type) {
                      write("(");
                      emitType(type.type);
                      write(")");
                  }
                  function emitTypeLiteral(type) {
                      write("{");
                      if (type.members.length) {
                          writeLine();
                          increaseIndent();
                          emitLines(type.members);
                          decreaseIndent();
                      }
                      write("}");
                  }
              }
              function emitSourceFile(node) {
                  currentSourceFile = node;
                  enclosingDeclaration = node;
                  emitLines(node.statements);
              }
              function getExportDefaultTempVariableName() {
                  var baseName = "_default";
                  if (!ts.hasProperty(currentSourceFile.identifiers, baseName)) {
                      return baseName;
                  }
                  var count = 0;
                  while (true) {
                      var name_14 = baseName + "_" + (++count);
                      if (!ts.hasProperty(currentSourceFile.identifiers, name_14)) {
                          return name_14;
                      }
                  }
              }
              function emitExportAssignment(node) {
                  if (node.expression.kind === 65) {
                      write(node.isExportEquals ? "export = " : "export default ");
                      writeTextOfNode(currentSourceFile, node.expression);
                  }
                  else {
                      var tempVarName = getExportDefaultTempVariableName();
                      write("declare var ");
                      write(tempVarName);
                      write(": ");
                      writer.getSymbolAccessibilityDiagnostic = getDefaultExportAccessibilityDiagnostic;
                      resolver.writeTypeOfExpression(node.expression, enclosingDeclaration, 2, writer);
                      write(";");
                      writeLine();
                      write(node.isExportEquals ? "export = " : "export default ");
                      write(tempVarName);
                  }
                  write(";");
                  writeLine();
                  if (node.expression.kind === 65) {
                      var nodes = resolver.collectLinkedAliases(node.expression);
                      writeAsynchronousModuleElements(nodes);
                  }
                  function getDefaultExportAccessibilityDiagnostic(diagnostic) {
                      return {
                          diagnosticMessage: ts.Diagnostics.Default_export_of_the_module_has_or_is_using_private_name_0,
                          errorNode: node
                      };
                  }
              }
              function isModuleElementVisible(node) {
                  return resolver.isDeclarationVisible(node);
              }
              function emitModuleElement(node, isModuleElementVisible) {
                  if (isModuleElementVisible) {
                      writeModuleElement(node);
                  }
                  else if (node.kind === 209 ||
                      (node.parent.kind === 228 && ts.isExternalModule(currentSourceFile))) {
                      var isVisible;
                      if (asynchronousSubModuleDeclarationEmitInfo && node.parent.kind !== 228) {
                          asynchronousSubModuleDeclarationEmitInfo.push({
                              node: node,
                              outputPos: writer.getTextPos(),
                              indent: writer.getIndent(),
                              isVisible: isVisible
                          });
                      }
                      else {
                          if (node.kind === 210) {
                              var importDeclaration = node;
                              if (importDeclaration.importClause) {
                                  isVisible = (importDeclaration.importClause.name && resolver.isDeclarationVisible(importDeclaration.importClause)) ||
                                      isVisibleNamedBinding(importDeclaration.importClause.namedBindings);
                              }
                          }
                          moduleElementDeclarationEmitInfo.push({
                              node: node,
                              outputPos: writer.getTextPos(),
                              indent: writer.getIndent(),
                              isVisible: isVisible
                          });
                      }
                  }
              }
              function writeModuleElement(node) {
                  switch (node.kind) {
                      case 201:
                          return writeFunctionDeclaration(node);
                      case 181:
                          return writeVariableStatement(node);
                      case 203:
                          return writeInterfaceDeclaration(node);
                      case 202:
                          return writeClassDeclaration(node);
                      case 204:
                          return writeTypeAliasDeclaration(node);
                      case 205:
                          return writeEnumDeclaration(node);
                      case 206:
                          return writeModuleDeclaration(node);
                      case 209:
                          return writeImportEqualsDeclaration(node);
                      case 210:
                          return writeImportDeclaration(node);
                      default:
                          ts.Debug.fail("Unknown symbol kind");
                  }
              }
              function emitModuleElementDeclarationFlags(node) {
                  if (node.parent === currentSourceFile) {
                      if (node.flags & 1) {
                          write("export ");
                      }
                      if (node.flags & 256) {
                          write("default ");
                      }
                      else if (node.kind !== 203) {
                          write("declare ");
                      }
                  }
              }
              function emitClassMemberDeclarationFlags(node) {
                  if (node.flags & 32) {
                      write("private ");
                  }
                  else if (node.flags & 64) {
                      write("protected ");
                  }
                  if (node.flags & 128) {
                      write("static ");
                  }
              }
              function writeImportEqualsDeclaration(node) {
                  emitJsDocComments(node);
                  if (node.flags & 1) {
                      write("export ");
                  }
                  write("import ");
                  writeTextOfNode(currentSourceFile, node.name);
                  write(" = ");
                  if (ts.isInternalModuleImportEqualsDeclaration(node)) {
                      emitTypeWithNewGetSymbolAccessibilityDiagnostic(node.moduleReference, getImportEntityNameVisibilityError);
                      write(";");
                  }
                  else {
                      write("require(");
                      writeTextOfNode(currentSourceFile, ts.getExternalModuleImportEqualsDeclarationExpression(node));
                      write(");");
                  }
                  writer.writeLine();
                  function getImportEntityNameVisibilityError(symbolAccesibilityResult) {
                      return {
                          diagnosticMessage: ts.Diagnostics.Import_declaration_0_is_using_private_name_1,
                          errorNode: node,
                          typeName: node.name
                      };
                  }
              }
              function isVisibleNamedBinding(namedBindings) {
                  if (namedBindings) {
                      if (namedBindings.kind === 212) {
                          return resolver.isDeclarationVisible(namedBindings);
                      }
                      else {
                          return ts.forEach(namedBindings.elements, function (namedImport) { return resolver.isDeclarationVisible(namedImport); });
                      }
                  }
              }
              function writeImportDeclaration(node) {
                  if (!node.importClause && !(node.flags & 1)) {
                      return;
                  }
                  emitJsDocComments(node);
                  if (node.flags & 1) {
                      write("export ");
                  }
                  write("import ");
                  if (node.importClause) {
                      var currentWriterPos = writer.getTextPos();
                      if (node.importClause.name && resolver.isDeclarationVisible(node.importClause)) {
                          writeTextOfNode(currentSourceFile, node.importClause.name);
                      }
                      if (node.importClause.namedBindings && isVisibleNamedBinding(node.importClause.namedBindings)) {
                          if (currentWriterPos !== writer.getTextPos()) {
                              write(", ");
                          }
                          if (node.importClause.namedBindings.kind === 212) {
                              write("* as ");
                              writeTextOfNode(currentSourceFile, node.importClause.namedBindings.name);
                          }
                          else {
                              write("{ ");
                              emitCommaList(node.importClause.namedBindings.elements, emitImportOrExportSpecifier, resolver.isDeclarationVisible);
                              write(" }");
                          }
                      }
                      write(" from ");
                  }
                  writeTextOfNode(currentSourceFile, node.moduleSpecifier);
                  write(";");
                  writer.writeLine();
              }
              function emitImportOrExportSpecifier(node) {
                  if (node.propertyName) {
                      writeTextOfNode(currentSourceFile, node.propertyName);
                      write(" as ");
                  }
                  writeTextOfNode(currentSourceFile, node.name);
              }
              function emitExportSpecifier(node) {
                  emitImportOrExportSpecifier(node);
                  var nodes = resolver.collectLinkedAliases(node.propertyName || node.name);
                  writeAsynchronousModuleElements(nodes);
              }
              function emitExportDeclaration(node) {
                  emitJsDocComments(node);
                  write("export ");
                  if (node.exportClause) {
                      write("{ ");
                      emitCommaList(node.exportClause.elements, emitExportSpecifier);
                      write(" }");
                  }
                  else {
                      write("*");
                  }
                  if (node.moduleSpecifier) {
                      write(" from ");
                      writeTextOfNode(currentSourceFile, node.moduleSpecifier);
                  }
                  write(";");
                  writer.writeLine();
              }
              function writeModuleDeclaration(node) {
                  emitJsDocComments(node);
                  emitModuleElementDeclarationFlags(node);
                  write("module ");
                  writeTextOfNode(currentSourceFile, node.name);
                  while (node.body.kind !== 207) {
                      node = node.body;
                      write(".");
                      writeTextOfNode(currentSourceFile, node.name);
                  }
                  var prevEnclosingDeclaration = enclosingDeclaration;
                  enclosingDeclaration = node;
                  write(" {");
                  writeLine();
                  increaseIndent();
                  emitLines(node.body.statements);
                  decreaseIndent();
                  write("}");
                  writeLine();
                  enclosingDeclaration = prevEnclosingDeclaration;
              }
              function writeTypeAliasDeclaration(node) {
                  emitJsDocComments(node);
                  emitModuleElementDeclarationFlags(node);
                  write("type ");
                  writeTextOfNode(currentSourceFile, node.name);
                  write(" = ");
                  emitTypeWithNewGetSymbolAccessibilityDiagnostic(node.type, getTypeAliasDeclarationVisibilityError);
                  write(";");
                  writeLine();
                  function getTypeAliasDeclarationVisibilityError(symbolAccesibilityResult) {
                      return {
                          diagnosticMessage: ts.Diagnostics.Exported_type_alias_0_has_or_is_using_private_name_1,
                          errorNode: node.type,
                          typeName: node.name
                      };
                  }
              }
              function writeEnumDeclaration(node) {
                  emitJsDocComments(node);
                  emitModuleElementDeclarationFlags(node);
                  if (ts.isConst(node)) {
                      write("const ");
                  }
                  write("enum ");
                  writeTextOfNode(currentSourceFile, node.name);
                  write(" {");
                  writeLine();
                  increaseIndent();
                  emitLines(node.members);
                  decreaseIndent();
                  write("}");
                  writeLine();
              }
              function emitEnumMemberDeclaration(node) {
                  emitJsDocComments(node);
                  writeTextOfNode(currentSourceFile, node.name);
                  var enumMemberValue = resolver.getConstantValue(node);
                  if (enumMemberValue !== undefined) {
                      write(" = ");
                      write(enumMemberValue.toString());
                  }
                  write(",");
                  writeLine();
              }
              function isPrivateMethodTypeParameter(node) {
                  return node.parent.kind === 135 && (node.parent.flags & 32);
              }
              function emitTypeParameters(typeParameters) {
                  function emitTypeParameter(node) {
                      increaseIndent();
                      emitJsDocComments(node);
                      decreaseIndent();
                      writeTextOfNode(currentSourceFile, node.name);
                      if (node.constraint && !isPrivateMethodTypeParameter(node)) {
                          write(" extends ");
                          if (node.parent.kind === 143 ||
                              node.parent.kind === 144 ||
                              (node.parent.parent && node.parent.parent.kind === 146)) {
                              ts.Debug.assert(node.parent.kind === 135 ||
                                  node.parent.kind === 134 ||
                                  node.parent.kind === 143 ||
                                  node.parent.kind === 144 ||
                                  node.parent.kind === 139 ||
                                  node.parent.kind === 140);
                              emitType(node.constraint);
                          }
                          else {
                              emitTypeWithNewGetSymbolAccessibilityDiagnostic(node.constraint, getTypeParameterConstraintVisibilityError);
                          }
                      }
                      function getTypeParameterConstraintVisibilityError(symbolAccesibilityResult) {
                          var diagnosticMessage;
                          switch (node.parent.kind) {
                              case 202:
                                  diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_class_has_or_is_using_private_name_1;
                                  break;
                              case 203:
                                  diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1;
                                  break;
                              case 140:
                                  diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1;
                                  break;
                              case 139:
                                  diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1;
                                  break;
                              case 135:
                              case 134:
                                  if (node.parent.flags & 128) {
                                      diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1;
                                  }
                                  else if (node.parent.parent.kind === 202) {
                                      diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1;
                                  }
                                  else {
                                      diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1;
                                  }
                                  break;
                              case 201:
                                  diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_function_has_or_is_using_private_name_1;
                                  break;
                              default:
                                  ts.Debug.fail("This is unknown parent for type parameter: " + node.parent.kind);
                          }
                          return {
                              diagnosticMessage: diagnosticMessage,
                              errorNode: node,
                              typeName: node.name
                          };
                      }
                  }
                  if (typeParameters) {
                      write("<");
                      emitCommaList(typeParameters, emitTypeParameter);
                      write(">");
                  }
              }
              function emitHeritageClause(typeReferences, isImplementsList) {
                  if (typeReferences) {
                      write(isImplementsList ? " implements " : " extends ");
                      emitCommaList(typeReferences, emitTypeOfTypeReference);
                  }
                  function emitTypeOfTypeReference(node) {
                      if (ts.isSupportedExpressionWithTypeArguments(node)) {
                          emitTypeWithNewGetSymbolAccessibilityDiagnostic(node, getHeritageClauseVisibilityError);
                      }
                      function getHeritageClauseVisibilityError(symbolAccesibilityResult) {
                          var diagnosticMessage;
                          if (node.parent.parent.kind === 202) {
                              diagnosticMessage = isImplementsList ?
                                  ts.Diagnostics.Implements_clause_of_exported_class_0_has_or_is_using_private_name_1 :
                                  ts.Diagnostics.Extends_clause_of_exported_class_0_has_or_is_using_private_name_1;
                          }
                          else {
                              diagnosticMessage = ts.Diagnostics.Extends_clause_of_exported_interface_0_has_or_is_using_private_name_1;
                          }
                          return {
                              diagnosticMessage: diagnosticMessage,
                              errorNode: node,
                              typeName: node.parent.parent.name
                          };
                      }
                  }
              }
              function writeClassDeclaration(node) {
                  function emitParameterProperties(constructorDeclaration) {
                      if (constructorDeclaration) {
                          ts.forEach(constructorDeclaration.parameters, function (param) {
                              if (param.flags & 112) {
                                  emitPropertyDeclaration(param);
                              }
                          });
                      }
                  }
                  emitJsDocComments(node);
                  emitModuleElementDeclarationFlags(node);
                  write("class ");
                  writeTextOfNode(currentSourceFile, node.name);
                  var prevEnclosingDeclaration = enclosingDeclaration;
                  enclosingDeclaration = node;
                  emitTypeParameters(node.typeParameters);
                  var baseTypeNode = ts.getClassExtendsHeritageClauseElement(node);
                  if (baseTypeNode) {
                      emitHeritageClause([baseTypeNode], false);
                  }
                  emitHeritageClause(ts.getClassImplementsHeritageClauseElements(node), true);
                  write(" {");
                  writeLine();
                  increaseIndent();
                  emitParameterProperties(ts.getFirstConstructorWithBody(node));
                  emitLines(node.members);
                  decreaseIndent();
                  write("}");
                  writeLine();
                  enclosingDeclaration = prevEnclosingDeclaration;
              }
              function writeInterfaceDeclaration(node) {
                  emitJsDocComments(node);
                  emitModuleElementDeclarationFlags(node);
                  write("interface ");
                  writeTextOfNode(currentSourceFile, node.name);
                  var prevEnclosingDeclaration = enclosingDeclaration;
                  enclosingDeclaration = node;
                  emitTypeParameters(node.typeParameters);
                  emitHeritageClause(ts.getInterfaceBaseTypeNodes(node), false);
                  write(" {");
                  writeLine();
                  increaseIndent();
                  emitLines(node.members);
                  decreaseIndent();
                  write("}");
                  writeLine();
                  enclosingDeclaration = prevEnclosingDeclaration;
              }
              function emitPropertyDeclaration(node) {
                  if (ts.hasDynamicName(node)) {
                      return;
                  }
                  emitJsDocComments(node);
                  emitClassMemberDeclarationFlags(node);
                  emitVariableDeclaration(node);
                  write(";");
                  writeLine();
              }
              function emitVariableDeclaration(node) {
                  if (node.kind !== 199 || resolver.isDeclarationVisible(node)) {
                      if (ts.isBindingPattern(node.name)) {
                          emitBindingPattern(node.name);
                      }
                      else {
                          writeTextOfNode(currentSourceFile, node.name);
                          if ((node.kind === 133 || node.kind === 132) && ts.hasQuestionToken(node)) {
                              write("?");
                          }
                          if ((node.kind === 133 || node.kind === 132) && node.parent.kind === 146) {
                              emitTypeOfVariableDeclarationFromTypeLiteral(node);
                          }
                          else if (!(node.flags & 32)) {
                              writeTypeOfDeclaration(node, node.type, getVariableDeclarationTypeVisibilityError);
                          }
                      }
                  }
                  function getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccesibilityResult) {
                      if (node.kind === 199) {
                          return symbolAccesibilityResult.errorModuleName ?
                              symbolAccesibilityResult.accessibility === 2 ?
                                  ts.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named :
                                  ts.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_private_module_2 :
                              ts.Diagnostics.Exported_variable_0_has_or_is_using_private_name_1;
                      }
                      else if (node.kind === 133 || node.kind === 132) {
                          if (node.flags & 128) {
                              return symbolAccesibilityResult.errorModuleName ?
                                  symbolAccesibilityResult.accessibility === 2 ?
                                      ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named :
                                      ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 :
                                  ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1;
                          }
                          else if (node.parent.kind === 202) {
                              return symbolAccesibilityResult.errorModuleName ?
                                  symbolAccesibilityResult.accessibility === 2 ?
                                      ts.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named :
                                      ts.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 :
                                  ts.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_private_name_1;
                          }
                          else {
                              return symbolAccesibilityResult.errorModuleName ?
                                  ts.Diagnostics.Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2 :
                                  ts.Diagnostics.Property_0_of_exported_interface_has_or_is_using_private_name_1;
                          }
                      }
                  }
                  function getVariableDeclarationTypeVisibilityError(symbolAccesibilityResult) {
                      var diagnosticMessage = getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccesibilityResult);
                      return diagnosticMessage !== undefined ? {
                          diagnosticMessage: diagnosticMessage,
                          errorNode: node,
                          typeName: node.name
                      } : undefined;
                  }
                  function emitBindingPattern(bindingPattern) {
                      var elements = [];
                      for (var _i = 0, _a = bindingPattern.elements; _i < _a.length; _i++) {
                          var element = _a[_i];
                          if (element.kind !== 176) {
                              elements.push(element);
                          }
                      }
                      emitCommaList(elements, emitBindingElement);
                  }
                  function emitBindingElement(bindingElement) {
                      function getBindingElementTypeVisibilityError(symbolAccesibilityResult) {
                          var diagnosticMessage = getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccesibilityResult);
                          return diagnosticMessage !== undefined ? {
                              diagnosticMessage: diagnosticMessage,
                              errorNode: bindingElement,
                              typeName: bindingElement.name
                          } : undefined;
                      }
                      if (bindingElement.name) {
                          if (ts.isBindingPattern(bindingElement.name)) {
                              emitBindingPattern(bindingElement.name);
                          }
                          else {
                              writeTextOfNode(currentSourceFile, bindingElement.name);
                              writeTypeOfDeclaration(bindingElement, undefined, getBindingElementTypeVisibilityError);
                          }
                      }
                  }
              }
              function emitTypeOfVariableDeclarationFromTypeLiteral(node) {
                  if (node.type) {
                      write(": ");
                      emitType(node.type);
                  }
              }
              function isVariableStatementVisible(node) {
                  return ts.forEach(node.declarationList.declarations, function (varDeclaration) { return resolver.isDeclarationVisible(varDeclaration); });
              }
              function writeVariableStatement(node) {
                  emitJsDocComments(node);
                  emitModuleElementDeclarationFlags(node);
                  if (ts.isLet(node.declarationList)) {
                      write("let ");
                  }
                  else if (ts.isConst(node.declarationList)) {
                      write("const ");
                  }
                  else {
                      write("var ");
                  }
                  emitCommaList(node.declarationList.declarations, emitVariableDeclaration, resolver.isDeclarationVisible);
                  write(";");
                  writeLine();
              }
              function emitAccessorDeclaration(node) {
                  if (ts.hasDynamicName(node)) {
                      return;
                  }
                  var accessors = ts.getAllAccessorDeclarations(node.parent.members, node);
                  var accessorWithTypeAnnotation;
                  if (node === accessors.firstAccessor) {
                      emitJsDocComments(accessors.getAccessor);
                      emitJsDocComments(accessors.setAccessor);
                      emitClassMemberDeclarationFlags(node);
                      writeTextOfNode(currentSourceFile, node.name);
                      if (!(node.flags & 32)) {
                          accessorWithTypeAnnotation = node;
                          var type = getTypeAnnotationFromAccessor(node);
                          if (!type) {
                              var anotherAccessor = node.kind === 137 ? accessors.setAccessor : accessors.getAccessor;
                              type = getTypeAnnotationFromAccessor(anotherAccessor);
                              if (type) {
                                  accessorWithTypeAnnotation = anotherAccessor;
                              }
                          }
                          writeTypeOfDeclaration(node, type, getAccessorDeclarationTypeVisibilityError);
                      }
                      write(";");
                      writeLine();
                  }
                  function getTypeAnnotationFromAccessor(accessor) {
                      if (accessor) {
                          return accessor.kind === 137
                              ? accessor.type
                              : accessor.parameters.length > 0
                                  ? accessor.parameters[0].type
                                  : undefined;
                      }
                  }
                  function getAccessorDeclarationTypeVisibilityError(symbolAccesibilityResult) {
                      var diagnosticMessage;
                      if (accessorWithTypeAnnotation.kind === 138) {
                          if (accessorWithTypeAnnotation.parent.flags & 128) {
                              diagnosticMessage = symbolAccesibilityResult.errorModuleName ?
                                  ts.Diagnostics.Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_name_1_from_private_module_2 :
                                  ts.Diagnostics.Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_private_name_1;
                          }
                          else {
                              diagnosticMessage = symbolAccesibilityResult.errorModuleName ?
                                  ts.Diagnostics.Parameter_0_of_public_property_setter_from_exported_class_has_or_is_using_name_1_from_private_module_2 :
                                  ts.Diagnostics.Parameter_0_of_public_property_setter_from_exported_class_has_or_is_using_private_name_1;
                          }
                          return {
                              diagnosticMessage: diagnosticMessage,
                              errorNode: accessorWithTypeAnnotation.parameters[0],
                              typeName: accessorWithTypeAnnotation.name
                          };
                      }
                      else {
                          if (accessorWithTypeAnnotation.flags & 128) {
                              diagnosticMessage = symbolAccesibilityResult.errorModuleName ?
                                  symbolAccesibilityResult.accessibility === 2 ?
                                      ts.Diagnostics.Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named :
                                      ts.Diagnostics.Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_name_0_from_private_module_1 :
                                  ts.Diagnostics.Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_private_name_0;
                          }
                          else {
                              diagnosticMessage = symbolAccesibilityResult.errorModuleName ?
                                  symbolAccesibilityResult.accessibility === 2 ?
                                      ts.Diagnostics.Return_type_of_public_property_getter_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named :
                                      ts.Diagnostics.Return_type_of_public_property_getter_from_exported_class_has_or_is_using_name_0_from_private_module_1 :
                                  ts.Diagnostics.Return_type_of_public_property_getter_from_exported_class_has_or_is_using_private_name_0;
                          }
                          return {
                              diagnosticMessage: diagnosticMessage,
                              errorNode: accessorWithTypeAnnotation.name,
                              typeName: undefined
                          };
                      }
                  }
              }
              function writeFunctionDeclaration(node) {
                  if (ts.hasDynamicName(node)) {
                      return;
                  }
                  if (!resolver.isImplementationOfOverload(node)) {
                      emitJsDocComments(node);
                      if (node.kind === 201) {
                          emitModuleElementDeclarationFlags(node);
                      }
                      else if (node.kind === 135) {
                          emitClassMemberDeclarationFlags(node);
                      }
                      if (node.kind === 201) {
                          write("function ");
                          writeTextOfNode(currentSourceFile, node.name);
                      }
                      else if (node.kind === 136) {
                          write("constructor");
                      }
                      else {
                          writeTextOfNode(currentSourceFile, node.name);
                          if (ts.hasQuestionToken(node)) {
                              write("?");
                          }
                      }
                      emitSignatureDeclaration(node);
                  }
              }
              function emitSignatureDeclarationWithJsDocComments(node) {
                  emitJsDocComments(node);
                  emitSignatureDeclaration(node);
              }
              function emitSignatureDeclaration(node) {
                  if (node.kind === 140 || node.kind === 144) {
                      write("new ");
                  }
                  emitTypeParameters(node.typeParameters);
                  if (node.kind === 141) {
                      write("[");
                  }
                  else {
                      write("(");
                  }
                  var prevEnclosingDeclaration = enclosingDeclaration;
                  enclosingDeclaration = node;
                  emitCommaList(node.parameters, emitParameterDeclaration);
                  if (node.kind === 141) {
                      write("]");
                  }
                  else {
                      write(")");
                  }
                  var isFunctionTypeOrConstructorType = node.kind === 143 || node.kind === 144;
                  if (isFunctionTypeOrConstructorType || node.parent.kind === 146) {
                      if (node.type) {
                          write(isFunctionTypeOrConstructorType ? " => " : ": ");
                          emitType(node.type);
                      }
                  }
                  else if (node.kind !== 136 && !(node.flags & 32)) {
                      writeReturnTypeAtSignature(node, getReturnTypeVisibilityError);
                  }
                  enclosingDeclaration = prevEnclosingDeclaration;
                  if (!isFunctionTypeOrConstructorType) {
                      write(";");
                      writeLine();
                  }
                  function getReturnTypeVisibilityError(symbolAccesibilityResult) {
                      var diagnosticMessage;
                      switch (node.kind) {
                          case 140:
                              diagnosticMessage = symbolAccesibilityResult.errorModuleName ?
                                  ts.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 :
                                  ts.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0;
                              break;
                          case 139:
                              diagnosticMessage = symbolAccesibilityResult.errorModuleName ?
                                  ts.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 :
                                  ts.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0;
                              break;
                          case 141:
                              diagnosticMessage = symbolAccesibilityResult.errorModuleName ?
                                  ts.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 :
                                  ts.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0;
                              break;
                          case 135:
                          case 134:
                              if (node.flags & 128) {
                                  diagnosticMessage = symbolAccesibilityResult.errorModuleName ?
                                      symbolAccesibilityResult.accessibility === 2 ?
                                          ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named :
                                          ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 :
                                      ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0;
                              }
                              else if (node.parent.kind === 202) {
                                  diagnosticMessage = symbolAccesibilityResult.errorModuleName ?
                                      symbolAccesibilityResult.accessibility === 2 ?
                                          ts.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named :
                                          ts.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 :
                                      ts.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0;
                              }
                              else {
                                  diagnosticMessage = symbolAccesibilityResult.errorModuleName ?
                                      ts.Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1 :
                                      ts.Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0;
                              }
                              break;
                          case 201:
                              diagnosticMessage = symbolAccesibilityResult.errorModuleName ?
                                  symbolAccesibilityResult.accessibility === 2 ?
                                      ts.Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named :
                                      ts.Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1 :
                                  ts.Diagnostics.Return_type_of_exported_function_has_or_is_using_private_name_0;
                              break;
                          default:
                              ts.Debug.fail("This is unknown kind for signature: " + node.kind);
                      }
                      return {
                          diagnosticMessage: diagnosticMessage,
                          errorNode: node.name || node
                      };
                  }
              }
              function emitParameterDeclaration(node) {
                  increaseIndent();
                  emitJsDocComments(node);
                  if (node.dotDotDotToken) {
                      write("...");
                  }
                  if (ts.isBindingPattern(node.name)) {
                      emitBindingPattern(node.name);
                  }
                  else {
                      writeTextOfNode(currentSourceFile, node.name);
                  }
                  if (node.initializer || ts.hasQuestionToken(node)) {
                      write("?");
                  }
                  decreaseIndent();
                  if (node.parent.kind === 143 ||
                      node.parent.kind === 144 ||
                      node.parent.parent.kind === 146) {
                      emitTypeOfVariableDeclarationFromTypeLiteral(node);
                  }
                  else if (!(node.parent.flags & 32)) {
                      writeTypeOfDeclaration(node, node.type, getParameterDeclarationTypeVisibilityError);
                  }
                  function getParameterDeclarationTypeVisibilityError(symbolAccesibilityResult) {
                      var diagnosticMessage = getParameterDeclarationTypeVisibilityDiagnosticMessage(symbolAccesibilityResult);
                      return diagnosticMessage !== undefined ? {
                          diagnosticMessage: diagnosticMessage,
                          errorNode: node,
                          typeName: node.name
                      } : undefined;
                  }
                  function getParameterDeclarationTypeVisibilityDiagnosticMessage(symbolAccesibilityResult) {
                      switch (node.parent.kind) {
                          case 136:
                              return symbolAccesibilityResult.errorModuleName ?
                                  symbolAccesibilityResult.accessibility === 2 ?
                                      ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named :
                                      ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2 :
                                  ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1;
                          case 140:
                              return symbolAccesibilityResult.errorModuleName ?
                                  ts.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 :
                                  ts.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1;
                          case 139:
                              return symbolAccesibilityResult.errorModuleName ?
                                  ts.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 :
                                  ts.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1;
                          case 135:
                          case 134:
                              if (node.parent.flags & 128) {
                                  return symbolAccesibilityResult.errorModuleName ?
                                      symbolAccesibilityResult.accessibility === 2 ?
                                          ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named :
                                          ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 :
                                      ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1;
                              }
                              else if (node.parent.parent.kind === 202) {
                                  return symbolAccesibilityResult.errorModuleName ?
                                      symbolAccesibilityResult.accessibility === 2 ?
                                          ts.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named :
                                          ts.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 :
                                      ts.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1;
                              }
                              else {
                                  return symbolAccesibilityResult.errorModuleName ?
                                      ts.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2 :
                                      ts.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1;
                              }
                          case 201:
                              return symbolAccesibilityResult.errorModuleName ?
                                  symbolAccesibilityResult.accessibility === 2 ?
                                      ts.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named :
                                      ts.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2 :
                                  ts.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_private_name_1;
                          default:
                              ts.Debug.fail("This is unknown parent for parameter: " + node.parent.kind);
                      }
                  }
                  function emitBindingPattern(bindingPattern) {
                      if (bindingPattern.kind === 151) {
                          write("{");
                          emitCommaList(bindingPattern.elements, emitBindingElement);
                          write("}");
                      }
                      else if (bindingPattern.kind === 152) {
                          write("[");
                          var elements = bindingPattern.elements;
                          emitCommaList(elements, emitBindingElement);
                          if (elements && elements.hasTrailingComma) {
                              write(", ");
                          }
                          write("]");
                      }
                  }
                  function emitBindingElement(bindingElement) {
                      function getBindingElementTypeVisibilityError(symbolAccesibilityResult) {
                          var diagnosticMessage = getParameterDeclarationTypeVisibilityDiagnosticMessage(symbolAccesibilityResult);
                          return diagnosticMessage !== undefined ? {
                              diagnosticMessage: diagnosticMessage,
                              errorNode: bindingElement,
                              typeName: bindingElement.name
                          } : undefined;
                      }
                      if (bindingElement.kind === 176) {
                          write(" ");
                      }
                      else if (bindingElement.kind === 153) {
                          if (bindingElement.propertyName) {
                              writeTextOfNode(currentSourceFile, bindingElement.propertyName);
                              write(": ");
                              emitBindingPattern(bindingElement.name);
                          }
                          else if (bindingElement.name) {
                              if (ts.isBindingPattern(bindingElement.name)) {
                                  emitBindingPattern(bindingElement.name);
                              }
                              else {
                                  ts.Debug.assert(bindingElement.name.kind === 65);
                                  if (bindingElement.dotDotDotToken) {
                                      write("...");
                                  }
                                  writeTextOfNode(currentSourceFile, bindingElement.name);
                              }
                          }
                      }
                  }
              }
              function emitNode(node) {
                  switch (node.kind) {
                      case 201:
                      case 206:
                      case 209:
                      case 203:
                      case 202:
                      case 204:
                      case 205:
                          return emitModuleElement(node, isModuleElementVisible(node));
                      case 181:
                          return emitModuleElement(node, isVariableStatementVisible(node));
                      case 210:
                          return emitModuleElement(node, !node.importClause);
                      case 216:
                          return emitExportDeclaration(node);
                      case 136:
                      case 135:
                      case 134:
                          return writeFunctionDeclaration(node);
                      case 140:
                      case 139:
                      case 141:
                          return emitSignatureDeclarationWithJsDocComments(node);
                      case 137:
                      case 138:
                          return emitAccessorDeclaration(node);
                      case 133:
                      case 132:
                          return emitPropertyDeclaration(node);
                      case 227:
                          return emitEnumMemberDeclaration(node);
                      case 215:
                          return emitExportAssignment(node);
                      case 228:
                          return emitSourceFile(node);
                  }
              }
              function writeReferencePath(referencedFile) {
                  var declFileName = referencedFile.flags & 2048
                      ? referencedFile.fileName
                      : ts.shouldEmitToOwnFile(referencedFile, compilerOptions)
                          ? ts.getOwnEmitOutputFilePath(referencedFile, host, ".d.ts")
                          : ts.removeFileExtension(compilerOptions.out) + ".d.ts";
                  declFileName = ts.getRelativePathToDirectoryOrUrl(ts.getDirectoryPath(ts.normalizeSlashes(jsFilePath)), declFileName, host.getCurrentDirectory(), host.getCanonicalFileName, false);
                  referencePathsOutput += "/// <reference path=\"" + declFileName + "\" />" + newLine;
              }
          }
          function writeDeclarationFile(jsFilePath, sourceFile, host, resolver, diagnostics) {
              var emitDeclarationResult = emitDeclarations(host, resolver, diagnostics, jsFilePath, sourceFile);
              if (!emitDeclarationResult.reportedDeclarationError) {
                  var declarationOutput = emitDeclarationResult.referencePathsOutput
                      + getDeclarationOutput(emitDeclarationResult.synchronousDeclarationOutput, emitDeclarationResult.moduleElementDeclarationEmitInfo);
                  ts.writeFile(host, diagnostics, ts.removeFileExtension(jsFilePath) + ".d.ts", declarationOutput, host.getCompilerOptions().emitBOM);
              }
              function getDeclarationOutput(synchronousDeclarationOutput, moduleElementDeclarationEmitInfo) {
                  var appliedSyncOutputPos = 0;
                  var declarationOutput = "";
                  ts.forEach(moduleElementDeclarationEmitInfo, function (aliasEmitInfo) {
                      if (aliasEmitInfo.asynchronousOutput) {
                          declarationOutput += synchronousDeclarationOutput.substring(appliedSyncOutputPos, aliasEmitInfo.outputPos);
                          declarationOutput += getDeclarationOutput(aliasEmitInfo.asynchronousOutput, aliasEmitInfo.subModuleElementDeclarationEmitInfo);
                          appliedSyncOutputPos = aliasEmitInfo.outputPos;
                      }
                  });
                  declarationOutput += synchronousDeclarationOutput.substring(appliedSyncOutputPos);
                  return declarationOutput;
              }
          }
          ts.writeDeclarationFile = writeDeclarationFile;
      })(ts || (ts = {}));
      /// <reference path="checker.ts"/>
      /// <reference path="declarationEmitter.ts"/>
      var ts;
      (function (ts) {
          function isExternalModuleOrDeclarationFile(sourceFile) {
              return ts.isExternalModule(sourceFile) || ts.isDeclarationFile(sourceFile);
          }
          ts.isExternalModuleOrDeclarationFile = isExternalModuleOrDeclarationFile;
          function emitFiles(resolver, host, targetSourceFile) {
              var extendsHelper = "\nvar __extends = (this && this.__extends) || function (d, b) {\n    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n    function __() { this.constructor = d; }\n    __.prototype = b.prototype;\n    d.prototype = new __();\n};";
              var decorateHelper = "\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n    if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") return Reflect.decorate(decorators, target, key, desc);\n    switch (arguments.length) {\n        case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);\n        case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);\n        case 4: return decorators.reduceRight(function(o, d) { return (d && d(target, key, o)) || o; }, desc);\n    }\n};";
              var metadataHelper = "\nvar __metadata = (this && this.__metadata) || function (k, v) {\n    if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};";
              var paramHelper = "\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n    return function (target, key) { decorator(target, key, paramIndex); }\n};";
              var compilerOptions = host.getCompilerOptions();
              var languageVersion = compilerOptions.target || 0;
              var sourceMapDataList = compilerOptions.sourceMap || compilerOptions.inlineSourceMap ? [] : undefined;
              var diagnostics = [];
              var newLine = host.getNewLine();
              if (targetSourceFile === undefined) {
                  ts.forEach(host.getSourceFiles(), function (sourceFile) {
                      if (ts.shouldEmitToOwnFile(sourceFile, compilerOptions)) {
                          var jsFilePath = ts.getOwnEmitOutputFilePath(sourceFile, host, ".js");
                          emitFile(jsFilePath, sourceFile);
                      }
                  });
                  if (compilerOptions.out) {
                      emitFile(compilerOptions.out);
                  }
              }
              else {
                  if (ts.shouldEmitToOwnFile(targetSourceFile, compilerOptions)) {
                      var jsFilePath = ts.getOwnEmitOutputFilePath(targetSourceFile, host, ".js");
                      emitFile(jsFilePath, targetSourceFile);
                  }
                  else if (!ts.isDeclarationFile(targetSourceFile) && compilerOptions.out) {
                      emitFile(compilerOptions.out);
                  }
              }
              diagnostics = ts.sortAndDeduplicateDiagnostics(diagnostics);
              return {
                  emitSkipped: false,
                  diagnostics: diagnostics,
                  sourceMaps: sourceMapDataList
              };
              function isNodeDescendentOf(node, ancestor) {
                  while (node) {
                      if (node === ancestor)
                          return true;
                      node = node.parent;
                  }
                  return false;
              }
              function isUniqueLocalName(name, container) {
                  for (var node = container; isNodeDescendentOf(node, container); node = node.nextContainer) {
                      if (node.locals && ts.hasProperty(node.locals, name)) {
                          if (node.locals[name].flags & (107455 | 1048576 | 8388608)) {
                              return false;
                          }
                      }
                  }
                  return true;
              }
              function emitJavaScript(jsFilePath, root) {
                  var writer = ts.createTextWriter(newLine);
                  var write = writer.write;
                  var writeTextOfNode = writer.writeTextOfNode;
                  var writeLine = writer.writeLine;
                  var increaseIndent = writer.increaseIndent;
                  var decreaseIndent = writer.decreaseIndent;
                  var currentSourceFile;
                  var exportFunctionForFile;
                  var generatedNameSet = {};
                  var nodeToGeneratedName = [];
                  var blockScopedVariableToGeneratedName;
                  var computedPropertyNamesToGeneratedNames;
                  var extendsEmitted = false;
                  var decorateEmitted = false;
                  var paramEmitted = false;
                  var tempFlags = 0;
                  var tempVariables;
                  var tempParameters;
                  var externalImports;
                  var exportSpecifiers;
                  var exportEquals;
                  var hasExportStars;
                  var writeEmittedFiles = writeJavaScriptFile;
                  var detachedCommentsInfo;
                  var writeComment = ts.writeCommentRange;
                  var emit = emitNodeWithoutSourceMap;
                  var emitStart = function (node) { };
                  var emitEnd = function (node) { };
                  var emitToken = emitTokenText;
                  var scopeEmitStart = function (scopeDeclaration, scopeName) { };
                  var scopeEmitEnd = function () { };
                  var sourceMapData;
                  if (compilerOptions.sourceMap || compilerOptions.inlineSourceMap) {
                      initializeEmitterWithSourceMaps();
                  }
                  if (root) {
                      emitSourceFile(root);
                  }
                  else {
                      ts.forEach(host.getSourceFiles(), function (sourceFile) {
                          if (!isExternalModuleOrDeclarationFile(sourceFile)) {
                              emitSourceFile(sourceFile);
                          }
                      });
                  }
                  writeLine();
                  writeEmittedFiles(writer.getText(), compilerOptions.emitBOM);
                  return;
                  function emitSourceFile(sourceFile) {
                      currentSourceFile = sourceFile;
                      exportFunctionForFile = undefined;
                      emit(sourceFile);
                  }
                  function isUniqueName(name) {
                      return !resolver.hasGlobalName(name) &&
                          !ts.hasProperty(currentSourceFile.identifiers, name) &&
                          !ts.hasProperty(generatedNameSet, name);
                  }
                  function makeTempVariableName(flags) {
                      if (flags && !(tempFlags & flags)) {
                          var name = flags === 268435456 ? "_i" : "_n";
                          if (isUniqueName(name)) {
                              tempFlags |= flags;
                              return name;
                          }
                      }
                      while (true) {
                          var count = tempFlags & 268435455;
                          tempFlags++;
                          if (count !== 8 && count !== 13) {
                              var name_15 = count < 26 ? "_" + String.fromCharCode(97 + count) : "_" + (count - 26);
                              if (isUniqueName(name_15)) {
                                  return name_15;
                              }
                          }
                      }
                  }
                  function makeUniqueName(baseName) {
                      if (baseName.charCodeAt(baseName.length - 1) !== 95) {
                          baseName += "_";
                      }
                      var i = 1;
                      while (true) {
                          var generatedName = baseName + i;
                          if (isUniqueName(generatedName)) {
                              return generatedNameSet[generatedName] = generatedName;
                          }
                          i++;
                      }
                  }
                  function assignGeneratedName(node, name) {
                      nodeToGeneratedName[ts.getNodeId(node)] = ts.unescapeIdentifier(name);
                  }
                  function generateNameForFunctionOrClassDeclaration(node) {
                      if (!node.name) {
                          assignGeneratedName(node, makeUniqueName("default"));
                      }
                  }
                  function generateNameForModuleOrEnum(node) {
                      if (node.name.kind === 65) {
                          var name_16 = node.name.text;
                          assignGeneratedName(node, isUniqueLocalName(name_16, node) ? name_16 : makeUniqueName(name_16));
                      }
                  }
                  function generateNameForImportOrExportDeclaration(node) {
                      var expr = ts.getExternalModuleName(node);
                      var baseName = expr.kind === 8 ?
                          ts.escapeIdentifier(ts.makeIdentifierFromModuleName(expr.text)) : "module";
                      assignGeneratedName(node, makeUniqueName(baseName));
                  }
                  function generateNameForImportDeclaration(node) {
                      if (node.importClause) {
                          generateNameForImportOrExportDeclaration(node);
                      }
                  }
                  function generateNameForExportDeclaration(node) {
                      if (node.moduleSpecifier) {
                          generateNameForImportOrExportDeclaration(node);
                      }
                  }
                  function generateNameForExportAssignment(node) {
                      if (node.expression && node.expression.kind !== 65) {
                          assignGeneratedName(node, makeUniqueName("default"));
                      }
                  }
                  function generateNameForNode(node) {
                      switch (node.kind) {
                          case 201:
                          case 202:
                          case 175:
                              generateNameForFunctionOrClassDeclaration(node);
                              break;
                          case 206:
                              generateNameForModuleOrEnum(node);
                              generateNameForNode(node.body);
                              break;
                          case 205:
                              generateNameForModuleOrEnum(node);
                              break;
                          case 210:
                              generateNameForImportDeclaration(node);
                              break;
                          case 216:
                              generateNameForExportDeclaration(node);
                              break;
                          case 215:
                              generateNameForExportAssignment(node);
                              break;
                      }
                  }
                  function getGeneratedNameForNode(node) {
                      var nodeId = ts.getNodeId(node);
                      if (!nodeToGeneratedName[nodeId]) {
                          generateNameForNode(node);
                      }
                      return nodeToGeneratedName[nodeId];
                  }
                  function initializeEmitterWithSourceMaps() {
                      var sourceMapDir;
                      var sourceMapSourceIndex = -1;
                      var sourceMapNameIndexMap = {};
                      var sourceMapNameIndices = [];
                      function getSourceMapNameIndex() {
                          return sourceMapNameIndices.length ? ts.lastOrUndefined(sourceMapNameIndices) : -1;
                      }
                      var lastRecordedSourceMapSpan;
                      var lastEncodedSourceMapSpan = {
                          emittedLine: 1,
                          emittedColumn: 1,
                          sourceLine: 1,
                          sourceColumn: 1,
                          sourceIndex: 0
                      };
                      var lastEncodedNameIndex = 0;
                      function encodeLastRecordedSourceMapSpan() {
                          if (!lastRecordedSourceMapSpan || lastRecordedSourceMapSpan === lastEncodedSourceMapSpan) {
                              return;
                          }
                          var prevEncodedEmittedColumn = lastEncodedSourceMapSpan.emittedColumn;
                          if (lastEncodedSourceMapSpan.emittedLine == lastRecordedSourceMapSpan.emittedLine) {
                              if (sourceMapData.sourceMapMappings) {
                                  sourceMapData.sourceMapMappings += ",";
                              }
                          }
                          else {
                              for (var encodedLine = lastEncodedSourceMapSpan.emittedLine; encodedLine < lastRecordedSourceMapSpan.emittedLine; encodedLine++) {
                                  sourceMapData.sourceMapMappings += ";";
                              }
                              prevEncodedEmittedColumn = 1;
                          }
                          sourceMapData.sourceMapMappings += base64VLQFormatEncode(lastRecordedSourceMapSpan.emittedColumn - prevEncodedEmittedColumn);
                          sourceMapData.sourceMapMappings += base64VLQFormatEncode(lastRecordedSourceMapSpan.sourceIndex - lastEncodedSourceMapSpan.sourceIndex);
                          sourceMapData.sourceMapMappings += base64VLQFormatEncode(lastRecordedSourceMapSpan.sourceLine - lastEncodedSourceMapSpan.sourceLine);
                          sourceMapData.sourceMapMappings += base64VLQFormatEncode(lastRecordedSourceMapSpan.sourceColumn - lastEncodedSourceMapSpan.sourceColumn);
                          if (lastRecordedSourceMapSpan.nameIndex >= 0) {
                              sourceMapData.sourceMapMappings += base64VLQFormatEncode(lastRecordedSourceMapSpan.nameIndex - lastEncodedNameIndex);
                              lastEncodedNameIndex = lastRecordedSourceMapSpan.nameIndex;
                          }
                          lastEncodedSourceMapSpan = lastRecordedSourceMapSpan;
                          sourceMapData.sourceMapDecodedMappings.push(lastEncodedSourceMapSpan);
                          function base64VLQFormatEncode(inValue) {
                              function base64FormatEncode(inValue) {
                                  if (inValue < 64) {
                                      return 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.charAt(inValue);
                                  }
                                  throw TypeError(inValue + ": not a 64 based value");
                              }
                              if (inValue < 0) {
                                  inValue = ((-inValue) << 1) + 1;
                              }
                              else {
                                  inValue = inValue << 1;
                              }
                              var encodedStr = "";
                              do {
                                  var currentDigit = inValue & 31;
                                  inValue = inValue >> 5;
                                  if (inValue > 0) {
                                      currentDigit = currentDigit | 32;
                                  }
                                  encodedStr = encodedStr + base64FormatEncode(currentDigit);
                              } while (inValue > 0);
                              return encodedStr;
                          }
                      }
                      function recordSourceMapSpan(pos) {
                          var sourceLinePos = ts.getLineAndCharacterOfPosition(currentSourceFile, pos);
                          sourceLinePos.line++;
                          sourceLinePos.character++;
                          var emittedLine = writer.getLine();
                          var emittedColumn = writer.getColumn();
                          if (!lastRecordedSourceMapSpan ||
                              lastRecordedSourceMapSpan.emittedLine != emittedLine ||
                              lastRecordedSourceMapSpan.emittedColumn != emittedColumn ||
                              (lastRecordedSourceMapSpan.sourceIndex === sourceMapSourceIndex &&
                                  (lastRecordedSourceMapSpan.sourceLine > sourceLinePos.line ||
                                      (lastRecordedSourceMapSpan.sourceLine === sourceLinePos.line && lastRecordedSourceMapSpan.sourceColumn > sourceLinePos.character)))) {
                              encodeLastRecordedSourceMapSpan();
                              lastRecordedSourceMapSpan = {
                                  emittedLine: emittedLine,
                                  emittedColumn: emittedColumn,
                                  sourceLine: sourceLinePos.line,
                                  sourceColumn: sourceLinePos.character,
                                  nameIndex: getSourceMapNameIndex(),
                                  sourceIndex: sourceMapSourceIndex
                              };
                          }
                          else {
                              lastRecordedSourceMapSpan.sourceLine = sourceLinePos.line;
                              lastRecordedSourceMapSpan.sourceColumn = sourceLinePos.character;
                              lastRecordedSourceMapSpan.sourceIndex = sourceMapSourceIndex;
                          }
                      }
                      function recordEmitNodeStartSpan(node) {
                          recordSourceMapSpan(ts.skipTrivia(currentSourceFile.text, node.pos));
                      }
                      function recordEmitNodeEndSpan(node) {
                          recordSourceMapSpan(node.end);
                      }
                      function writeTextWithSpanRecord(tokenKind, startPos, emitFn) {
                          var tokenStartPos = ts.skipTrivia(currentSourceFile.text, startPos);
                          recordSourceMapSpan(tokenStartPos);
                          var tokenEndPos = emitTokenText(tokenKind, tokenStartPos, emitFn);
                          recordSourceMapSpan(tokenEndPos);
                          return tokenEndPos;
                      }
                      function recordNewSourceFileStart(node) {
                          var sourcesDirectoryPath = compilerOptions.sourceRoot ? host.getCommonSourceDirectory() : sourceMapDir;
                          sourceMapData.sourceMapSources.push(ts.getRelativePathToDirectoryOrUrl(sourcesDirectoryPath, node.fileName, host.getCurrentDirectory(), host.getCanonicalFileName, true));
                          sourceMapSourceIndex = sourceMapData.sourceMapSources.length - 1;
                          sourceMapData.inputSourceFileNames.push(node.fileName);
                          if (compilerOptions.inlineSources) {
                              if (!sourceMapData.sourceMapSourcesContent) {
                                  sourceMapData.sourceMapSourcesContent = [];
                              }
                              sourceMapData.sourceMapSourcesContent.push(node.text);
                          }
                      }
                      function recordScopeNameOfNode(node, scopeName) {
                          function recordScopeNameIndex(scopeNameIndex) {
                              sourceMapNameIndices.push(scopeNameIndex);
                          }
                          function recordScopeNameStart(scopeName) {
                              var scopeNameIndex = -1;
                              if (scopeName) {
                                  var parentIndex = getSourceMapNameIndex();
                                  if (parentIndex !== -1) {
                                      var name_17 = node.name;
                                      if (!name_17 || name_17.kind !== 128) {
                                          scopeName = "." + scopeName;
                                      }
                                      scopeName = sourceMapData.sourceMapNames[parentIndex] + scopeName;
                                  }
                                  scopeNameIndex = ts.getProperty(sourceMapNameIndexMap, scopeName);
                                  if (scopeNameIndex === undefined) {
                                      scopeNameIndex = sourceMapData.sourceMapNames.length;
                                      sourceMapData.sourceMapNames.push(scopeName);
                                      sourceMapNameIndexMap[scopeName] = scopeNameIndex;
                                  }
                              }
                              recordScopeNameIndex(scopeNameIndex);
                          }
                          if (scopeName) {
                              recordScopeNameStart(scopeName);
                          }
                          else if (node.kind === 201 ||
                              node.kind === 163 ||
                              node.kind === 135 ||
                              node.kind === 134 ||
                              node.kind === 137 ||
                              node.kind === 138 ||
                              node.kind === 206 ||
                              node.kind === 202 ||
                              node.kind === 205) {
                              if (node.name) {
                                  var name_18 = node.name;
                                  scopeName = name_18.kind === 128
                                      ? ts.getTextOfNode(name_18)
                                      : node.name.text;
                              }
                              recordScopeNameStart(scopeName);
                          }
                          else {
                              recordScopeNameIndex(getSourceMapNameIndex());
                          }
                      }
                      function recordScopeNameEnd() {
                          sourceMapNameIndices.pop();
                      }
                      ;
                      function writeCommentRangeWithMap(curentSourceFile, writer, comment, newLine) {
                          recordSourceMapSpan(comment.pos);
                          ts.writeCommentRange(currentSourceFile, writer, comment, newLine);
                          recordSourceMapSpan(comment.end);
                      }
                      function serializeSourceMapContents(version, file, sourceRoot, sources, names, mappings, sourcesContent) {
                          if (typeof JSON !== "undefined") {
                              var map_1 = {
                                  version: version,
                                  file: file,
                                  sourceRoot: sourceRoot,
                                  sources: sources,
                                  names: names,
                                  mappings: mappings
                              };
                              if (sourcesContent !== undefined) {
                                  map_1.sourcesContent = sourcesContent;
                              }
                              return JSON.stringify(map_1);
                          }
                          return "{\"version\":" + version + ",\"file\":\"" + ts.escapeString(file) + "\",\"sourceRoot\":\"" + ts.escapeString(sourceRoot) + "\",\"sources\":[" + serializeStringArray(sources) + "],\"names\":[" + serializeStringArray(names) + "],\"mappings\":\"" + ts.escapeString(mappings) + "\" " + (sourcesContent !== undefined ? ",\"sourcesContent\":[" + serializeStringArray(sourcesContent) + "]" : "") + "}";
                          function serializeStringArray(list) {
                              var output = "";
                              for (var i = 0, n = list.length; i < n; i++) {
                                  if (i) {
                                      output += ",";
                                  }
                                  output += "\"" + ts.escapeString(list[i]) + "\"";
                              }
                              return output;
                          }
                      }
                      function writeJavaScriptAndSourceMapFile(emitOutput, writeByteOrderMark) {
                          encodeLastRecordedSourceMapSpan();
                          var sourceMapText = serializeSourceMapContents(3, sourceMapData.sourceMapFile, sourceMapData.sourceMapSourceRoot, sourceMapData.sourceMapSources, sourceMapData.sourceMapNames, sourceMapData.sourceMapMappings, sourceMapData.sourceMapSourcesContent);
                          sourceMapDataList.push(sourceMapData);
                          var sourceMapUrl;
                          if (compilerOptions.inlineSourceMap) {
                              var base64SourceMapText = ts.convertToBase64(sourceMapText);
                              sourceMapUrl = "//# sourceMappingURL=data:application/json;base64," + base64SourceMapText;
                          }
                          else {
                              ts.writeFile(host, diagnostics, sourceMapData.sourceMapFilePath, sourceMapText, false);
                              sourceMapUrl = "//# sourceMappingURL=" + sourceMapData.jsSourceMappingURL;
                          }
                          writeJavaScriptFile(emitOutput + sourceMapUrl, writeByteOrderMark);
                      }
                      var sourceMapJsFile = ts.getBaseFileName(ts.normalizeSlashes(jsFilePath));
                      sourceMapData = {
                          sourceMapFilePath: jsFilePath + ".map",
                          jsSourceMappingURL: sourceMapJsFile + ".map",
                          sourceMapFile: sourceMapJsFile,
                          sourceMapSourceRoot: compilerOptions.sourceRoot || "",
                          sourceMapSources: [],
                          inputSourceFileNames: [],
                          sourceMapNames: [],
                          sourceMapMappings: "",
                          sourceMapSourcesContent: undefined,
                          sourceMapDecodedMappings: []
                      };
                      sourceMapData.sourceMapSourceRoot = ts.normalizeSlashes(sourceMapData.sourceMapSourceRoot);
                      if (sourceMapData.sourceMapSourceRoot.length && sourceMapData.sourceMapSourceRoot.charCodeAt(sourceMapData.sourceMapSourceRoot.length - 1) !== 47) {
                          sourceMapData.sourceMapSourceRoot += ts.directorySeparator;
                      }
                      if (compilerOptions.mapRoot) {
                          sourceMapDir = ts.normalizeSlashes(compilerOptions.mapRoot);
                          if (root) {
                              sourceMapDir = ts.getDirectoryPath(ts.getSourceFilePathInNewDir(root, host, sourceMapDir));
                          }
                          if (!ts.isRootedDiskPath(sourceMapDir) && !ts.isUrl(sourceMapDir)) {
                              sourceMapDir = ts.combinePaths(host.getCommonSourceDirectory(), sourceMapDir);
                              sourceMapData.jsSourceMappingURL = ts.getRelativePathToDirectoryOrUrl(ts.getDirectoryPath(ts.normalizePath(jsFilePath)), ts.combinePaths(sourceMapDir, sourceMapData.jsSourceMappingURL), host.getCurrentDirectory(), host.getCanonicalFileName, true);
                          }
                          else {
                              sourceMapData.jsSourceMappingURL = ts.combinePaths(sourceMapDir, sourceMapData.jsSourceMappingURL);
                          }
                      }
                      else {
                          sourceMapDir = ts.getDirectoryPath(ts.normalizePath(jsFilePath));
                      }
                      function emitNodeWithSourceMap(node, allowGeneratedIdentifiers) {
                          if (node) {
                              if (ts.nodeIsSynthesized(node)) {
                                  return emitNodeWithoutSourceMap(node, false);
                              }
                              if (node.kind != 228) {
                                  recordEmitNodeStartSpan(node);
                                  emitNodeWithoutSourceMap(node, allowGeneratedIdentifiers);
                                  recordEmitNodeEndSpan(node);
                              }
                              else {
                                  recordNewSourceFileStart(node);
                                  emitNodeWithoutSourceMap(node, false);
                              }
                          }
                      }
                      writeEmittedFiles = writeJavaScriptAndSourceMapFile;
                      emit = emitNodeWithSourceMap;
                      emitStart = recordEmitNodeStartSpan;
                      emitEnd = recordEmitNodeEndSpan;
                      emitToken = writeTextWithSpanRecord;
                      scopeEmitStart = recordScopeNameOfNode;
                      scopeEmitEnd = recordScopeNameEnd;
                      writeComment = writeCommentRangeWithMap;
                  }
                  function writeJavaScriptFile(emitOutput, writeByteOrderMark) {
                      ts.writeFile(host, diagnostics, jsFilePath, emitOutput, writeByteOrderMark);
                  }
                  function createTempVariable(flags) {
                      var result = ts.createSynthesizedNode(65);
                      result.text = makeTempVariableName(flags);
                      return result;
                  }
                  function recordTempDeclaration(name) {
                      if (!tempVariables) {
                          tempVariables = [];
                      }
                      tempVariables.push(name);
                  }
                  function createAndRecordTempVariable(flags) {
                      var temp = createTempVariable(flags);
                      recordTempDeclaration(temp);
                      return temp;
                  }
                  function emitTempDeclarations(newLine) {
                      if (tempVariables) {
                          if (newLine) {
                              writeLine();
                          }
                          else {
                              write(" ");
                          }
                          write("var ");
                          emitCommaList(tempVariables);
                          write(";");
                      }
                  }
                  function emitTokenText(tokenKind, startPos, emitFn) {
                      var tokenString = ts.tokenToString(tokenKind);
                      if (emitFn) {
                          emitFn();
                      }
                      else {
                          write(tokenString);
                      }
                      return startPos + tokenString.length;
                  }
                  function emitOptional(prefix, node) {
                      if (node) {
                          write(prefix);
                          emit(node);
                      }
                  }
                  function emitParenthesizedIf(node, parenthesized) {
                      if (parenthesized) {
                          write("(");
                      }
                      emit(node);
                      if (parenthesized) {
                          write(")");
                      }
                  }
                  function emitTrailingCommaIfPresent(nodeList) {
                      if (nodeList.hasTrailingComma) {
                          write(",");
                      }
                  }
                  function emitLinePreservingList(parent, nodes, allowTrailingComma, spacesBetweenBraces) {
                      ts.Debug.assert(nodes.length > 0);
                      increaseIndent();
                      if (nodeStartPositionsAreOnSameLine(parent, nodes[0])) {
                          if (spacesBetweenBraces) {
                              write(" ");
                          }
                      }
                      else {
                          writeLine();
                      }
                      for (var i = 0, n = nodes.length; i < n; i++) {
                          if (i) {
                              if (nodeEndIsOnSameLineAsNodeStart(nodes[i - 1], nodes[i])) {
                                  write(", ");
                              }
                              else {
                                  write(",");
                                  writeLine();
                              }
                          }
                          emit(nodes[i]);
                      }
                      if (nodes.hasTrailingComma && allowTrailingComma) {
                          write(",");
                      }
                      decreaseIndent();
                      if (nodeEndPositionsAreOnSameLine(parent, ts.lastOrUndefined(nodes))) {
                          if (spacesBetweenBraces) {
                              write(" ");
                          }
                      }
                      else {
                          writeLine();
                      }
                  }
                  function emitList(nodes, start, count, multiLine, trailingComma, leadingComma, noTrailingNewLine, emitNode) {
                      if (!emitNode) {
                          emitNode = emit;
                      }
                      for (var i = 0; i < count; i++) {
                          if (multiLine) {
                              if (i || leadingComma) {
                                  write(",");
                              }
                              writeLine();
                          }
                          else {
                              if (i || leadingComma) {
                                  write(", ");
                              }
                          }
                          emitNode(nodes[start + i]);
                          leadingComma = true;
                      }
                      if (trailingComma) {
                          write(",");
                      }
                      if (multiLine && !noTrailingNewLine) {
                          writeLine();
                      }
                      return count;
                  }
                  function emitCommaList(nodes) {
                      if (nodes) {
                          emitList(nodes, 0, nodes.length, false, false);
                      }
                  }
                  function emitLines(nodes) {
                      emitLinesStartingAt(nodes, 0);
                  }
                  function emitLinesStartingAt(nodes, startIndex) {
                      for (var i = startIndex; i < nodes.length; i++) {
                          writeLine();
                          emit(nodes[i]);
                      }
                  }
                  function isBinaryOrOctalIntegerLiteral(node, text) {
                      if (node.kind === 7 && text.length > 1) {
                          switch (text.charCodeAt(1)) {
                              case 98:
                              case 66:
                              case 111:
                              case 79:
                                  return true;
                          }
                      }
                      return false;
                  }
                  function emitLiteral(node) {
                      var text = getLiteralText(node);
                      if ((compilerOptions.sourceMap || compilerOptions.inlineSourceMap) && (node.kind === 8 || ts.isTemplateLiteralKind(node.kind))) {
                          writer.writeLiteral(text);
                      }
                      else if (languageVersion < 2 && isBinaryOrOctalIntegerLiteral(node, text)) {
                          write(node.text);
                      }
                      else {
                          write(text);
                      }
                  }
                  function getLiteralText(node) {
                      if (languageVersion < 2 && (ts.isTemplateLiteralKind(node.kind) || node.hasExtendedUnicodeEscape)) {
                          return getQuotedEscapedLiteralText('"', node.text, '"');
                      }
                      if (node.parent) {
                          return ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, node);
                      }
                      switch (node.kind) {
                          case 8:
                              return getQuotedEscapedLiteralText('"', node.text, '"');
                          case 10:
                              return getQuotedEscapedLiteralText('`', node.text, '`');
                          case 11:
                              return getQuotedEscapedLiteralText('`', node.text, '${');
                          case 12:
                              return getQuotedEscapedLiteralText('}', node.text, '${');
                          case 13:
                              return getQuotedEscapedLiteralText('}', node.text, '`');
                          case 7:
                              return node.text;
                      }
                      ts.Debug.fail("Literal kind '" + node.kind + "' not accounted for.");
                  }
                  function getQuotedEscapedLiteralText(leftQuote, text, rightQuote) {
                      return leftQuote + ts.escapeNonAsciiCharacters(ts.escapeString(text)) + rightQuote;
                  }
                  function emitDownlevelRawTemplateLiteral(node) {
                      var text = ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, node);
                      var isLast = node.kind === 10 || node.kind === 13;
                      text = text.substring(1, text.length - (isLast ? 1 : 2));
                      text = text.replace(/\r\n?/g, "\n");
                      text = ts.escapeString(text);
                      write('"' + text + '"');
                  }
                  function emitDownlevelTaggedTemplateArray(node, literalEmitter) {
                      write("[");
                      if (node.template.kind === 10) {
                          literalEmitter(node.template);
                      }
                      else {
                          literalEmitter(node.template.head);
                          ts.forEach(node.template.templateSpans, function (child) {
                              write(", ");
                              literalEmitter(child.literal);
                          });
                      }
                      write("]");
                  }
                  function emitDownlevelTaggedTemplate(node) {
                      var tempVariable = createAndRecordTempVariable(0);
                      write("(");
                      emit(tempVariable);
                      write(" = ");
                      emitDownlevelTaggedTemplateArray(node, emit);
                      write(", ");
                      emit(tempVariable);
                      write(".raw = ");
                      emitDownlevelTaggedTemplateArray(node, emitDownlevelRawTemplateLiteral);
                      write(", ");
                      emitParenthesizedIf(node.tag, needsParenthesisForPropertyAccessOrInvocation(node.tag));
                      write("(");
                      emit(tempVariable);
                      if (node.template.kind === 172) {
                          ts.forEach(node.template.templateSpans, function (templateSpan) {
                              write(", ");
                              var needsParens = templateSpan.expression.kind === 170
                                  && templateSpan.expression.operatorToken.kind === 23;
                              emitParenthesizedIf(templateSpan.expression, needsParens);
                          });
                      }
                      write("))");
                  }
                  function emitTemplateExpression(node) {
                      if (languageVersion >= 2) {
                          ts.forEachChild(node, emit);
                          return;
                      }
                      var emitOuterParens = ts.isExpression(node.parent)
                          && templateNeedsParens(node, node.parent);
                      if (emitOuterParens) {
                          write("(");
                      }
                      var headEmitted = false;
                      if (shouldEmitTemplateHead()) {
                          emitLiteral(node.head);
                          headEmitted = true;
                      }
                      for (var i = 0, n = node.templateSpans.length; i < n; i++) {
                          var templateSpan = node.templateSpans[i];
                          var needsParens = templateSpan.expression.kind !== 162
                              && comparePrecedenceToBinaryPlus(templateSpan.expression) !== 1;
                          if (i > 0 || headEmitted) {
                              write(" + ");
                          }
                          emitParenthesizedIf(templateSpan.expression, needsParens);
                          if (templateSpan.literal.text.length !== 0) {
                              write(" + ");
                              emitLiteral(templateSpan.literal);
                          }
                      }
                      if (emitOuterParens) {
                          write(")");
                      }
                      function shouldEmitTemplateHead() {
                          // If this expression has an empty head literal and the first template span has a non-empty
                          // literal, then emitting the empty head literal is not necessary.
                          //     `${ foo } and ${ bar }`
                          // can be emitted as
                          //     foo + " and " + bar
                          // This is because it is only required that one of the first two operands in the emit
                          // output must be a string literal, so that the other operand and all following operands
                          // are forced into strings.
                          //
                          // If the first template span has an empty literal, then the head must still be emitted.
                          //     `${ foo }${ bar }`
                          // must still be emitted as
                          //     "" + foo + bar
                          ts.Debug.assert(node.templateSpans.length !== 0);
                          return node.head.text.length !== 0 || node.templateSpans[0].literal.text.length === 0;
                      }
                      function templateNeedsParens(template, parent) {
                          switch (parent.kind) {
                              case 158:
                              case 159:
                                  return parent.expression === template;
                              case 160:
                              case 162:
                                  return false;
                              default:
                                  return comparePrecedenceToBinaryPlus(parent) !== -1;
                          }
                      }
                      function comparePrecedenceToBinaryPlus(expression) {
                          switch (expression.kind) {
                              case 170:
                                  switch (expression.operatorToken.kind) {
                                      case 35:
                                      case 36:
                                      case 37:
                                          return 1;
                                      case 33:
                                      case 34:
                                          return 0;
                                      default:
                                          return -1;
                                  }
                              case 173:
                              case 171:
                                  return -1;
                              default:
                                  return 1;
                          }
                      }
                  }
                  function emitTemplateSpan(span) {
                      emit(span.expression);
                      emit(span.literal);
                  }
                  function emitExpressionForPropertyName(node) {
                      ts.Debug.assert(node.kind !== 153);
                      if (node.kind === 8) {
                          emitLiteral(node);
                      }
                      else if (node.kind === 128) {
                          if (ts.nodeIsDecorated(node.parent)) {
                              if (!computedPropertyNamesToGeneratedNames) {
                                  computedPropertyNamesToGeneratedNames = [];
                              }
                              var generatedName = computedPropertyNamesToGeneratedNames[ts.getNodeId(node)];
                              if (generatedName) {
                                  write(generatedName);
                                  return;
                              }
                              generatedName = createAndRecordTempVariable(0).text;
                              computedPropertyNamesToGeneratedNames[ts.getNodeId(node)] = generatedName;
                              write(generatedName);
                              write(" = ");
                          }
                          emit(node.expression);
                      }
                      else {
                          write("\"");
                          if (node.kind === 7) {
                              write(node.text);
                          }
                          else {
                              writeTextOfNode(currentSourceFile, node);
                          }
                          write("\"");
                      }
                  }
                  function isNotExpressionIdentifier(node) {
                      var parent = node.parent;
                      switch (parent.kind) {
                          case 130:
                          case 199:
                          case 153:
                          case 133:
                          case 132:
                          case 225:
                          case 226:
                          case 227:
                          case 135:
                          case 134:
                          case 201:
                          case 137:
                          case 138:
                          case 163:
                          case 202:
                          case 203:
                          case 205:
                          case 206:
                          case 209:
                          case 211:
                          case 212:
                              return parent.name === node;
                          case 214:
                          case 218:
                              return parent.name === node || parent.propertyName === node;
                          case 191:
                          case 190:
                          case 215:
                              return false;
                          case 195:
                              return node.parent.label === node;
                      }
                  }
                  function emitExpressionIdentifier(node) {
                      var substitution = resolver.getExpressionNameSubstitution(node, getGeneratedNameForNode);
                      if (substitution) {
                          write(substitution);
                      }
                      else {
                          writeTextOfNode(currentSourceFile, node);
                      }
                  }
                  function getGeneratedNameForIdentifier(node) {
                      if (ts.nodeIsSynthesized(node) || !blockScopedVariableToGeneratedName) {
                          return undefined;
                      }
                      var variableId = resolver.getBlockScopedVariableId(node);
                      if (variableId === undefined) {
                          return undefined;
                      }
                      return blockScopedVariableToGeneratedName[variableId];
                  }
                  function emitIdentifier(node, allowGeneratedIdentifiers) {
                      if (allowGeneratedIdentifiers) {
                          var generatedName = getGeneratedNameForIdentifier(node);
                          if (generatedName) {
                              write(generatedName);
                              return;
                          }
                      }
                      if (!node.parent) {
                          write(node.text);
                      }
                      else if (!isNotExpressionIdentifier(node)) {
                          emitExpressionIdentifier(node);
                      }
                      else {
                          writeTextOfNode(currentSourceFile, node);
                      }
                  }
                  function emitThis(node) {
                      if (resolver.getNodeCheckFlags(node) & 2) {
                          write("_this");
                      }
                      else {
                          write("this");
                      }
                  }
                  function emitSuper(node) {
                      if (languageVersion >= 2) {
                          write("super");
                      }
                      else {
                          var flags = resolver.getNodeCheckFlags(node);
                          if (flags & 16) {
                              write("_super.prototype");
                          }
                          else {
                              write("_super");
                          }
                      }
                  }
                  function emitObjectBindingPattern(node) {
                      write("{ ");
                      var elements = node.elements;
                      emitList(elements, 0, elements.length, false, elements.hasTrailingComma);
                      write(" }");
                  }
                  function emitArrayBindingPattern(node) {
                      write("[");
                      var elements = node.elements;
                      emitList(elements, 0, elements.length, false, elements.hasTrailingComma);
                      write("]");
                  }
                  function emitBindingElement(node) {
                      if (node.propertyName) {
                          emit(node.propertyName, false);
                          write(": ");
                      }
                      if (node.dotDotDotToken) {
                          write("...");
                      }
                      if (ts.isBindingPattern(node.name)) {
                          emit(node.name);
                      }
                      else {
                          emitModuleMemberName(node);
                      }
                      emitOptional(" = ", node.initializer);
                  }
                  function emitSpreadElementExpression(node) {
                      write("...");
                      emit(node.expression);
                  }
                  function emitYieldExpression(node) {
                      write(ts.tokenToString(110));
                      if (node.asteriskToken) {
                          write("*");
                      }
                      if (node.expression) {
                          write(" ");
                          emit(node.expression);
                      }
                  }
                  function needsParenthesisForPropertyAccessOrInvocation(node) {
                      switch (node.kind) {
                          case 65:
                          case 154:
                          case 156:
                          case 157:
                          case 158:
                          case 162:
                              return false;
                      }
                      return true;
                  }
                  function emitListWithSpread(elements, alwaysCopy, multiLine, trailingComma) {
                      var pos = 0;
                      var group = 0;
                      var length = elements.length;
                      while (pos < length) {
                          if (group === 1) {
                              write(".concat(");
                          }
                          else if (group > 1) {
                              write(", ");
                          }
                          var e = elements[pos];
                          if (e.kind === 174) {
                              e = e.expression;
                              emitParenthesizedIf(e, group === 0 && needsParenthesisForPropertyAccessOrInvocation(e));
                              pos++;
                              if (pos === length && group === 0 && alwaysCopy && e.kind !== 154) {
                                  write(".slice()");
                              }
                          }
                          else {
                              var i = pos;
                              while (i < length && elements[i].kind !== 174) {
                                  i++;
                              }
                              write("[");
                              if (multiLine) {
                                  increaseIndent();
                              }
                              emitList(elements, pos, i - pos, multiLine, trailingComma && i === length);
                              if (multiLine) {
                                  decreaseIndent();
                              }
                              write("]");
                              pos = i;
                          }
                          group++;
                      }
                      if (group > 1) {
                          write(")");
                      }
                  }
                  function isSpreadElementExpression(node) {
                      return node.kind === 174;
                  }
                  function emitArrayLiteral(node) {
                      var elements = node.elements;
                      if (elements.length === 0) {
                          write("[]");
                      }
                      else if (languageVersion >= 2 || !ts.forEach(elements, isSpreadElementExpression)) {
                          write("[");
                          emitLinePreservingList(node, node.elements, elements.hasTrailingComma, false);
                          write("]");
                      }
                      else {
                          emitListWithSpread(elements, true, (node.flags & 512) !== 0, elements.hasTrailingComma);
                      }
                  }
                  function emitObjectLiteralBody(node, numElements) {
                      if (numElements === 0) {
                          write("{}");
                          return;
                      }
                      write("{");
                      if (numElements > 0) {
                          var properties = node.properties;
                          if (numElements === properties.length) {
                              emitLinePreservingList(node, properties, languageVersion >= 1, true);
                          }
                          else {
                              var multiLine = (node.flags & 512) !== 0;
                              if (!multiLine) {
                                  write(" ");
                              }
                              else {
                                  increaseIndent();
                              }
                              emitList(properties, 0, numElements, multiLine, false);
                              if (!multiLine) {
                                  write(" ");
                              }
                              else {
                                  decreaseIndent();
                              }
                          }
                      }
                      write("}");
                  }
                  function emitDownlevelObjectLiteralWithComputedProperties(node, firstComputedPropertyIndex) {
                      var multiLine = (node.flags & 512) !== 0;
                      var properties = node.properties;
                      write("(");
                      if (multiLine) {
                          increaseIndent();
                      }
                      var tempVar = createAndRecordTempVariable(0);
                      emit(tempVar);
                      write(" = ");
                      emitObjectLiteralBody(node, firstComputedPropertyIndex);
                      for (var i = firstComputedPropertyIndex, n = properties.length; i < n; i++) {
                          writeComma();
                          var property = properties[i];
                          emitStart(property);
                          if (property.kind === 137 || property.kind === 138) {
                              var accessors = ts.getAllAccessorDeclarations(node.properties, property);
                              if (property !== accessors.firstAccessor) {
                                  continue;
                              }
                              write("Object.defineProperty(");
                              emit(tempVar);
                              write(", ");
                              emitStart(node.name);
                              emitExpressionForPropertyName(property.name);
                              emitEnd(property.name);
                              write(", {");
                              increaseIndent();
                              if (accessors.getAccessor) {
                                  writeLine();
                                  emitLeadingComments(accessors.getAccessor);
                                  write("get: ");
                                  emitStart(accessors.getAccessor);
                                  write("function ");
                                  emitSignatureAndBody(accessors.getAccessor);
                                  emitEnd(accessors.getAccessor);
                                  emitTrailingComments(accessors.getAccessor);
                                  write(",");
                              }
                              if (accessors.setAccessor) {
                                  writeLine();
                                  emitLeadingComments(accessors.setAccessor);
                                  write("set: ");
                                  emitStart(accessors.setAccessor);
                                  write("function ");
                                  emitSignatureAndBody(accessors.setAccessor);
                                  emitEnd(accessors.setAccessor);
                                  emitTrailingComments(accessors.setAccessor);
                                  write(",");
                              }
                              writeLine();
                              write("enumerable: true,");
                              writeLine();
                              write("configurable: true");
                              decreaseIndent();
                              writeLine();
                              write("})");
                              emitEnd(property);
                          }
                          else {
                              emitLeadingComments(property);
                              emitStart(property.name);
                              emit(tempVar);
                              emitMemberAccessForPropertyName(property.name);
                              emitEnd(property.name);
                              write(" = ");
                              if (property.kind === 225) {
                                  emit(property.initializer);
                              }
                              else if (property.kind === 226) {
                                  emitExpressionIdentifier(property.name);
                              }
                              else if (property.kind === 135) {
                                  emitFunctionDeclaration(property);
                              }
                              else {
                                  ts.Debug.fail("ObjectLiteralElement type not accounted for: " + property.kind);
                              }
                          }
                          emitEnd(property);
                      }
                      writeComma();
                      emit(tempVar);
                      if (multiLine) {
                          decreaseIndent();
                          writeLine();
                      }
                      write(")");
                      function writeComma() {
                          if (multiLine) {
                              write(",");
                              writeLine();
                          }
                          else {
                              write(", ");
                          }
                      }
                  }
                  function emitObjectLiteral(node) {
                      var properties = node.properties;
                      if (languageVersion < 2) {
                          var numProperties = properties.length;
                          var numInitialNonComputedProperties = numProperties;
                          for (var i = 0, n = properties.length; i < n; i++) {
                              if (properties[i].name.kind === 128) {
                                  numInitialNonComputedProperties = i;
                                  break;
                              }
                          }
                          var hasComputedProperty = numInitialNonComputedProperties !== properties.length;
                          if (hasComputedProperty) {
                              emitDownlevelObjectLiteralWithComputedProperties(node, numInitialNonComputedProperties);
                              return;
                          }
                      }
                      emitObjectLiteralBody(node, properties.length);
                  }
                  function createBinaryExpression(left, operator, right, startsOnNewLine) {
                      var result = ts.createSynthesizedNode(170, startsOnNewLine);
                      result.operatorToken = ts.createSynthesizedNode(operator);
                      result.left = left;
                      result.right = right;
                      return result;
                  }
                  function createPropertyAccessExpression(expression, name) {
                      var result = ts.createSynthesizedNode(156);
                      result.expression = parenthesizeForAccess(expression);
                      result.dotToken = ts.createSynthesizedNode(20);
                      result.name = name;
                      return result;
                  }
                  function createElementAccessExpression(expression, argumentExpression) {
                      var result = ts.createSynthesizedNode(157);
                      result.expression = parenthesizeForAccess(expression);
                      result.argumentExpression = argumentExpression;
                      return result;
                  }
                  function parenthesizeForAccess(expr) {
                      if (ts.isLeftHandSideExpression(expr) && expr.kind !== 159 && expr.kind !== 7) {
                          return expr;
                      }
                      var node = ts.createSynthesizedNode(162);
                      node.expression = expr;
                      return node;
                  }
                  function emitComputedPropertyName(node) {
                      write("[");
                      emitExpressionForPropertyName(node);
                      write("]");
                  }
                  function emitMethod(node) {
                      if (languageVersion >= 2 && node.asteriskToken) {
                          write("*");
                      }
                      emit(node.name, false);
                      if (languageVersion < 2) {
                          write(": function ");
                      }
                      emitSignatureAndBody(node);
                  }
                  function emitPropertyAssignment(node) {
                      emit(node.name, false);
                      write(": ");
                      emit(node.initializer);
                  }
                  function emitShorthandPropertyAssignment(node) {
                      emit(node.name, false);
                      if (languageVersion < 2) {
                          write(": ");
                          var generatedName = getGeneratedNameForIdentifier(node.name);
                          if (generatedName) {
                              write(generatedName);
                          }
                          else {
                              emitExpressionIdentifier(node.name);
                          }
                      }
                      else if (resolver.getExpressionNameSubstitution(node.name, getGeneratedNameForNode)) {
                          write(": ");
                          emitExpressionIdentifier(node.name);
                      }
                  }
                  function tryEmitConstantValue(node) {
                      if (compilerOptions.separateCompilation) {
                          return false;
                      }
                      var constantValue = resolver.getConstantValue(node);
                      if (constantValue !== undefined) {
                          write(constantValue.toString());
                          if (!compilerOptions.removeComments) {
                              var propertyName = node.kind === 156 ? ts.declarationNameToString(node.name) : ts.getTextOfNode(node.argumentExpression);
                              write(" /* " + propertyName + " */");
                          }
                          return true;
                      }
                      return false;
                  }
                  function indentIfOnDifferentLines(parent, node1, node2, valueToWriteWhenNotIndenting) {
                      var realNodesAreOnDifferentLines = !ts.nodeIsSynthesized(parent) && !nodeEndIsOnSameLineAsNodeStart(node1, node2);
                      var synthesizedNodeIsOnDifferentLine = synthesizedNodeStartsOnNewLine(node2);
                      if (realNodesAreOnDifferentLines || synthesizedNodeIsOnDifferentLine) {
                          increaseIndent();
                          writeLine();
                          return true;
                      }
                      else {
                          if (valueToWriteWhenNotIndenting) {
                              write(valueToWriteWhenNotIndenting);
                          }
                          return false;
                      }
                  }
                  function emitPropertyAccess(node) {
                      if (tryEmitConstantValue(node)) {
                          return;
                      }
                      emit(node.expression);
                      var indentedBeforeDot = indentIfOnDifferentLines(node, node.expression, node.dotToken);
                      write(".");
                      var indentedAfterDot = indentIfOnDifferentLines(node, node.dotToken, node.name);
                      emit(node.name, false);
                      decreaseIndentIf(indentedBeforeDot, indentedAfterDot);
                  }
                  function emitQualifiedName(node) {
                      emit(node.left);
                      write(".");
                      emit(node.right);
                  }
                  function emitIndexedAccess(node) {
                      if (tryEmitConstantValue(node)) {
                          return;
                      }
                      emit(node.expression);
                      write("[");
                      emit(node.argumentExpression);
                      write("]");
                  }
                  function hasSpreadElement(elements) {
                      return ts.forEach(elements, function (e) { return e.kind === 174; });
                  }
                  function skipParentheses(node) {
                      while (node.kind === 162 || node.kind === 161) {
                          node = node.expression;
                      }
                      return node;
                  }
                  function emitCallTarget(node) {
                      if (node.kind === 65 || node.kind === 93 || node.kind === 91) {
                          emit(node);
                          return node;
                      }
                      var temp = createAndRecordTempVariable(0);
                      write("(");
                      emit(temp);
                      write(" = ");
                      emit(node);
                      write(")");
                      return temp;
                  }
                  function emitCallWithSpread(node) {
                      var target;
                      var expr = skipParentheses(node.expression);
                      if (expr.kind === 156) {
                          target = emitCallTarget(expr.expression);
                          write(".");
                          emit(expr.name);
                      }
                      else if (expr.kind === 157) {
                          target = emitCallTarget(expr.expression);
                          write("[");
                          emit(expr.argumentExpression);
                          write("]");
                      }
                      else if (expr.kind === 91) {
                          target = expr;
                          write("_super");
                      }
                      else {
                          emit(node.expression);
                      }
                      write(".apply(");
                      if (target) {
                          if (target.kind === 91) {
                              emitThis(target);
                          }
                          else {
                              emit(target);
                          }
                      }
                      else {
                          write("void 0");
                      }
                      write(", ");
                      emitListWithSpread(node.arguments, false, false, false);
                      write(")");
                  }
                  function emitCallExpression(node) {
                      if (languageVersion < 2 && hasSpreadElement(node.arguments)) {
                          emitCallWithSpread(node);
                          return;
                      }
                      var superCall = false;
                      if (node.expression.kind === 91) {
                          emitSuper(node.expression);
                          superCall = true;
                      }
                      else {
                          emit(node.expression);
                          superCall = node.expression.kind === 156 && node.expression.expression.kind === 91;
                      }
                      if (superCall && languageVersion < 2) {
                          write(".call(");
                          emitThis(node.expression);
                          if (node.arguments.length) {
                              write(", ");
                              emitCommaList(node.arguments);
                          }
                          write(")");
                      }
                      else {
                          write("(");
                          emitCommaList(node.arguments);
                          write(")");
                      }
                  }
                  function emitNewExpression(node) {
                      write("new ");
                      emit(node.expression);
                      if (node.arguments) {
                          write("(");
                          emitCommaList(node.arguments);
                          write(")");
                      }
                  }
                  function emitTaggedTemplateExpression(node) {
                      if (languageVersion >= 2) {
                          emit(node.tag);
                          write(" ");
                          emit(node.template);
                      }
                      else {
                          emitDownlevelTaggedTemplate(node);
                      }
                  }
                  function emitParenExpression(node) {
                      if (!node.parent || node.parent.kind !== 164) {
                          if (node.expression.kind === 161) {
                              var operand = node.expression.expression;
                              while (operand.kind == 161) {
                                  operand = operand.expression;
                              }
                              if (operand.kind !== 168 &&
                                  operand.kind !== 167 &&
                                  operand.kind !== 166 &&
                                  operand.kind !== 165 &&
                                  operand.kind !== 169 &&
                                  operand.kind !== 159 &&
                                  !(operand.kind === 158 && node.parent.kind === 159) &&
                                  !(operand.kind === 163 && node.parent.kind === 158)) {
                                  emit(operand);
                                  return;
                              }
                          }
                      }
                      write("(");
                      emit(node.expression);
                      write(")");
                  }
                  function emitDeleteExpression(node) {
                      write(ts.tokenToString(74));
                      write(" ");
                      emit(node.expression);
                  }
                  function emitVoidExpression(node) {
                      write(ts.tokenToString(99));
                      write(" ");
                      emit(node.expression);
                  }
                  function emitTypeOfExpression(node) {
                      write(ts.tokenToString(97));
                      write(" ");
                      emit(node.expression);
                  }
                  function isNameOfExportedSourceLevelDeclarationInSystemExternalModule(node) {
                      if (!isCurrentFileSystemExternalModule() || node.kind !== 65 || ts.nodeIsSynthesized(node)) {
                          return false;
                      }
                      var isVariableDeclarationOrBindingElement = node.parent && (node.parent.kind === 199 || node.parent.kind === 153);
                      var targetDeclaration = isVariableDeclarationOrBindingElement
                          ? node.parent
                          : resolver.getReferencedValueDeclaration(node);
                      return isSourceFileLevelDeclarationInSystemJsModule(targetDeclaration, true);
                  }
                  function emitPrefixUnaryExpression(node) {
                      var exportChanged = isNameOfExportedSourceLevelDeclarationInSystemExternalModule(node.operand);
                      if (exportChanged) {
                          write(exportFunctionForFile + "(\"");
                          emitNodeWithoutSourceMap(node.operand);
                          write("\", ");
                      }
                      write(ts.tokenToString(node.operator));
                      if (node.operand.kind === 168) {
                          var operand = node.operand;
                          if (node.operator === 33 && (operand.operator === 33 || operand.operator === 38)) {
                              write(" ");
                          }
                          else if (node.operator === 34 && (operand.operator === 34 || operand.operator === 39)) {
                              write(" ");
                          }
                      }
                      emit(node.operand);
                      if (exportChanged) {
                          write(")");
                      }
                  }
                  function emitPostfixUnaryExpression(node) {
                      var exportChanged = isNameOfExportedSourceLevelDeclarationInSystemExternalModule(node.operand);
                      if (exportChanged) {
                          write("(" + exportFunctionForFile + "(\"");
                          emitNodeWithoutSourceMap(node.operand);
                          write("\", ");
                          write(ts.tokenToString(node.operator));
                          emit(node.operand);
                          if (node.operator === 38) {
                              write(") - 1)");
                          }
                          else {
                              write(") + 1)");
                          }
                      }
                      else {
                          emit(node.operand);
                          write(ts.tokenToString(node.operator));
                      }
                  }
                  function shouldHoistDeclarationInSystemJsModule(node) {
                      return isSourceFileLevelDeclarationInSystemJsModule(node, false);
                  }
                  function isSourceFileLevelDeclarationInSystemJsModule(node, isExported) {
                      if (!node || languageVersion >= 2 || !isCurrentFileSystemExternalModule()) {
                          return false;
                      }
                      var current = node;
                      while (current) {
                          if (current.kind === 228) {
                              return !isExported || ((ts.getCombinedNodeFlags(node) & 1) !== 0);
                          }
                          else if (ts.isFunctionLike(current) || current.kind === 207) {
                              return false;
                          }
                          else {
                              current = current.parent;
                          }
                      }
                  }
                  function emitBinaryExpression(node) {
                      if (languageVersion < 2 && node.operatorToken.kind === 53 &&
                          (node.left.kind === 155 || node.left.kind === 154)) {
                          emitDestructuring(node, node.parent.kind === 183);
                      }
                      else {
                          var exportChanged = node.operatorToken.kind >= 53 &&
                              node.operatorToken.kind <= 64 &&
                              isNameOfExportedSourceLevelDeclarationInSystemExternalModule(node.left);
                          if (exportChanged) {
                              write(exportFunctionForFile + "(\"");
                              emitNodeWithoutSourceMap(node.left);
                              write("\", ");
                          }
                          emit(node.left);
                          var indentedBeforeOperator = indentIfOnDifferentLines(node, node.left, node.operatorToken, node.operatorToken.kind !== 23 ? " " : undefined);
                          write(ts.tokenToString(node.operatorToken.kind));
                          var indentedAfterOperator = indentIfOnDifferentLines(node, node.operatorToken, node.right, " ");
                          emit(node.right);
                          decreaseIndentIf(indentedBeforeOperator, indentedAfterOperator);
                          if (exportChanged) {
                              write(")");
                          }
                      }
                  }
                  function synthesizedNodeStartsOnNewLine(node) {
                      return ts.nodeIsSynthesized(node) && node.startsOnNewLine;
                  }
                  function emitConditionalExpression(node) {
                      emit(node.condition);
                      var indentedBeforeQuestion = indentIfOnDifferentLines(node, node.condition, node.questionToken, " ");
                      write("?");
                      var indentedAfterQuestion = indentIfOnDifferentLines(node, node.questionToken, node.whenTrue, " ");
                      emit(node.whenTrue);
                      decreaseIndentIf(indentedBeforeQuestion, indentedAfterQuestion);
                      var indentedBeforeColon = indentIfOnDifferentLines(node, node.whenTrue, node.colonToken, " ");
                      write(":");
                      var indentedAfterColon = indentIfOnDifferentLines(node, node.colonToken, node.whenFalse, " ");
                      emit(node.whenFalse);
                      decreaseIndentIf(indentedBeforeColon, indentedAfterColon);
                  }
                  function decreaseIndentIf(value1, value2) {
                      if (value1) {
                          decreaseIndent();
                      }
                      if (value2) {
                          decreaseIndent();
                      }
                  }
                  function isSingleLineEmptyBlock(node) {
                      if (node && node.kind === 180) {
                          var block = node;
                          return block.statements.length === 0 && nodeEndIsOnSameLineAsNodeStart(block, block);
                      }
                  }
                  function emitBlock(node) {
                      if (isSingleLineEmptyBlock(node)) {
                          emitToken(14, node.pos);
                          write(" ");
                          emitToken(15, node.statements.end);
                          return;
                      }
                      emitToken(14, node.pos);
                      increaseIndent();
                      scopeEmitStart(node.parent);
                      if (node.kind === 207) {
                          ts.Debug.assert(node.parent.kind === 206);
                          emitCaptureThisForNodeIfNecessary(node.parent);
                      }
                      emitLines(node.statements);
                      if (node.kind === 207) {
                          emitTempDeclarations(true);
                      }
                      decreaseIndent();
                      writeLine();
                      emitToken(15, node.statements.end);
                      scopeEmitEnd();
                  }
                  function emitEmbeddedStatement(node) {
                      if (node.kind === 180) {
                          write(" ");
                          emit(node);
                      }
                      else {
                          increaseIndent();
                          writeLine();
                          emit(node);
                          decreaseIndent();
                      }
                  }
                  function emitExpressionStatement(node) {
                      emitParenthesizedIf(node.expression, node.expression.kind === 164);
                      write(";");
                  }
                  function emitIfStatement(node) {
                      var endPos = emitToken(84, node.pos);
                      write(" ");
                      endPos = emitToken(16, endPos);
                      emit(node.expression);
                      emitToken(17, node.expression.end);
                      emitEmbeddedStatement(node.thenStatement);
                      if (node.elseStatement) {
                          writeLine();
                          emitToken(76, node.thenStatement.end);
                          if (node.elseStatement.kind === 184) {
                              write(" ");
                              emit(node.elseStatement);
                          }
                          else {
                              emitEmbeddedStatement(node.elseStatement);
                          }
                      }
                  }
                  function emitDoStatement(node) {
                      write("do");
                      emitEmbeddedStatement(node.statement);
                      if (node.statement.kind === 180) {
                          write(" ");
                      }
                      else {
                          writeLine();
                      }
                      write("while (");
                      emit(node.expression);
                      write(");");
                  }
                  function emitWhileStatement(node) {
                      write("while (");
                      emit(node.expression);
                      write(")");
                      emitEmbeddedStatement(node.statement);
                  }
                  function tryEmitStartOfVariableDeclarationList(decl, startPos) {
                      if (shouldHoistVariable(decl, true)) {
                          return false;
                      }
                      var tokenKind = 98;
                      if (decl && languageVersion >= 2) {
                          if (ts.isLet(decl)) {
                              tokenKind = 104;
                          }
                          else if (ts.isConst(decl)) {
                              tokenKind = 70;
                          }
                      }
                      if (startPos !== undefined) {
                          emitToken(tokenKind, startPos);
                          write(" ");
                      }
                      else {
                          switch (tokenKind) {
                              case 98:
                                  write("var ");
                                  break;
                              case 104:
                                  write("let ");
                                  break;
                              case 70:
                                  write("const ");
                                  break;
                          }
                      }
                      return true;
                  }
                  function emitVariableDeclarationListSkippingUninitializedEntries(list) {
                      var started = false;
                      for (var _a = 0, _b = list.declarations; _a < _b.length; _a++) {
                          var decl = _b[_a];
                          if (!decl.initializer) {
                              continue;
                          }
                          if (!started) {
                              started = true;
                          }
                          else {
                              write(", ");
                          }
                          emit(decl);
                      }
                      return started;
                  }
                  function emitForStatement(node) {
                      var endPos = emitToken(82, node.pos);
                      write(" ");
                      endPos = emitToken(16, endPos);
                      if (node.initializer && node.initializer.kind === 200) {
                          var variableDeclarationList = node.initializer;
                          var startIsEmitted = tryEmitStartOfVariableDeclarationList(variableDeclarationList, endPos);
                          if (startIsEmitted) {
                              emitCommaList(variableDeclarationList.declarations);
                          }
                          else {
                              emitVariableDeclarationListSkippingUninitializedEntries(variableDeclarationList);
                          }
                      }
                      else if (node.initializer) {
                          emit(node.initializer);
                      }
                      write(";");
                      emitOptional(" ", node.condition);
                      write(";");
                      emitOptional(" ", node.incrementor);
                      write(")");
                      emitEmbeddedStatement(node.statement);
                  }
                  function emitForInOrForOfStatement(node) {
                      if (languageVersion < 2 && node.kind === 189) {
                          return emitDownLevelForOfStatement(node);
                      }
                      var endPos = emitToken(82, node.pos);
                      write(" ");
                      endPos = emitToken(16, endPos);
                      if (node.initializer.kind === 200) {
                          var variableDeclarationList = node.initializer;
                          if (variableDeclarationList.declarations.length >= 1) {
                              tryEmitStartOfVariableDeclarationList(variableDeclarationList, endPos);
                              emit(variableDeclarationList.declarations[0]);
                          }
                      }
                      else {
                          emit(node.initializer);
                      }
                      if (node.kind === 188) {
                          write(" in ");
                      }
                      else {
                          write(" of ");
                      }
                      emit(node.expression);
                      emitToken(17, node.expression.end);
                      emitEmbeddedStatement(node.statement);
                  }
                  function emitDownLevelForOfStatement(node) {
                      // The following ES6 code:
                      //
                      //    for (let v of expr) { }
                      //
                      // should be emitted as
                      //
                      //    for (let _i = 0, _a = expr; _i < _a.length; _i++) {
                      //        let v = _a[_i];
                      //    }
                      //
                      // where _a and _i are temps emitted to capture the RHS and the counter,
                      // respectively.
                      // When the left hand side is an expression instead of a let declaration,
                      // the "let v" is not emitted.
                      // When the left hand side is a let/const, the v is renamed if there is
                      // another v in scope.
                      // Note that all assignments to the LHS are emitted in the body, including
                      // all destructuring.
                      // Note also that because an extra statement is needed to assign to the LHS,
                      // for-of bodies are always emitted as blocks.
                      var endPos = emitToken(82, node.pos);
                      write(" ");
                      endPos = emitToken(16, endPos);
                      var rhsIsIdentifier = node.expression.kind === 65;
                      var counter = createTempVariable(268435456);
                      var rhsReference = rhsIsIdentifier ? node.expression : createTempVariable(0);
                      emitStart(node.expression);
                      write("var ");
                      emitNodeWithoutSourceMap(counter);
                      write(" = 0");
                      emitEnd(node.expression);
                      if (!rhsIsIdentifier) {
                          write(", ");
                          emitStart(node.expression);
                          emitNodeWithoutSourceMap(rhsReference);
                          write(" = ");
                          emitNodeWithoutSourceMap(node.expression);
                          emitEnd(node.expression);
                      }
                      write("; ");
                      emitStart(node.initializer);
                      emitNodeWithoutSourceMap(counter);
                      write(" < ");
                      emitNodeWithoutSourceMap(rhsReference);
                      write(".length");
                      emitEnd(node.initializer);
                      write("; ");
                      emitStart(node.initializer);
                      emitNodeWithoutSourceMap(counter);
                      write("++");
                      emitEnd(node.initializer);
                      emitToken(17, node.expression.end);
                      write(" {");
                      writeLine();
                      increaseIndent();
                      var rhsIterationValue = createElementAccessExpression(rhsReference, counter);
                      emitStart(node.initializer);
                      if (node.initializer.kind === 200) {
                          write("var ");
                          var variableDeclarationList = node.initializer;
                          if (variableDeclarationList.declarations.length > 0) {
                              var declaration = variableDeclarationList.declarations[0];
                              if (ts.isBindingPattern(declaration.name)) {
                                  emitDestructuring(declaration, false, rhsIterationValue);
                              }
                              else {
                                  emitNodeWithoutSourceMap(declaration);
                                  write(" = ");
                                  emitNodeWithoutSourceMap(rhsIterationValue);
                              }
                          }
                          else {
                              emitNodeWithoutSourceMap(createTempVariable(0));
                              write(" = ");
                              emitNodeWithoutSourceMap(rhsIterationValue);
                          }
                      }
                      else {
                          var assignmentExpression = createBinaryExpression(node.initializer, 53, rhsIterationValue, false);
                          if (node.initializer.kind === 154 || node.initializer.kind === 155) {
                              emitDestructuring(assignmentExpression, true, undefined);
                          }
                          else {
                              emitNodeWithoutSourceMap(assignmentExpression);
                          }
                      }
                      emitEnd(node.initializer);
                      write(";");
                      if (node.statement.kind === 180) {
                          emitLines(node.statement.statements);
                      }
                      else {
                          writeLine();
                          emit(node.statement);
                      }
                      writeLine();
                      decreaseIndent();
                      write("}");
                  }
                  function emitBreakOrContinueStatement(node) {
                      emitToken(node.kind === 191 ? 66 : 71, node.pos);
                      emitOptional(" ", node.label);
                      write(";");
                  }
                  function emitReturnStatement(node) {
                      emitToken(90, node.pos);
                      emitOptional(" ", node.expression);
                      write(";");
                  }
                  function emitWithStatement(node) {
                      write("with (");
                      emit(node.expression);
                      write(")");
                      emitEmbeddedStatement(node.statement);
                  }
                  function emitSwitchStatement(node) {
                      var endPos = emitToken(92, node.pos);
                      write(" ");
                      emitToken(16, endPos);
                      emit(node.expression);
                      endPos = emitToken(17, node.expression.end);
                      write(" ");
                      emitCaseBlock(node.caseBlock, endPos);
                  }
                  function emitCaseBlock(node, startPos) {
                      emitToken(14, startPos);
                      increaseIndent();
                      emitLines(node.clauses);
                      decreaseIndent();
                      writeLine();
                      emitToken(15, node.clauses.end);
                  }
                  function nodeStartPositionsAreOnSameLine(node1, node2) {
                      return ts.getLineOfLocalPosition(currentSourceFile, ts.skipTrivia(currentSourceFile.text, node1.pos)) ===
                          ts.getLineOfLocalPosition(currentSourceFile, ts.skipTrivia(currentSourceFile.text, node2.pos));
                  }
                  function nodeEndPositionsAreOnSameLine(node1, node2) {
                      return ts.getLineOfLocalPosition(currentSourceFile, node1.end) ===
                          ts.getLineOfLocalPosition(currentSourceFile, node2.end);
                  }
                  function nodeEndIsOnSameLineAsNodeStart(node1, node2) {
                      return ts.getLineOfLocalPosition(currentSourceFile, node1.end) ===
                          ts.getLineOfLocalPosition(currentSourceFile, ts.skipTrivia(currentSourceFile.text, node2.pos));
                  }
                  function emitCaseOrDefaultClause(node) {
                      if (node.kind === 221) {
                          write("case ");
                          emit(node.expression);
                          write(":");
                      }
                      else {
                          write("default:");
                      }
                      if (node.statements.length === 1 && nodeStartPositionsAreOnSameLine(node, node.statements[0])) {
                          write(" ");
                          emit(node.statements[0]);
                      }
                      else {
                          increaseIndent();
                          emitLines(node.statements);
                          decreaseIndent();
                      }
                  }
                  function emitThrowStatement(node) {
                      write("throw ");
                      emit(node.expression);
                      write(";");
                  }
                  function emitTryStatement(node) {
                      write("try ");
                      emit(node.tryBlock);
                      emit(node.catchClause);
                      if (node.finallyBlock) {
                          writeLine();
                          write("finally ");
                          emit(node.finallyBlock);
                      }
                  }
                  function emitCatchClause(node) {
                      writeLine();
                      var endPos = emitToken(68, node.pos);
                      write(" ");
                      emitToken(16, endPos);
                      emit(node.variableDeclaration);
                      emitToken(17, node.variableDeclaration ? node.variableDeclaration.end : endPos);
                      write(" ");
                      emitBlock(node.block);
                  }
                  function emitDebuggerStatement(node) {
                      emitToken(72, node.pos);
                      write(";");
                  }
                  function emitLabelledStatement(node) {
                      emit(node.label);
                      write(": ");
                      emit(node.statement);
                  }
                  function getContainingModule(node) {
                      do {
                          node = node.parent;
                      } while (node && node.kind !== 206);
                      return node;
                  }
                  function emitContainingModuleName(node) {
                      var container = getContainingModule(node);
                      write(container ? getGeneratedNameForNode(container) : "exports");
                  }
                  function emitModuleMemberName(node) {
                      emitStart(node.name);
                      if (ts.getCombinedNodeFlags(node) & 1) {
                          var container = getContainingModule(node);
                          if (container) {
                              write(getGeneratedNameForNode(container));
                              write(".");
                          }
                          else if (languageVersion < 2 && compilerOptions.module !== 4) {
                              write("exports.");
                          }
                      }
                      emitNodeWithoutSourceMap(node.name);
                      emitEnd(node.name);
                  }
                  function createVoidZero() {
                      var zero = ts.createSynthesizedNode(7);
                      zero.text = "0";
                      var result = ts.createSynthesizedNode(167);
                      result.expression = zero;
                      return result;
                  }
                  function emitExportMemberAssignment(node) {
                      if (node.flags & 1) {
                          writeLine();
                          emitStart(node);
                          if (compilerOptions.module === 4 && node.parent === currentSourceFile) {
                              write(exportFunctionForFile + "(\"");
                              if (node.flags & 256) {
                                  write("default");
                              }
                              else {
                                  emitNodeWithoutSourceMap(node.name);
                              }
                              write("\", ");
                              emitDeclarationName(node);
                              write(")");
                          }
                          else {
                              if (node.flags & 256) {
                                  if (languageVersion === 0) {
                                      write("exports[\"default\"]");
                                  }
                                  else {
                                      write("exports.default");
                                  }
                              }
                              else {
                                  emitModuleMemberName(node);
                              }
                              write(" = ");
                              emitDeclarationName(node);
                          }
                          emitEnd(node);
                          write(";");
                      }
                  }
                  function emitExportMemberAssignments(name) {
                      if (!exportEquals && exportSpecifiers && ts.hasProperty(exportSpecifiers, name.text)) {
                          for (var _a = 0, _b = exportSpecifiers[name.text]; _a < _b.length; _a++) {
                              var specifier = _b[_a];
                              writeLine();
                              if (compilerOptions.module === 4) {
                                  emitStart(specifier.name);
                                  write(exportFunctionForFile + "(\"");
                                  emitNodeWithoutSourceMap(specifier.name);
                                  write("\", ");
                                  emitExpressionIdentifier(name);
                                  write(")");
                                  emitEnd(specifier.name);
                              }
                              else {
                                  emitStart(specifier.name);
                                  emitContainingModuleName(specifier);
                                  write(".");
                                  emitNodeWithoutSourceMap(specifier.name);
                                  emitEnd(specifier.name);
                                  write(" = ");
                                  emitExpressionIdentifier(name);
                              }
                              write(";");
                          }
                      }
                  }
                  function emitDestructuring(root, isAssignmentExpressionStatement, value) {
                      var emitCount = 0;
                      var canDefineTempVariablesInPlace = false;
                      if (root.kind === 199) {
                          var isExported = ts.getCombinedNodeFlags(root) & 1;
                          var isSourceLevelForSystemModuleKind = shouldHoistDeclarationInSystemJsModule(root);
                          canDefineTempVariablesInPlace = !isExported && !isSourceLevelForSystemModuleKind;
                      }
                      else if (root.kind === 130) {
                          canDefineTempVariablesInPlace = true;
                      }
                      if (root.kind === 170) {
                          emitAssignmentExpression(root);
                      }
                      else {
                          ts.Debug.assert(!isAssignmentExpressionStatement);
                          emitBindingElement(root, value);
                      }
                      function emitAssignment(name, value) {
                          if (emitCount++) {
                              write(", ");
                          }
                          renameNonTopLevelLetAndConst(name);
                          var isVariableDeclarationOrBindingElement = name.parent && (name.parent.kind === 199 || name.parent.kind === 153);
                          var exportChanged = isNameOfExportedSourceLevelDeclarationInSystemExternalModule(name);
                          if (exportChanged) {
                              write(exportFunctionForFile + "(\"");
                              emitNodeWithoutSourceMap(name);
                              write("\", ");
                          }
                          if (isVariableDeclarationOrBindingElement) {
                              emitModuleMemberName(name.parent);
                          }
                          else {
                              emit(name);
                          }
                          write(" = ");
                          emit(value);
                          if (exportChanged) {
                              write(")");
                          }
                      }
                      function ensureIdentifier(expr) {
                          if (expr.kind !== 65) {
                              var identifier = createTempVariable(0);
                              if (!canDefineTempVariablesInPlace) {
                                  recordTempDeclaration(identifier);
                              }
                              emitAssignment(identifier, expr);
                              expr = identifier;
                          }
                          return expr;
                      }
                      function createDefaultValueCheck(value, defaultValue) {
                          value = ensureIdentifier(value);
                          var equals = ts.createSynthesizedNode(170);
                          equals.left = value;
                          equals.operatorToken = ts.createSynthesizedNode(30);
                          equals.right = createVoidZero();
                          return createConditionalExpression(equals, defaultValue, value);
                      }
                      function createConditionalExpression(condition, whenTrue, whenFalse) {
                          var cond = ts.createSynthesizedNode(171);
                          cond.condition = condition;
                          cond.questionToken = ts.createSynthesizedNode(50);
                          cond.whenTrue = whenTrue;
                          cond.colonToken = ts.createSynthesizedNode(51);
                          cond.whenFalse = whenFalse;
                          return cond;
                      }
                      function createNumericLiteral(value) {
                          var node = ts.createSynthesizedNode(7);
                          node.text = "" + value;
                          return node;
                      }
                      function createPropertyAccessForDestructuringProperty(object, propName) {
                          if (propName.kind !== 65) {
                              return createElementAccessExpression(object, propName);
                          }
                          return createPropertyAccessExpression(object, propName);
                      }
                      function createSliceCall(value, sliceIndex) {
                          var call = ts.createSynthesizedNode(158);
                          var sliceIdentifier = ts.createSynthesizedNode(65);
                          sliceIdentifier.text = "slice";
                          call.expression = createPropertyAccessExpression(value, sliceIdentifier);
                          call.arguments = ts.createSynthesizedNodeArray();
                          call.arguments[0] = createNumericLiteral(sliceIndex);
                          return call;
                      }
                      function emitObjectLiteralAssignment(target, value) {
                          var properties = target.properties;
                          if (properties.length !== 1) {
                              value = ensureIdentifier(value);
                          }
                          for (var _a = 0; _a < properties.length; _a++) {
                              var p = properties[_a];
                              if (p.kind === 225 || p.kind === 226) {
                                  var propName = (p.name);
                                  emitDestructuringAssignment(p.initializer || propName, createPropertyAccessForDestructuringProperty(value, propName));
                              }
                          }
                      }
                      function emitArrayLiteralAssignment(target, value) {
                          var elements = target.elements;
                          if (elements.length !== 1) {
                              value = ensureIdentifier(value);
                          }
                          for (var i = 0; i < elements.length; i++) {
                              var e = elements[i];
                              if (e.kind !== 176) {
                                  if (e.kind !== 174) {
                                      emitDestructuringAssignment(e, createElementAccessExpression(value, createNumericLiteral(i)));
                                  }
                                  else if (i === elements.length - 1) {
                                      emitDestructuringAssignment(e.expression, createSliceCall(value, i));
                                  }
                              }
                          }
                      }
                      function emitDestructuringAssignment(target, value) {
                          if (target.kind === 170 && target.operatorToken.kind === 53) {
                              value = createDefaultValueCheck(value, target.right);
                              target = target.left;
                          }
                          if (target.kind === 155) {
                              emitObjectLiteralAssignment(target, value);
                          }
                          else if (target.kind === 154) {
                              emitArrayLiteralAssignment(target, value);
                          }
                          else {
                              emitAssignment(target, value);
                          }
                      }
                      function emitAssignmentExpression(root) {
                          var target = root.left;
                          var value = root.right;
                          if (isAssignmentExpressionStatement) {
                              emitDestructuringAssignment(target, value);
                          }
                          else {
                              if (root.parent.kind !== 162) {
                                  write("(");
                              }
                              value = ensureIdentifier(value);
                              emitDestructuringAssignment(target, value);
                              write(", ");
                              emit(value);
                              if (root.parent.kind !== 162) {
                                  write(")");
                              }
                          }
                      }
                      function emitBindingElement(target, value) {
                          if (target.initializer) {
                              value = value ? createDefaultValueCheck(value, target.initializer) : target.initializer;
                          }
                          else if (!value) {
                              value = createVoidZero();
                          }
                          if (ts.isBindingPattern(target.name)) {
                              var pattern = target.name;
                              var elements = pattern.elements;
                              if (elements.length !== 1) {
                                  value = ensureIdentifier(value);
                              }
                              for (var i = 0; i < elements.length; i++) {
                                  var element = elements[i];
                                  if (pattern.kind === 151) {
                                      var propName = element.propertyName || element.name;
                                      emitBindingElement(element, createPropertyAccessForDestructuringProperty(value, propName));
                                  }
                                  else if (element.kind !== 176) {
                                      if (!element.dotDotDotToken) {
                                          emitBindingElement(element, createElementAccessExpression(value, createNumericLiteral(i)));
                                      }
                                      else if (i === elements.length - 1) {
                                          emitBindingElement(element, createSliceCall(value, i));
                                      }
                                  }
                              }
                          }
                          else {
                              emitAssignment(target.name, value);
                          }
                      }
                  }
                  function emitVariableDeclaration(node) {
                      if (ts.isBindingPattern(node.name)) {
                          if (languageVersion < 2) {
                              emitDestructuring(node, false);
                          }
                          else {
                              emit(node.name);
                              emitOptional(" = ", node.initializer);
                          }
                      }
                      else {
                          renameNonTopLevelLetAndConst(node.name);
                          var initializer = node.initializer;
                          if (!initializer && languageVersion < 2) {
                              var isUninitializedLet = (resolver.getNodeCheckFlags(node) & 256) &&
                                  (getCombinedFlagsForIdentifier(node.name) & 4096);
                              if (isUninitializedLet &&
                                  node.parent.parent.kind !== 188 &&
                                  node.parent.parent.kind !== 189) {
                                  initializer = createVoidZero();
                              }
                          }
                          var exportChanged = isNameOfExportedSourceLevelDeclarationInSystemExternalModule(node.name);
                          if (exportChanged) {
                              write(exportFunctionForFile + "(\"");
                              emitNodeWithoutSourceMap(node.name);
                              write("\", ");
                          }
                          emitModuleMemberName(node);
                          emitOptional(" = ", initializer);
                          if (exportChanged) {
                              write(")");
                          }
                      }
                  }
                  function emitExportVariableAssignments(node) {
                      if (node.kind === 176) {
                          return;
                      }
                      var name = node.name;
                      if (name.kind === 65) {
                          emitExportMemberAssignments(name);
                      }
                      else if (ts.isBindingPattern(name)) {
                          ts.forEach(name.elements, emitExportVariableAssignments);
                      }
                  }
                  function getCombinedFlagsForIdentifier(node) {
                      if (!node.parent || (node.parent.kind !== 199 && node.parent.kind !== 153)) {
                          return 0;
                      }
                      return ts.getCombinedNodeFlags(node.parent);
                  }
                  function renameNonTopLevelLetAndConst(node) {
                      if (languageVersion >= 2 ||
                          ts.nodeIsSynthesized(node) ||
                          node.kind !== 65 ||
                          (node.parent.kind !== 199 && node.parent.kind !== 153)) {
                          return;
                      }
                      var combinedFlags = getCombinedFlagsForIdentifier(node);
                      if (((combinedFlags & 12288) === 0) || combinedFlags & 1) {
                          return;
                      }
                      var list = ts.getAncestor(node, 200);
                      if (list.parent.kind === 181) {
                          var isSourceFileLevelBinding = list.parent.parent.kind === 228;
                          var isModuleLevelBinding = list.parent.parent.kind === 207;
                          var isFunctionLevelBinding = list.parent.parent.kind === 180 && ts.isFunctionLike(list.parent.parent.parent);
                          if (isSourceFileLevelBinding || isModuleLevelBinding || isFunctionLevelBinding) {
                              return;
                          }
                      }
                      var blockScopeContainer = ts.getEnclosingBlockScopeContainer(node);
                      var parent = blockScopeContainer.kind === 228
                          ? blockScopeContainer
                          : blockScopeContainer.parent;
                      if (resolver.resolvesToSomeValue(parent, node.text)) {
                          var variableId = resolver.getBlockScopedVariableId(node);
                          if (!blockScopedVariableToGeneratedName) {
                              blockScopedVariableToGeneratedName = [];
                          }
                          var generatedName = makeUniqueName(node.text);
                          blockScopedVariableToGeneratedName[variableId] = generatedName;
                      }
                  }
                  function isES6ExportedDeclaration(node) {
                      return !!(node.flags & 1) &&
                          languageVersion >= 2 &&
                          node.parent.kind === 228;
                  }
                  function emitVariableStatement(node) {
                      var startIsEmitted = false;
                      if (node.flags & 1) {
                          if (isES6ExportedDeclaration(node)) {
                              write("export ");
                              startIsEmitted = tryEmitStartOfVariableDeclarationList(node.declarationList);
                          }
                      }
                      else {
                          startIsEmitted = tryEmitStartOfVariableDeclarationList(node.declarationList);
                      }
                      if (startIsEmitted) {
                          emitCommaList(node.declarationList.declarations);
                          write(";");
                      }
                      else {
                          var atLeastOneItem = emitVariableDeclarationListSkippingUninitializedEntries(node.declarationList);
                          if (atLeastOneItem) {
                              write(";");
                          }
                      }
                      if (languageVersion < 2 && node.parent === currentSourceFile) {
                          ts.forEach(node.declarationList.declarations, emitExportVariableAssignments);
                      }
                  }
                  function emitParameter(node) {
                      if (languageVersion < 2) {
                          if (ts.isBindingPattern(node.name)) {
                              var name_19 = createTempVariable(0);
                              if (!tempParameters) {
                                  tempParameters = [];
                              }
                              tempParameters.push(name_19);
                              emit(name_19);
                          }
                          else {
                              emit(node.name);
                          }
                      }
                      else {
                          if (node.dotDotDotToken) {
                              write("...");
                          }
                          emit(node.name);
                          emitOptional(" = ", node.initializer);
                      }
                  }
                  function emitDefaultValueAssignments(node) {
                      if (languageVersion < 2) {
                          var tempIndex = 0;
                          ts.forEach(node.parameters, function (p) {
                              if (p.dotDotDotToken) {
                                  return;
                              }
                              if (ts.isBindingPattern(p.name)) {
                                  writeLine();
                                  write("var ");
                                  emitDestructuring(p, false, tempParameters[tempIndex]);
                                  write(";");
                                  tempIndex++;
                              }
                              else if (p.initializer) {
                                  writeLine();
                                  emitStart(p);
                                  write("if (");
                                  emitNodeWithoutSourceMap(p.name);
                                  write(" === void 0)");
                                  emitEnd(p);
                                  write(" { ");
                                  emitStart(p);
                                  emitNodeWithoutSourceMap(p.name);
                                  write(" = ");
                                  emitNodeWithoutSourceMap(p.initializer);
                                  emitEnd(p);
                                  write("; }");
                              }
                          });
                      }
                  }
                  function emitRestParameter(node) {
                      if (languageVersion < 2 && ts.hasRestParameters(node)) {
                          var restIndex = node.parameters.length - 1;
                          var restParam = node.parameters[restIndex];
                          if (ts.isBindingPattern(restParam.name)) {
                              return;
                          }
                          var tempName = createTempVariable(268435456).text;
                          writeLine();
                          emitLeadingComments(restParam);
                          emitStart(restParam);
                          write("var ");
                          emitNodeWithoutSourceMap(restParam.name);
                          write(" = [];");
                          emitEnd(restParam);
                          emitTrailingComments(restParam);
                          writeLine();
                          write("for (");
                          emitStart(restParam);
                          write("var " + tempName + " = " + restIndex + ";");
                          emitEnd(restParam);
                          write(" ");
                          emitStart(restParam);
                          write(tempName + " < arguments.length;");
                          emitEnd(restParam);
                          write(" ");
                          emitStart(restParam);
                          write(tempName + "++");
                          emitEnd(restParam);
                          write(") {");
                          increaseIndent();
                          writeLine();
                          emitStart(restParam);
                          emitNodeWithoutSourceMap(restParam.name);
                          write("[" + tempName + " - " + restIndex + "] = arguments[" + tempName + "];");
                          emitEnd(restParam);
                          decreaseIndent();
                          writeLine();
                          write("}");
                      }
                  }
                  function emitAccessor(node) {
                      write(node.kind === 137 ? "get " : "set ");
                      emit(node.name, false);
                      emitSignatureAndBody(node);
                  }
                  function shouldEmitAsArrowFunction(node) {
                      return node.kind === 164 && languageVersion >= 2;
                  }
                  function emitDeclarationName(node) {
                      if (node.name) {
                          emitNodeWithoutSourceMap(node.name);
                      }
                      else {
                          write(getGeneratedNameForNode(node));
                      }
                  }
                  function shouldEmitFunctionName(node) {
                      if (node.kind === 163) {
                          return !!node.name;
                      }
                      if (node.kind === 201) {
                          return !!node.name || languageVersion < 2;
                      }
                  }
                  function emitFunctionDeclaration(node) {
                      if (ts.nodeIsMissing(node.body)) {
                          return emitOnlyPinnedOrTripleSlashComments(node);
                      }
                      if (node.kind !== 135 && node.kind !== 134) {
                          emitLeadingComments(node);
                      }
                      if (!shouldEmitAsArrowFunction(node)) {
                          if (isES6ExportedDeclaration(node)) {
                              write("export ");
                              if (node.flags & 256) {
                                  write("default ");
                              }
                          }
                          write("function");
                          if (languageVersion >= 2 && node.asteriskToken) {
                              write("*");
                          }
                          write(" ");
                      }
                      if (shouldEmitFunctionName(node)) {
                          emitDeclarationName(node);
                      }
                      emitSignatureAndBody(node);
                      if (languageVersion < 2 && node.kind === 201 && node.parent === currentSourceFile && node.name) {
                          emitExportMemberAssignments(node.name);
                      }
                      if (node.kind !== 135 && node.kind !== 134) {
                          emitTrailingComments(node);
                      }
                  }
                  function emitCaptureThisForNodeIfNecessary(node) {
                      if (resolver.getNodeCheckFlags(node) & 4) {
                          writeLine();
                          emitStart(node);
                          write("var _this = this;");
                          emitEnd(node);
                      }
                  }
                  function emitSignatureParameters(node) {
                      increaseIndent();
                      write("(");
                      if (node) {
                          var parameters = node.parameters;
                          var omitCount = languageVersion < 2 && ts.hasRestParameters(node) ? 1 : 0;
                          emitList(parameters, 0, parameters.length - omitCount, false, false);
                      }
                      write(")");
                      decreaseIndent();
                  }
                  function emitSignatureParametersForArrow(node) {
                      if (node.parameters.length === 1 && node.pos === node.parameters[0].pos) {
                          emit(node.parameters[0]);
                          return;
                      }
                      emitSignatureParameters(node);
                  }
                  function emitSignatureAndBody(node) {
                      var saveTempFlags = tempFlags;
                      var saveTempVariables = tempVariables;
                      var saveTempParameters = tempParameters;
                      tempFlags = 0;
                      tempVariables = undefined;
                      tempParameters = undefined;
                      if (shouldEmitAsArrowFunction(node)) {
                          emitSignatureParametersForArrow(node);
                          write(" =>");
                      }
                      else {
                          emitSignatureParameters(node);
                      }
                      if (!node.body) {
                          write(" { }");
                      }
                      else if (node.body.kind === 180) {
                          emitBlockFunctionBody(node, node.body);
                      }
                      else {
                          emitExpressionFunctionBody(node, node.body);
                      }
                      if (!isES6ExportedDeclaration(node)) {
                          emitExportMemberAssignment(node);
                      }
                      tempFlags = saveTempFlags;
                      tempVariables = saveTempVariables;
                      tempParameters = saveTempParameters;
                  }
                  function emitFunctionBodyPreamble(node) {
                      emitCaptureThisForNodeIfNecessary(node);
                      emitDefaultValueAssignments(node);
                      emitRestParameter(node);
                  }
                  function emitExpressionFunctionBody(node, body) {
                      if (languageVersion < 2) {
                          emitDownLevelExpressionFunctionBody(node, body);
                          return;
                      }
                      write(" ");
                      var current = body;
                      while (current.kind === 161) {
                          current = current.expression;
                      }
                      emitParenthesizedIf(body, current.kind === 155);
                  }
                  function emitDownLevelExpressionFunctionBody(node, body) {
                      write(" {");
                      scopeEmitStart(node);
                      increaseIndent();
                      var outPos = writer.getTextPos();
                      emitDetachedComments(node.body);
                      emitFunctionBodyPreamble(node);
                      var preambleEmitted = writer.getTextPos() !== outPos;
                      decreaseIndent();
                      if (!preambleEmitted && nodeStartPositionsAreOnSameLine(node, body)) {
                          write(" ");
                          emitStart(body);
                          write("return ");
                          emit(body);
                          emitEnd(body);
                          write(";");
                          emitTempDeclarations(false);
                          write(" ");
                      }
                      else {
                          increaseIndent();
                          writeLine();
                          emitLeadingComments(node.body);
                          write("return ");
                          emit(body);
                          write(";");
                          emitTrailingComments(node.body);
                          emitTempDeclarations(true);
                          decreaseIndent();
                          writeLine();
                      }
                      emitStart(node.body);
                      write("}");
                      emitEnd(node.body);
                      scopeEmitEnd();
                  }
                  function emitBlockFunctionBody(node, body) {
                      write(" {");
                      scopeEmitStart(node);
                      var initialTextPos = writer.getTextPos();
                      increaseIndent();
                      emitDetachedComments(body.statements);
                      var startIndex = emitDirectivePrologues(body.statements, true);
                      emitFunctionBodyPreamble(node);
                      decreaseIndent();
                      var preambleEmitted = writer.getTextPos() !== initialTextPos;
                      if (!preambleEmitted && nodeEndIsOnSameLineAsNodeStart(body, body)) {
                          for (var _a = 0, _b = body.statements; _a < _b.length; _a++) {
                              var statement = _b[_a];
                              write(" ");
                              emit(statement);
                          }
                          emitTempDeclarations(false);
                          write(" ");
                          emitLeadingCommentsOfPosition(body.statements.end);
                      }
                      else {
                          increaseIndent();
                          emitLinesStartingAt(body.statements, startIndex);
                          emitTempDeclarations(true);
                          writeLine();
                          emitLeadingCommentsOfPosition(body.statements.end);
                          decreaseIndent();
                      }
                      emitToken(15, body.statements.end);
                      scopeEmitEnd();
                  }
                  function findInitialSuperCall(ctor) {
                      if (ctor.body) {
                          var statement = ctor.body.statements[0];
                          if (statement && statement.kind === 183) {
                              var expr = statement.expression;
                              if (expr && expr.kind === 158) {
                                  var func = expr.expression;
                                  if (func && func.kind === 91) {
                                      return statement;
                                  }
                              }
                          }
                      }
                  }
                  function emitParameterPropertyAssignments(node) {
                      ts.forEach(node.parameters, function (param) {
                          if (param.flags & 112) {
                              writeLine();
                              emitStart(param);
                              emitStart(param.name);
                              write("this.");
                              emitNodeWithoutSourceMap(param.name);
                              emitEnd(param.name);
                              write(" = ");
                              emit(param.name);
                              write(";");
                              emitEnd(param);
                          }
                      });
                  }
                  function emitMemberAccessForPropertyName(memberName) {
                      if (memberName.kind === 8 || memberName.kind === 7) {
                          write("[");
                          emitNodeWithoutSourceMap(memberName);
                          write("]");
                      }
                      else if (memberName.kind === 128) {
                          emitComputedPropertyName(memberName);
                      }
                      else {
                          write(".");
                          emitNodeWithoutSourceMap(memberName);
                      }
                  }
                  function getInitializedProperties(node, isStatic) {
                      var properties = [];
                      for (var _a = 0, _b = node.members; _a < _b.length; _a++) {
                          var member = _b[_a];
                          if (member.kind === 133 && isStatic === ((member.flags & 128) !== 0) && member.initializer) {
                              properties.push(member);
                          }
                      }
                      return properties;
                  }
                  function emitPropertyDeclarations(node, properties) {
                      for (var _a = 0; _a < properties.length; _a++) {
                          var property = properties[_a];
                          emitPropertyDeclaration(node, property);
                      }
                  }
                  function emitPropertyDeclaration(node, property, receiver, isExpression) {
                      writeLine();
                      emitLeadingComments(property);
                      emitStart(property);
                      emitStart(property.name);
                      if (receiver) {
                          emit(receiver);
                      }
                      else {
                          if (property.flags & 128) {
                              emitDeclarationName(node);
                          }
                          else {
                              write("this");
                          }
                      }
                      emitMemberAccessForPropertyName(property.name);
                      emitEnd(property.name);
                      write(" = ");
                      emit(property.initializer);
                      if (!isExpression) {
                          write(";");
                      }
                      emitEnd(property);
                      emitTrailingComments(property);
                  }
                  function emitMemberFunctionsForES5AndLower(node) {
                      ts.forEach(node.members, function (member) {
                          if (member.kind === 179) {
                              writeLine();
                              write(";");
                          }
                          else if (member.kind === 135 || node.kind === 134) {
                              if (!member.body) {
                                  return emitOnlyPinnedOrTripleSlashComments(member);
                              }
                              writeLine();
                              emitLeadingComments(member);
                              emitStart(member);
                              emitStart(member.name);
                              emitClassMemberPrefix(node, member);
                              emitMemberAccessForPropertyName(member.name);
                              emitEnd(member.name);
                              write(" = ");
                              emitStart(member);
                              emitFunctionDeclaration(member);
                              emitEnd(member);
                              emitEnd(member);
                              write(";");
                              emitTrailingComments(member);
                          }
                          else if (member.kind === 137 || member.kind === 138) {
                              var accessors = ts.getAllAccessorDeclarations(node.members, member);
                              if (member === accessors.firstAccessor) {
                                  writeLine();
                                  emitStart(member);
                                  write("Object.defineProperty(");
                                  emitStart(member.name);
                                  emitClassMemberPrefix(node, member);
                                  write(", ");
                                  emitExpressionForPropertyName(member.name);
                                  emitEnd(member.name);
                                  write(", {");
                                  increaseIndent();
                                  if (accessors.getAccessor) {
                                      writeLine();
                                      emitLeadingComments(accessors.getAccessor);
                                      write("get: ");
                                      emitStart(accessors.getAccessor);
                                      write("function ");
                                      emitSignatureAndBody(accessors.getAccessor);
                                      emitEnd(accessors.getAccessor);
                                      emitTrailingComments(accessors.getAccessor);
                                      write(",");
                                  }
                                  if (accessors.setAccessor) {
                                      writeLine();
                                      emitLeadingComments(accessors.setAccessor);
                                      write("set: ");
                                      emitStart(accessors.setAccessor);
                                      write("function ");
                                      emitSignatureAndBody(accessors.setAccessor);
                                      emitEnd(accessors.setAccessor);
                                      emitTrailingComments(accessors.setAccessor);
                                      write(",");
                                  }
                                  writeLine();
                                  write("enumerable: true,");
                                  writeLine();
                                  write("configurable: true");
                                  decreaseIndent();
                                  writeLine();
                                  write("});");
                                  emitEnd(member);
                              }
                          }
                      });
                  }
                  function emitMemberFunctionsForES6AndHigher(node) {
                      for (var _a = 0, _b = node.members; _a < _b.length; _a++) {
                          var member = _b[_a];
                          if ((member.kind === 135 || node.kind === 134) && !member.body) {
                              emitOnlyPinnedOrTripleSlashComments(member);
                          }
                          else if (member.kind === 135 ||
                              member.kind === 137 ||
                              member.kind === 138) {
                              writeLine();
                              emitLeadingComments(member);
                              emitStart(member);
                              if (member.flags & 128) {
                                  write("static ");
                              }
                              if (member.kind === 137) {
                                  write("get ");
                              }
                              else if (member.kind === 138) {
                                  write("set ");
                              }
                              if (member.asteriskToken) {
                                  write("*");
                              }
                              emit(member.name);
                              emitSignatureAndBody(member);
                              emitEnd(member);
                              emitTrailingComments(member);
                          }
                          else if (member.kind === 179) {
                              writeLine();
                              write(";");
                          }
                      }
                  }
                  function emitConstructor(node, baseTypeElement) {
                      var saveTempFlags = tempFlags;
                      var saveTempVariables = tempVariables;
                      var saveTempParameters = tempParameters;
                      tempFlags = 0;
                      tempVariables = undefined;
                      tempParameters = undefined;
                      emitConstructorWorker(node, baseTypeElement);
                      tempFlags = saveTempFlags;
                      tempVariables = saveTempVariables;
                      tempParameters = saveTempParameters;
                  }
                  function emitConstructorWorker(node, baseTypeElement) {
                      var hasInstancePropertyWithInitializer = false;
                      ts.forEach(node.members, function (member) {
                          if (member.kind === 136 && !member.body) {
                              emitOnlyPinnedOrTripleSlashComments(member);
                          }
                          if (member.kind === 133 && member.initializer && (member.flags & 128) === 0) {
                              hasInstancePropertyWithInitializer = true;
                          }
                      });
                      var ctor = ts.getFirstConstructorWithBody(node);
                      if (languageVersion >= 2 && !ctor && !hasInstancePropertyWithInitializer) {
                          return;
                      }
                      if (ctor) {
                          emitLeadingComments(ctor);
                      }
                      emitStart(ctor || node);
                      if (languageVersion < 2) {
                          write("function ");
                          emitDeclarationName(node);
                          emitSignatureParameters(ctor);
                      }
                      else {
                          write("constructor");
                          if (ctor) {
                              emitSignatureParameters(ctor);
                          }
                          else {
                              if (baseTypeElement) {
                                  write("(...args)");
                              }
                              else {
                                  write("()");
                              }
                          }
                      }
                      write(" {");
                      scopeEmitStart(node, "constructor");
                      increaseIndent();
                      if (ctor) {
                          emitDetachedComments(ctor.body.statements);
                      }
                      emitCaptureThisForNodeIfNecessary(node);
                      if (ctor) {
                          emitDefaultValueAssignments(ctor);
                          emitRestParameter(ctor);
                          if (baseTypeElement) {
                              var superCall = findInitialSuperCall(ctor);
                              if (superCall) {
                                  writeLine();
                                  emit(superCall);
                              }
                          }
                          emitParameterPropertyAssignments(ctor);
                      }
                      else {
                          if (baseTypeElement) {
                              writeLine();
                              emitStart(baseTypeElement);
                              if (languageVersion < 2) {
                                  write("_super.apply(this, arguments);");
                              }
                              else {
                                  write("super(...args);");
                              }
                              emitEnd(baseTypeElement);
                          }
                      }
                      emitPropertyDeclarations(node, getInitializedProperties(node, false));
                      if (ctor) {
                          var statements = ctor.body.statements;
                          if (superCall) {
                              statements = statements.slice(1);
                          }
                          emitLines(statements);
                      }
                      emitTempDeclarations(true);
                      writeLine();
                      if (ctor) {
                          emitLeadingCommentsOfPosition(ctor.body.statements.end);
                      }
                      decreaseIndent();
                      emitToken(15, ctor ? ctor.body.statements.end : node.members.end);
                      scopeEmitEnd();
                      emitEnd(ctor || node);
                      if (ctor) {
                          emitTrailingComments(ctor);
                      }
                  }
                  function emitClassExpression(node) {
                      return emitClassLikeDeclaration(node);
                  }
                  function emitClassDeclaration(node) {
                      return emitClassLikeDeclaration(node);
                  }
                  function emitClassLikeDeclaration(node) {
                      if (languageVersion < 2) {
                          emitClassLikeDeclarationBelowES6(node);
                      }
                      else {
                          emitClassLikeDeclarationForES6AndHigher(node);
                      }
                  }
                  function emitClassLikeDeclarationForES6AndHigher(node) {
                      var thisNodeIsDecorated = ts.nodeIsDecorated(node);
                      if (node.kind === 202) {
                          if (thisNodeIsDecorated) {
                              if (isES6ExportedDeclaration(node) && !(node.flags & 256)) {
                                  write("export ");
                              }
                              write("let ");
                              emitDeclarationName(node);
                              write(" = ");
                          }
                          else if (isES6ExportedDeclaration(node)) {
                              write("export ");
                              if (node.flags & 256) {
                                  write("default ");
                              }
                          }
                      }
                      var staticProperties = getInitializedProperties(node, true);
                      var isClassExpressionWithStaticProperties = staticProperties.length > 0 && node.kind === 175;
                      var tempVariable;
                      if (isClassExpressionWithStaticProperties) {
                          tempVariable = createAndRecordTempVariable(0);
                          write("(");
                          increaseIndent();
                          emit(tempVariable);
                          write(" = ");
                      }
                      write("class");
                      if ((node.name || !(node.flags & 256)) && !thisNodeIsDecorated) {
                          write(" ");
                          emitDeclarationName(node);
                      }
                      var baseTypeNode = ts.getClassExtendsHeritageClauseElement(node);
                      if (baseTypeNode) {
                          write(" extends ");
                          emit(baseTypeNode.expression);
                      }
                      write(" {");
                      increaseIndent();
                      scopeEmitStart(node);
                      writeLine();
                      emitConstructor(node, baseTypeNode);
                      emitMemberFunctionsForES6AndHigher(node);
                      decreaseIndent();
                      writeLine();
                      emitToken(15, node.members.end);
                      scopeEmitEnd();
                      if (thisNodeIsDecorated) {
                          write(";");
                      }
                      if (isClassExpressionWithStaticProperties) {
                          for (var _a = 0; _a < staticProperties.length; _a++) {
                              var property = staticProperties[_a];
                              write(",");
                              writeLine();
                              emitPropertyDeclaration(node, property, tempVariable, true);
                          }
                          write(",");
                          writeLine();
                          emit(tempVariable);
                          decreaseIndent();
                          write(")");
                      }
                      else {
                          writeLine();
                          emitPropertyDeclarations(node, staticProperties);
                          emitDecoratorsOfClass(node);
                      }
                      if (!isES6ExportedDeclaration(node) && (node.flags & 1)) {
                          writeLine();
                          emitStart(node);
                          emitModuleMemberName(node);
                          write(" = ");
                          emitDeclarationName(node);
                          emitEnd(node);
                          write(";");
                      }
                      else if (isES6ExportedDeclaration(node) && (node.flags & 256) && thisNodeIsDecorated) {
                          writeLine();
                          write("export default ");
                          emitDeclarationName(node);
                          write(";");
                      }
                  }
                  function emitClassLikeDeclarationBelowES6(node) {
                      if (node.kind === 202) {
                          if (!shouldHoistDeclarationInSystemJsModule(node)) {
                              write("var ");
                          }
                          emitDeclarationName(node);
                          write(" = ");
                      }
                      write("(function (");
                      var baseTypeNode = ts.getClassExtendsHeritageClauseElement(node);
                      if (baseTypeNode) {
                          write("_super");
                      }
                      write(") {");
                      var saveTempFlags = tempFlags;
                      var saveTempVariables = tempVariables;
                      var saveTempParameters = tempParameters;
                      var saveComputedPropertyNamesToGeneratedNames = computedPropertyNamesToGeneratedNames;
                      tempFlags = 0;
                      tempVariables = undefined;
                      tempParameters = undefined;
                      computedPropertyNamesToGeneratedNames = undefined;
                      increaseIndent();
                      scopeEmitStart(node);
                      if (baseTypeNode) {
                          writeLine();
                          emitStart(baseTypeNode);
                          write("__extends(");
                          emitDeclarationName(node);
                          write(", _super);");
                          emitEnd(baseTypeNode);
                      }
                      writeLine();
                      emitConstructor(node, baseTypeNode);
                      emitMemberFunctionsForES5AndLower(node);
                      emitPropertyDeclarations(node, getInitializedProperties(node, true));
                      writeLine();
                      emitDecoratorsOfClass(node);
                      writeLine();
                      emitToken(15, node.members.end, function () {
                          write("return ");
                          emitDeclarationName(node);
                      });
                      write(";");
                      emitTempDeclarations(true);
                      tempFlags = saveTempFlags;
                      tempVariables = saveTempVariables;
                      tempParameters = saveTempParameters;
                      computedPropertyNamesToGeneratedNames = saveComputedPropertyNamesToGeneratedNames;
                      decreaseIndent();
                      writeLine();
                      emitToken(15, node.members.end);
                      scopeEmitEnd();
                      emitStart(node);
                      write(")(");
                      if (baseTypeNode) {
                          emit(baseTypeNode.expression);
                      }
                      write(")");
                      if (node.kind === 202) {
                          write(";");
                      }
                      emitEnd(node);
                      if (node.kind === 202) {
                          emitExportMemberAssignment(node);
                      }
                      if (languageVersion < 2 && node.parent === currentSourceFile && node.name) {
                          emitExportMemberAssignments(node.name);
                      }
                  }
                  function emitClassMemberPrefix(node, member) {
                      emitDeclarationName(node);
                      if (!(member.flags & 128)) {
                          write(".prototype");
                      }
                  }
                  function emitDecoratorsOfClass(node) {
                      emitDecoratorsOfMembers(node, 0);
                      emitDecoratorsOfMembers(node, 128);
                      emitDecoratorsOfConstructor(node);
                  }
                  function emitDecoratorsOfConstructor(node) {
                      var decorators = node.decorators;
                      var constructor = ts.getFirstConstructorWithBody(node);
                      var hasDecoratedParameters = constructor && ts.forEach(constructor.parameters, ts.nodeIsDecorated);
                      if (!decorators && !hasDecoratedParameters) {
                          return;
                      }
                      writeLine();
                      emitStart(node);
                      emitDeclarationName(node);
                      write(" = __decorate([");
                      increaseIndent();
                      writeLine();
                      var decoratorCount = decorators ? decorators.length : 0;
                      var argumentsWritten = emitList(decorators, 0, decoratorCount, true, false, false, true, function (decorator) {
                          emitStart(decorator);
                          emit(decorator.expression);
                          emitEnd(decorator);
                      });
                      argumentsWritten += emitDecoratorsOfParameters(constructor, argumentsWritten > 0);
                      emitSerializedTypeMetadata(node, argumentsWritten >= 0);
                      decreaseIndent();
                      writeLine();
                      write("], ");
                      emitDeclarationName(node);
                      write(");");
                      emitEnd(node);
                      writeLine();
                  }
                  function emitDecoratorsOfMembers(node, staticFlag) {
                      for (var _a = 0, _b = node.members; _a < _b.length; _a++) {
                          var member = _b[_a];
                          if ((member.flags & 128) !== staticFlag) {
                              continue;
                          }
                          if (!ts.nodeCanBeDecorated(member)) {
                              continue;
                          }
                          if (!ts.nodeOrChildIsDecorated(member)) {
                              continue;
                          }
                          var decorators = void 0;
                          var functionLikeMember = void 0;
                          if (ts.isAccessor(member)) {
                              var accessors = ts.getAllAccessorDeclarations(node.members, member);
                              if (member !== accessors.firstAccessor) {
                                  continue;
                              }
                              decorators = accessors.firstAccessor.decorators;
                              if (!decorators && accessors.secondAccessor) {
                                  decorators = accessors.secondAccessor.decorators;
                              }
                              functionLikeMember = accessors.setAccessor;
                          }
                          else {
                              decorators = member.decorators;
                              if (member.kind === 135) {
                                  functionLikeMember = member;
                              }
                          }
                          writeLine();
                          emitStart(member);
                          if (member.kind !== 133) {
                              write("Object.defineProperty(");
                              emitStart(member.name);
                              emitClassMemberPrefix(node, member);
                              write(", ");
                              emitExpressionForPropertyName(member.name);
                              emitEnd(member.name);
                              write(",");
                              increaseIndent();
                              writeLine();
                          }
                          write("__decorate([");
                          increaseIndent();
                          writeLine();
                          var decoratorCount = decorators ? decorators.length : 0;
                          var argumentsWritten = emitList(decorators, 0, decoratorCount, true, false, false, true, function (decorator) {
                              emitStart(decorator);
                              emit(decorator.expression);
                              emitEnd(decorator);
                          });
                          argumentsWritten += emitDecoratorsOfParameters(functionLikeMember, argumentsWritten > 0);
                          emitSerializedTypeMetadata(member, argumentsWritten > 0);
                          decreaseIndent();
                          writeLine();
                          write("], ");
                          emitStart(member.name);
                          emitClassMemberPrefix(node, member);
                          write(", ");
                          emitExpressionForPropertyName(member.name);
                          emitEnd(member.name);
                          if (member.kind !== 133) {
                              write(", Object.getOwnPropertyDescriptor(");
                              emitStart(member.name);
                              emitClassMemberPrefix(node, member);
                              write(", ");
                              emitExpressionForPropertyName(member.name);
                              emitEnd(member.name);
                              write("))");
                              decreaseIndent();
                          }
                          write(");");
                          emitEnd(member);
                          writeLine();
                      }
                  }
                  function emitDecoratorsOfParameters(node, leadingComma) {
                      var argumentsWritten = 0;
                      if (node) {
                          var parameterIndex = 0;
                          for (var _a = 0, _b = node.parameters; _a < _b.length; _a++) {
                              var parameter = _b[_a];
                              if (ts.nodeIsDecorated(parameter)) {
                                  var decorators = parameter.decorators;
                                  argumentsWritten += emitList(decorators, 0, decorators.length, true, false, leadingComma, true, function (decorator) {
                                      emitStart(decorator);
                                      write("__param(" + parameterIndex + ", ");
                                      emit(decorator.expression);
                                      write(")");
                                      emitEnd(decorator);
                                  });
                                  leadingComma = true;
                              }
                              ++parameterIndex;
                          }
                      }
                      return argumentsWritten;
                  }
                  function shouldEmitTypeMetadata(node) {
                      switch (node.kind) {
                          case 135:
                          case 137:
                          case 138:
                          case 133:
                              return true;
                      }
                      return false;
                  }
                  function shouldEmitReturnTypeMetadata(node) {
                      switch (node.kind) {
                          case 135:
                              return true;
                      }
                      return false;
                  }
                  function shouldEmitParamTypesMetadata(node) {
                      switch (node.kind) {
                          case 202:
                          case 135:
                          case 138:
                              return true;
                      }
                      return false;
                  }
                  function emitSerializedTypeMetadata(node, writeComma) {
                      var argumentsWritten = 0;
                      if (compilerOptions.emitDecoratorMetadata) {
                          if (shouldEmitTypeMetadata(node)) {
                              var serializedType = resolver.serializeTypeOfNode(node, getGeneratedNameForNode);
                              if (serializedType) {
                                  if (writeComma) {
                                      write(", ");
                                  }
                                  writeLine();
                                  write("__metadata('design:type', ");
                                  emitSerializedType(node, serializedType);
                                  write(")");
                                  argumentsWritten++;
                              }
                          }
                          if (shouldEmitParamTypesMetadata(node)) {
                              var serializedTypes = resolver.serializeParameterTypesOfNode(node, getGeneratedNameForNode);
                              if (serializedTypes) {
                                  if (writeComma || argumentsWritten) {
                                      write(", ");
                                  }
                                  writeLine();
                                  write("__metadata('design:paramtypes', [");
                                  for (var i = 0; i < serializedTypes.length; ++i) {
                                      if (i > 0) {
                                          write(", ");
                                      }
                                      emitSerializedType(node, serializedTypes[i]);
                                  }
                                  write("])");
                                  argumentsWritten++;
                              }
                          }
                          if (shouldEmitReturnTypeMetadata(node)) {
                              var serializedType = resolver.serializeReturnTypeOfNode(node, getGeneratedNameForNode);
                              if (serializedType) {
                                  if (writeComma || argumentsWritten) {
                                      write(", ");
                                  }
                                  writeLine();
                                  write("__metadata('design:returntype', ");
                                  emitSerializedType(node, serializedType);
                                  write(")");
                                  argumentsWritten++;
                              }
                          }
                      }
                      return argumentsWritten;
                  }
                  function serializeTypeNameSegment(location, path, index) {
                      switch (index) {
                          case 0:
                              return "typeof " + path[index] + " !== 'undefined' && " + path[index];
                          case 1:
                              return serializeTypeNameSegment(location, path, index - 1) + "." + path[index];
                          default:
                              var temp = createAndRecordTempVariable(0).text;
                              return "(" + temp + " = " + serializeTypeNameSegment(location, path, index - 1) + ") && " + temp + "." + path[index];
                      }
                  }
                  function emitSerializedType(location, name) {
                      if (typeof name === "string") {
                          write(name);
                          return;
                      }
                      else {
                          ts.Debug.assert(name.length > 0, "Invalid serialized type name");
                          write("(" + serializeTypeNameSegment(location, name, name.length - 1) + ") || Object");
                      }
                  }
                  function emitInterfaceDeclaration(node) {
                      emitOnlyPinnedOrTripleSlashComments(node);
                  }
                  function shouldEmitEnumDeclaration(node) {
                      var isConstEnum = ts.isConst(node);
                      return !isConstEnum || compilerOptions.preserveConstEnums || compilerOptions.separateCompilation;
                  }
                  function emitEnumDeclaration(node) {
                      if (!shouldEmitEnumDeclaration(node)) {
                          return;
                      }
                      if (!shouldHoistDeclarationInSystemJsModule(node)) {
                          if (!(node.flags & 1) || isES6ExportedDeclaration(node)) {
                              emitStart(node);
                              if (isES6ExportedDeclaration(node)) {
                                  write("export ");
                              }
                              write("var ");
                              emit(node.name);
                              emitEnd(node);
                              write(";");
                          }
                      }
                      writeLine();
                      emitStart(node);
                      write("(function (");
                      emitStart(node.name);
                      write(getGeneratedNameForNode(node));
                      emitEnd(node.name);
                      write(") {");
                      increaseIndent();
                      scopeEmitStart(node);
                      emitLines(node.members);
                      decreaseIndent();
                      writeLine();
                      emitToken(15, node.members.end);
                      scopeEmitEnd();
                      write(")(");
                      emitModuleMemberName(node);
                      write(" || (");
                      emitModuleMemberName(node);
                      write(" = {}));");
                      emitEnd(node);
                      if (!isES6ExportedDeclaration(node) && node.flags & 1 && !shouldHoistDeclarationInSystemJsModule(node)) {
                          writeLine();
                          emitStart(node);
                          write("var ");
                          emit(node.name);
                          write(" = ");
                          emitModuleMemberName(node);
                          emitEnd(node);
                          write(";");
                      }
                      if (languageVersion < 2 && node.parent === currentSourceFile) {
                          if (compilerOptions.module === 4 && (node.flags & 1)) {
                              writeLine();
                              write(exportFunctionForFile + "(\"");
                              emitDeclarationName(node);
                              write("\", ");
                              emitDeclarationName(node);
                              write(")");
                          }
                          emitExportMemberAssignments(node.name);
                      }
                  }
                  function emitEnumMember(node) {
                      var enumParent = node.parent;
                      emitStart(node);
                      write(getGeneratedNameForNode(enumParent));
                      write("[");
                      write(getGeneratedNameForNode(enumParent));
                      write("[");
                      emitExpressionForPropertyName(node.name);
                      write("] = ");
                      writeEnumMemberDeclarationValue(node);
                      write("] = ");
                      emitExpressionForPropertyName(node.name);
                      emitEnd(node);
                      write(";");
                  }
                  function writeEnumMemberDeclarationValue(member) {
                      var value = resolver.getConstantValue(member);
                      if (value !== undefined) {
                          write(value.toString());
                          return;
                      }
                      else if (member.initializer) {
                          emit(member.initializer);
                      }
                      else {
                          write("undefined");
                      }
                  }
                  function getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration) {
                      if (moduleDeclaration.body.kind === 206) {
                          var recursiveInnerModule = getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration.body);
                          return recursiveInnerModule || moduleDeclaration.body;
                      }
                  }
                  function shouldEmitModuleDeclaration(node) {
                      return ts.isInstantiatedModule(node, compilerOptions.preserveConstEnums || compilerOptions.separateCompilation);
                  }
                  function isModuleMergedWithES6Class(node) {
                      return languageVersion === 2 && !!(resolver.getNodeCheckFlags(node) & 2048);
                  }
                  function emitModuleDeclaration(node) {
                      var shouldEmit = shouldEmitModuleDeclaration(node);
                      if (!shouldEmit) {
                          return emitOnlyPinnedOrTripleSlashComments(node);
                      }
                      var hoistedInDeclarationScope = shouldHoistDeclarationInSystemJsModule(node);
                      var emitVarForModule = !hoistedInDeclarationScope && !isModuleMergedWithES6Class(node);
                      if (emitVarForModule) {
                          emitStart(node);
                          if (isES6ExportedDeclaration(node)) {
                              write("export ");
                          }
                          write("var ");
                          emit(node.name);
                          write(";");
                          emitEnd(node);
                          writeLine();
                      }
                      emitStart(node);
                      write("(function (");
                      emitStart(node.name);
                      write(getGeneratedNameForNode(node));
                      emitEnd(node.name);
                      write(") ");
                      if (node.body.kind === 207) {
                          var saveTempFlags = tempFlags;
                          var saveTempVariables = tempVariables;
                          tempFlags = 0;
                          tempVariables = undefined;
                          emit(node.body);
                          tempFlags = saveTempFlags;
                          tempVariables = saveTempVariables;
                      }
                      else {
                          write("{");
                          increaseIndent();
                          scopeEmitStart(node);
                          emitCaptureThisForNodeIfNecessary(node);
                          writeLine();
                          emit(node.body);
                          decreaseIndent();
                          writeLine();
                          var moduleBlock = getInnerMostModuleDeclarationFromDottedModule(node).body;
                          emitToken(15, moduleBlock.statements.end);
                          scopeEmitEnd();
                      }
                      write(")(");
                      if ((node.flags & 1) && !isES6ExportedDeclaration(node)) {
                          emit(node.name);
                          write(" = ");
                      }
                      emitModuleMemberName(node);
                      write(" || (");
                      emitModuleMemberName(node);
                      write(" = {}));");
                      emitEnd(node);
                      if (!isES6ExportedDeclaration(node) && node.name.kind === 65 && node.parent === currentSourceFile) {
                          if (compilerOptions.module === 4 && (node.flags & 1)) {
                              writeLine();
                              write(exportFunctionForFile + "(\"");
                              emitDeclarationName(node);
                              write("\", ");
                              emitDeclarationName(node);
                              write(")");
                          }
                          emitExportMemberAssignments(node.name);
                      }
                  }
                  function emitRequire(moduleName) {
                      if (moduleName.kind === 8) {
                          write("require(");
                          emitStart(moduleName);
                          emitLiteral(moduleName);
                          emitEnd(moduleName);
                          emitToken(17, moduleName.end);
                      }
                      else {
                          write("require()");
                      }
                  }
                  function getNamespaceDeclarationNode(node) {
                      if (node.kind === 209) {
                          return node;
                      }
                      var importClause = node.importClause;
                      if (importClause && importClause.namedBindings && importClause.namedBindings.kind === 212) {
                          return importClause.namedBindings;
                      }
                  }
                  function isDefaultImport(node) {
                      return node.kind === 210 && node.importClause && !!node.importClause.name;
                  }
                  function emitExportImportAssignments(node) {
                      if (ts.isAliasSymbolDeclaration(node) && resolver.isValueAliasDeclaration(node)) {
                          emitExportMemberAssignments(node.name);
                      }
                      ts.forEachChild(node, emitExportImportAssignments);
                  }
                  function emitImportDeclaration(node) {
                      if (languageVersion < 2) {
                          return emitExternalImportDeclaration(node);
                      }
                      if (node.importClause) {
                          var shouldEmitDefaultBindings = resolver.isReferencedAliasDeclaration(node.importClause);
                          var shouldEmitNamedBindings = node.importClause.namedBindings && resolver.isReferencedAliasDeclaration(node.importClause.namedBindings, true);
                          if (shouldEmitDefaultBindings || shouldEmitNamedBindings) {
                              write("import ");
                              emitStart(node.importClause);
                              if (shouldEmitDefaultBindings) {
                                  emit(node.importClause.name);
                                  if (shouldEmitNamedBindings) {
                                      write(", ");
                                  }
                              }
                              if (shouldEmitNamedBindings) {
                                  emitLeadingComments(node.importClause.namedBindings);
                                  emitStart(node.importClause.namedBindings);
                                  if (node.importClause.namedBindings.kind === 212) {
                                      write("* as ");
                                      emit(node.importClause.namedBindings.name);
                                  }
                                  else {
                                      write("{ ");
                                      emitExportOrImportSpecifierList(node.importClause.namedBindings.elements, resolver.isReferencedAliasDeclaration);
                                      write(" }");
                                  }
                                  emitEnd(node.importClause.namedBindings);
                                  emitTrailingComments(node.importClause.namedBindings);
                              }
                              emitEnd(node.importClause);
                              write(" from ");
                              emit(node.moduleSpecifier);
                              write(";");
                          }
                      }
                      else {
                          write("import ");
                          emit(node.moduleSpecifier);
                          write(";");
                      }
                  }
                  function emitExternalImportDeclaration(node) {
                      if (ts.contains(externalImports, node)) {
                          var isExportedImport = node.kind === 209 && (node.flags & 1) !== 0;
                          var namespaceDeclaration = getNamespaceDeclarationNode(node);
                          if (compilerOptions.module !== 2) {
                              emitLeadingComments(node);
                              emitStart(node);
                              if (namespaceDeclaration && !isDefaultImport(node)) {
                                  if (!isExportedImport)
                                      write("var ");
                                  emitModuleMemberName(namespaceDeclaration);
                                  write(" = ");
                              }
                              else {
                                  var isNakedImport = 210 && !node.importClause;
                                  if (!isNakedImport) {
                                      write("var ");
                                      write(getGeneratedNameForNode(node));
                                      write(" = ");
                                  }
                              }
                              emitRequire(ts.getExternalModuleName(node));
                              if (namespaceDeclaration && isDefaultImport(node)) {
                                  write(", ");
                                  emitModuleMemberName(namespaceDeclaration);
                                  write(" = ");
                                  write(getGeneratedNameForNode(node));
                              }
                              write(";");
                              emitEnd(node);
                              emitExportImportAssignments(node);
                              emitTrailingComments(node);
                          }
                          else {
                              if (isExportedImport) {
                                  emitModuleMemberName(namespaceDeclaration);
                                  write(" = ");
                                  emit(namespaceDeclaration.name);
                                  write(";");
                              }
                              else if (namespaceDeclaration && isDefaultImport(node)) {
                                  write("var ");
                                  emitModuleMemberName(namespaceDeclaration);
                                  write(" = ");
                                  write(getGeneratedNameForNode(node));
                                  write(";");
                              }
                              emitExportImportAssignments(node);
                          }
                      }
                  }
                  function emitImportEqualsDeclaration(node) {
                      if (ts.isExternalModuleImportEqualsDeclaration(node)) {
                          emitExternalImportDeclaration(node);
                          return;
                      }
                      if (resolver.isReferencedAliasDeclaration(node) ||
                          (!ts.isExternalModule(currentSourceFile) && resolver.isTopLevelValueImportEqualsWithEntityName(node))) {
                          emitLeadingComments(node);
                          emitStart(node);
                          if (isES6ExportedDeclaration(node)) {
                              write("export ");
                              write("var ");
                          }
                          else if (!(node.flags & 1)) {
                              write("var ");
                          }
                          emitModuleMemberName(node);
                          write(" = ");
                          emit(node.moduleReference);
                          write(";");
                          emitEnd(node);
                          emitExportImportAssignments(node);
                          emitTrailingComments(node);
                      }
                  }
                  function emitExportDeclaration(node) {
                      ts.Debug.assert(compilerOptions.module !== 4);
                      if (languageVersion < 2) {
                          if (node.moduleSpecifier && (!node.exportClause || resolver.isValueAliasDeclaration(node))) {
                              emitStart(node);
                              var generatedName = getGeneratedNameForNode(node);
                              if (node.exportClause) {
                                  if (compilerOptions.module !== 2) {
                                      write("var ");
                                      write(generatedName);
                                      write(" = ");
                                      emitRequire(ts.getExternalModuleName(node));
                                      write(";");
                                  }
                                  for (var _a = 0, _b = node.exportClause.elements; _a < _b.length; _a++) {
                                      var specifier = _b[_a];
                                      if (resolver.isValueAliasDeclaration(specifier)) {
                                          writeLine();
                                          emitStart(specifier);
                                          emitContainingModuleName(specifier);
                                          write(".");
                                          emitNodeWithoutSourceMap(specifier.name);
                                          write(" = ");
                                          write(generatedName);
                                          write(".");
                                          emitNodeWithoutSourceMap(specifier.propertyName || specifier.name);
                                          write(";");
                                          emitEnd(specifier);
                                      }
                                  }
                              }
                              else {
                                  writeLine();
                                  write("__export(");
                                  if (compilerOptions.module !== 2) {
                                      emitRequire(ts.getExternalModuleName(node));
                                  }
                                  else {
                                      write(generatedName);
                                  }
                                  write(");");
                              }
                              emitEnd(node);
                          }
                      }
                      else {
                          if (!node.exportClause || resolver.isValueAliasDeclaration(node)) {
                              emitStart(node);
                              write("export ");
                              if (node.exportClause) {
                                  write("{ ");
                                  emitExportOrImportSpecifierList(node.exportClause.elements, resolver.isValueAliasDeclaration);
                                  write(" }");
                              }
                              else {
                                  write("*");
                              }
                              if (node.moduleSpecifier) {
                                  write(" from ");
                                  emitNodeWithoutSourceMap(node.moduleSpecifier);
                              }
                              write(";");
                              emitEnd(node);
                          }
                      }
                  }
                  function emitExportOrImportSpecifierList(specifiers, shouldEmit) {
                      ts.Debug.assert(languageVersion >= 2);
                      var needsComma = false;
                      for (var _a = 0; _a < specifiers.length; _a++) {
                          var specifier = specifiers[_a];
                          if (shouldEmit(specifier)) {
                              if (needsComma) {
                                  write(", ");
                              }
                              emitStart(specifier);
                              if (specifier.propertyName) {
                                  emitNodeWithoutSourceMap(specifier.propertyName);
                                  write(" as ");
                              }
                              emitNodeWithoutSourceMap(specifier.name);
                              emitEnd(specifier);
                              needsComma = true;
                          }
                      }
                  }
                  function emitExportAssignment(node) {
                      if (!node.isExportEquals && resolver.isValueAliasDeclaration(node)) {
                          if (languageVersion >= 2) {
                              writeLine();
                              emitStart(node);
                              write("export default ");
                              var expression = node.expression;
                              emit(expression);
                              if (expression.kind !== 201 &&
                                  expression.kind !== 202) {
                                  write(";");
                              }
                              emitEnd(node);
                          }
                          else {
                              writeLine();
                              emitStart(node);
                              if (compilerOptions.module === 4) {
                                  write(exportFunctionForFile + "(\"default\",");
                                  emit(node.expression);
                                  write(")");
                              }
                              else {
                                  emitContainingModuleName(node);
                                  if (languageVersion === 0) {
                                      write("[\"default\"] = ");
                                  }
                                  else {
                                      write(".default = ");
                                  }
                                  emit(node.expression);
                              }
                              write(";");
                              emitEnd(node);
                          }
                      }
                  }
                  function collectExternalModuleInfo(sourceFile) {
                      externalImports = [];
                      exportSpecifiers = {};
                      exportEquals = undefined;
                      hasExportStars = false;
                      for (var _a = 0, _b = sourceFile.statements; _a < _b.length; _a++) {
                          var node = _b[_a];
                          switch (node.kind) {
                              case 210:
                                  if (!node.importClause ||
                                      resolver.isReferencedAliasDeclaration(node.importClause, true)) {
                                      externalImports.push(node);
                                  }
                                  break;
                              case 209:
                                  if (node.moduleReference.kind === 220 && resolver.isReferencedAliasDeclaration(node)) {
                                      externalImports.push(node);
                                  }
                                  break;
                              case 216:
                                  if (node.moduleSpecifier) {
                                      if (!node.exportClause) {
                                          externalImports.push(node);
                                          hasExportStars = true;
                                      }
                                      else if (resolver.isValueAliasDeclaration(node)) {
                                          externalImports.push(node);
                                      }
                                  }
                                  else {
                                      for (var _c = 0, _d = node.exportClause.elements; _c < _d.length; _c++) {
                                          var specifier = _d[_c];
                                          var name_20 = (specifier.propertyName || specifier.name).text;
                                          (exportSpecifiers[name_20] || (exportSpecifiers[name_20] = [])).push(specifier);
                                      }
                                  }
                                  break;
                              case 215:
                                  if (node.isExportEquals && !exportEquals) {
                                      exportEquals = node;
                                  }
                                  break;
                          }
                      }
                  }
                  function emitExportStarHelper() {
                      if (hasExportStars) {
                          writeLine();
                          write("function __export(m) {");
                          increaseIndent();
                          writeLine();
                          write("for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];");
                          decreaseIndent();
                          writeLine();
                          write("}");
                      }
                  }
                  function getLocalNameForExternalImport(importNode) {
                      var namespaceDeclaration = getNamespaceDeclarationNode(importNode);
                      if (namespaceDeclaration && !isDefaultImport(importNode)) {
                          return ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, namespaceDeclaration.name);
                      }
                      else {
                          return getGeneratedNameForNode(importNode);
                      }
                  }
                  function getExternalModuleNameText(importNode) {
                      var moduleName = ts.getExternalModuleName(importNode);
                      if (moduleName.kind === 8) {
                          return getLiteralText(moduleName);
                      }
                      return undefined;
                  }
                  function emitVariableDeclarationsForImports() {
                      if (externalImports.length === 0) {
                          return;
                      }
                      writeLine();
                      var started = false;
                      for (var _a = 0; _a < externalImports.length; _a++) {
                          var importNode = externalImports[_a];
                          var skipNode = importNode.kind === 216 ||
                              (importNode.kind === 210 && !importNode.importClause);
                          if (skipNode) {
                              continue;
                          }
                          if (!started) {
                              write("var ");
                              started = true;
                          }
                          else {
                              write(", ");
                          }
                          write(getLocalNameForExternalImport(importNode));
                      }
                      if (started) {
                          write(";");
                      }
                  }
                  function emitLocalStorageForExportedNamesIfNecessary(exportedDeclarations) {
                      if (!hasExportStars) {
                          return undefined;
                      }
                      if (!exportedDeclarations && ts.isEmpty(exportSpecifiers)) {
                          var hasExportDeclarationWithExportClause = false;
                          for (var _a = 0; _a < externalImports.length; _a++) {
                              var externalImport = externalImports[_a];
                              if (externalImport.kind === 216 && externalImport.exportClause) {
                                  hasExportDeclarationWithExportClause = true;
                                  break;
                              }
                          }
                          if (!hasExportDeclarationWithExportClause) {
                              return emitExportStarFunction(undefined);
                          }
                      }
                      var exportedNamesStorageRef = makeUniqueName("exportedNames");
                      writeLine();
                      write("var " + exportedNamesStorageRef + " = {");
                      increaseIndent();
                      var started = false;
                      if (exportedDeclarations) {
                          for (var i = 0; i < exportedDeclarations.length; ++i) {
                              writeExportedName(exportedDeclarations[i]);
                          }
                      }
                      if (exportSpecifiers) {
                          for (var n in exportSpecifiers) {
                              for (var _b = 0, _c = exportSpecifiers[n]; _b < _c.length; _b++) {
                                  var specifier = _c[_b];
                                  writeExportedName(specifier.name);
                              }
                          }
                      }
                      for (var _d = 0; _d < externalImports.length; _d++) {
                          var externalImport = externalImports[_d];
                          if (externalImport.kind !== 216) {
                              continue;
                          }
                          var exportDecl = externalImport;
                          if (!exportDecl.exportClause) {
                              continue;
                          }
                          for (var _e = 0, _f = exportDecl.exportClause.elements; _e < _f.length; _e++) {
                              var element = _f[_e];
                              writeExportedName(element.name || element.propertyName);
                          }
                      }
                      decreaseIndent();
                      writeLine();
                      write("};");
                      return emitExportStarFunction(exportedNamesStorageRef);
                      function emitExportStarFunction(localNames) {
                          var exportStarFunction = makeUniqueName("exportStar");
                          writeLine();
                          write("function " + exportStarFunction + "(m) {");
                          increaseIndent();
                          writeLine();
                          write("for(var n in m) {");
                          increaseIndent();
                          writeLine();
                          write("if (n !== \"default\"");
                          if (localNames) {
                              write("&& !" + localNames + ".hasOwnProperty(n)");
                          }
                          write(") " + exportFunctionForFile + "(n, m[n]);");
                          decreaseIndent();
                          writeLine();
                          write("}");
                          decreaseIndent();
                          writeLine();
                          write("}");
                          return exportStarFunction;
                      }
                      function writeExportedName(node) {
                          if (node.kind !== 65 && node.flags & 256) {
                              return;
                          }
                          if (started) {
                              write(",");
                          }
                          else {
                              started = true;
                          }
                          writeLine();
                          write("'");
                          if (node.kind === 65) {
                              emitNodeWithoutSourceMap(node);
                          }
                          else {
                              emitDeclarationName(node);
                          }
                          write("': true");
                      }
                  }
                  function processTopLevelVariableAndFunctionDeclarations(node) {
                      var hoistedVars;
                      var hoistedFunctionDeclarations;
                      var exportedDeclarations;
                      visit(node);
                      if (hoistedVars) {
                          writeLine();
                          write("var ");
                          var seen = {};
                          for (var i = 0; i < hoistedVars.length; ++i) {
                              var local = hoistedVars[i];
                              var name_21 = local.kind === 65
                                  ? local
                                  : local.name;
                              if (name_21) {
                                  var text = ts.unescapeIdentifier(name_21.text);
                                  if (ts.hasProperty(seen, text)) {
                                      continue;
                                  }
                                  else {
                                      seen[text] = text;
                                  }
                              }
                              if (i !== 0) {
                                  write(", ");
                              }
                              if (local.kind === 202 || local.kind === 206 || local.kind === 205) {
                                  emitDeclarationName(local);
                              }
                              else {
                                  emit(local);
                              }
                              var flags = ts.getCombinedNodeFlags(local.kind === 65 ? local.parent : local);
                              if (flags & 1) {
                                  if (!exportedDeclarations) {
                                      exportedDeclarations = [];
                                  }
                                  exportedDeclarations.push(local);
                              }
                          }
                          write(";");
                      }
                      if (hoistedFunctionDeclarations) {
                          for (var _a = 0; _a < hoistedFunctionDeclarations.length; _a++) {
                              var f = hoistedFunctionDeclarations[_a];
                              writeLine();
                              emit(f);
                              if (f.flags & 1) {
                                  if (!exportedDeclarations) {
                                      exportedDeclarations = [];
                                  }
                                  exportedDeclarations.push(f);
                              }
                          }
                      }
                      return exportedDeclarations;
                      function visit(node) {
                          if (node.flags & 2) {
                              return;
                          }
                          if (node.kind === 201) {
                              if (!hoistedFunctionDeclarations) {
                                  hoistedFunctionDeclarations = [];
                              }
                              hoistedFunctionDeclarations.push(node);
                              return;
                          }
                          if (node.kind === 202) {
                              if (!hoistedVars) {
                                  hoistedVars = [];
                              }
                              hoistedVars.push(node);
                              return;
                          }
                          if (node.kind === 205) {
                              if (shouldEmitEnumDeclaration(node)) {
                                  if (!hoistedVars) {
                                      hoistedVars = [];
                                  }
                                  hoistedVars.push(node);
                              }
                              return;
                          }
                          if (node.kind === 206) {
                              if (shouldEmitModuleDeclaration(node)) {
                                  if (!hoistedVars) {
                                      hoistedVars = [];
                                  }
                                  hoistedVars.push(node);
                              }
                              return;
                          }
                          if (node.kind === 199 || node.kind === 153) {
                              if (shouldHoistVariable(node, false)) {
                                  var name_22 = node.name;
                                  if (name_22.kind === 65) {
                                      if (!hoistedVars) {
                                          hoistedVars = [];
                                      }
                                      hoistedVars.push(name_22);
                                  }
                                  else {
                                      ts.forEachChild(name_22, visit);
                                  }
                              }
                              return;
                          }
                          if (ts.isBindingPattern(node)) {
                              ts.forEach(node.elements, visit);
                              return;
                          }
                          if (!ts.isDeclaration(node)) {
                              ts.forEachChild(node, visit);
                          }
                      }
                  }
                  function shouldHoistVariable(node, checkIfSourceFileLevelDecl) {
                      if (checkIfSourceFileLevelDecl && !shouldHoistDeclarationInSystemJsModule(node)) {
                          return false;
                      }
                      return (ts.getCombinedNodeFlags(node) & 12288) === 0 ||
                          ts.getEnclosingBlockScopeContainer(node).kind === 228;
                  }
                  function isCurrentFileSystemExternalModule() {
                      return compilerOptions.module === 4 && ts.isExternalModule(currentSourceFile);
                  }
                  function emitSystemModuleBody(node, startIndex) {
                      emitVariableDeclarationsForImports();
                      writeLine();
                      var exportedDeclarations = processTopLevelVariableAndFunctionDeclarations(node);
                      var exportStarFunction = emitLocalStorageForExportedNamesIfNecessary(exportedDeclarations);
                      writeLine();
                      write("return {");
                      increaseIndent();
                      writeLine();
                      emitSetters(exportStarFunction);
                      writeLine();
                      emitExecute(node, startIndex);
                      emitTempDeclarations(true);
                      decreaseIndent();
                      writeLine();
                      write("}");
                  }
                  function emitSetters(exportStarFunction) {
                      write("setters:[");
                      for (var i = 0; i < externalImports.length; ++i) {
                          if (i !== 0) {
                              write(",");
                          }
                          writeLine();
                          increaseIndent();
                          var importNode = externalImports[i];
                          var importVariableName = getLocalNameForExternalImport(importNode) || "";
                          var parameterName = "_" + importVariableName;
                          write("function (" + parameterName + ") {");
                          switch (importNode.kind) {
                              case 210:
                                  if (!importNode.importClause) {
                                      break;
                                  }
                              case 209:
                                  ts.Debug.assert(importVariableName !== "");
                                  increaseIndent();
                                  writeLine();
                                  write(importVariableName + " = " + parameterName + ";");
                                  writeLine();
                                  var defaultName = importNode.kind === 210
                                      ? importNode.importClause.name
                                      : importNode.name;
                                  if (defaultName) {
                                      emitExportMemberAssignments(defaultName);
                                      writeLine();
                                  }
                                  if (importNode.kind === 210 &&
                                      importNode.importClause.namedBindings) {
                                      var namedBindings = importNode.importClause.namedBindings;
                                      if (namedBindings.kind === 212) {
                                          emitExportMemberAssignments(namedBindings.name);
                                          writeLine();
                                      }
                                      else {
                                          for (var _a = 0, _b = namedBindings.elements; _a < _b.length; _a++) {
                                              var element = _b[_a];
                                              emitExportMemberAssignments(element.name || element.propertyName);
                                              writeLine();
                                          }
                                      }
                                  }
                                  decreaseIndent();
                                  break;
                              case 216:
                                  ts.Debug.assert(importVariableName !== "");
                                  increaseIndent();
                                  if (importNode.exportClause) {
                                      for (var _c = 0, _d = importNode.exportClause.elements; _c < _d.length; _c++) {
                                          var e = _d[_c];
                                          writeLine();
                                          write(exportFunctionForFile + "(\"");
                                          emitNodeWithoutSourceMap(e.name);
                                          write("\", " + parameterName + "[\"");
                                          emitNodeWithoutSourceMap(e.propertyName || e.name);
                                          write("\"]);");
                                      }
                                  }
                                  else {
                                      writeLine();
                                      write(exportStarFunction + "(" + parameterName + ");");
                                  }
                                  writeLine();
                                  decreaseIndent();
                                  break;
                          }
                          write("}");
                          decreaseIndent();
                      }
                      write("],");
                  }
                  function emitExecute(node, startIndex) {
                      write("execute: function() {");
                      increaseIndent();
                      writeLine();
                      for (var i = startIndex; i < node.statements.length; ++i) {
                          var statement = node.statements[i];
                          switch (statement.kind) {
                              case 216:
                              case 210:
                              case 209:
                              case 201:
                                  continue;
                          }
                          writeLine();
                          emit(statement);
                      }
                      decreaseIndent();
                      writeLine();
                      write("}");
                  }
                  function emitSystemModule(node, startIndex) {
                      collectExternalModuleInfo(node);
                      ts.Debug.assert(!exportFunctionForFile);
                      exportFunctionForFile = makeUniqueName("exports");
                      write("System.register([");
                      for (var i = 0; i < externalImports.length; ++i) {
                          var text = getExternalModuleNameText(externalImports[i]);
                          if (i !== 0) {
                              write(", ");
                          }
                          write(text);
                      }
                      write("], function(" + exportFunctionForFile + ") {");
                      writeLine();
                      increaseIndent();
                      emitCaptureThisForNodeIfNecessary(node);
                      emitSystemModuleBody(node, startIndex);
                      decreaseIndent();
                      writeLine();
                      write("});");
                  }
                  function emitAMDDependencies(node, includeNonAmdDependencies) {
                      // An AMD define function has the following shape:
                      //     define(id?, dependencies?, factory);
                      //
                      // This has the shape of
                      //     define(name, ["module1", "module2"], function (module1Alias) {
                      // The location of the alias in the parameter list in the factory function needs to
                      // match the position of the module name in the dependency list.
                      //
                      // To ensure this is true in cases of modules with no aliases, e.g.:
                      // `import "module"` or `<amd-dependency path= "a.css" />`
                      // we need to add modules without alias names to the end of the dependencies list
                      var aliasedModuleNames = [];
                      var unaliasedModuleNames = [];
                      var importAliasNames = [];
                      for (var _a = 0, _b = node.amdDependencies; _a < _b.length; _a++) {
                          var amdDependency = _b[_a];
                          if (amdDependency.name) {
                              aliasedModuleNames.push("\"" + amdDependency.path + "\"");
                              importAliasNames.push(amdDependency.name);
                          }
                          else {
                              unaliasedModuleNames.push("\"" + amdDependency.path + "\"");
                          }
                      }
                      for (var _c = 0; _c < externalImports.length; _c++) {
                          var importNode = externalImports[_c];
                          var externalModuleName = getExternalModuleNameText(importNode);
                          var importAliasName = getLocalNameForExternalImport(importNode);
                          if (includeNonAmdDependencies && importAliasName) {
                              aliasedModuleNames.push(externalModuleName);
                              importAliasNames.push(importAliasName);
                          }
                          else {
                              unaliasedModuleNames.push(externalModuleName);
                          }
                      }
                      write("[\"require\", \"exports\"");
                      if (aliasedModuleNames.length) {
                          write(", ");
                          write(aliasedModuleNames.join(", "));
                      }
                      if (unaliasedModuleNames.length) {
                          write(", ");
                          write(unaliasedModuleNames.join(", "));
                      }
                      write("], function (require, exports");
                      if (importAliasNames.length) {
                          write(", ");
                          write(importAliasNames.join(", "));
                      }
                  }
                  function emitAMDModule(node, startIndex) {
                      collectExternalModuleInfo(node);
                      writeLine();
                      write("define(");
                      if (node.amdModuleName) {
                          write("\"" + node.amdModuleName + "\", ");
                      }
                      emitAMDDependencies(node, true);
                      write(") {");
                      increaseIndent();
                      emitExportStarHelper();
                      emitCaptureThisForNodeIfNecessary(node);
                      emitLinesStartingAt(node.statements, startIndex);
                      emitTempDeclarations(true);
                      emitExportEquals(true);
                      decreaseIndent();
                      writeLine();
                      write("});");
                  }
                  function emitCommonJSModule(node, startIndex) {
                      collectExternalModuleInfo(node);
                      emitExportStarHelper();
                      emitCaptureThisForNodeIfNecessary(node);
                      emitLinesStartingAt(node.statements, startIndex);
                      emitTempDeclarations(true);
                      emitExportEquals(false);
                  }
                  function emitUMDModule(node, startIndex) {
                      collectExternalModuleInfo(node);
                      writeLines("(function (deps, factory) {\n    if (typeof module === 'object' && typeof module.exports === 'object') {\n        var v = factory(require, exports); if (v !== undefined) module.exports = v;\n    }\n    else if (typeof define === 'function' && define.amd) {\n        define(deps, factory);\n    }\n})(");
                      emitAMDDependencies(node, false);
                      write(") {");
                      increaseIndent();
                      emitExportStarHelper();
                      emitCaptureThisForNodeIfNecessary(node);
                      emitLinesStartingAt(node.statements, startIndex);
                      emitTempDeclarations(true);
                      emitExportEquals(true);
                      decreaseIndent();
                      writeLine();
                      write("});");
                  }
                  function emitES6Module(node, startIndex) {
                      externalImports = undefined;
                      exportSpecifiers = undefined;
                      exportEquals = undefined;
                      hasExportStars = false;
                      emitCaptureThisForNodeIfNecessary(node);
                      emitLinesStartingAt(node.statements, startIndex);
                      emitTempDeclarations(true);
                  }
                  function emitExportEquals(emitAsReturn) {
                      if (exportEquals && resolver.isValueAliasDeclaration(exportEquals)) {
                          writeLine();
                          emitStart(exportEquals);
                          write(emitAsReturn ? "return " : "module.exports = ");
                          emit(exportEquals.expression);
                          write(";");
                          emitEnd(exportEquals);
                      }
                  }
                  function emitDirectivePrologues(statements, startWithNewLine) {
                      for (var i = 0; i < statements.length; ++i) {
                          if (ts.isPrologueDirective(statements[i])) {
                              if (startWithNewLine || i > 0) {
                                  writeLine();
                              }
                              emit(statements[i]);
                          }
                          else {
                              return i;
                          }
                      }
                      return statements.length;
                  }
                  function writeLines(text) {
                      var lines = text.split(/\r\n|\r|\n/g);
                      for (var i = 0; i < lines.length; ++i) {
                          var line = lines[i];
                          if (line.length) {
                              writeLine();
                              write(line);
                          }
                      }
                  }
                  function emitSourceFileNode(node) {
                      writeLine();
                      emitDetachedComments(node);
                      var startIndex = emitDirectivePrologues(node.statements, false);
                      if (!compilerOptions.noEmitHelpers) {
                          if ((languageVersion < 2) && (!extendsEmitted && resolver.getNodeCheckFlags(node) & 8)) {
                              writeLines(extendsHelper);
                              extendsEmitted = true;
                          }
                          if (!decorateEmitted && resolver.getNodeCheckFlags(node) & 512) {
                              writeLines(decorateHelper);
                              if (compilerOptions.emitDecoratorMetadata) {
                                  writeLines(metadataHelper);
                              }
                              decorateEmitted = true;
                          }
                          if (!paramEmitted && resolver.getNodeCheckFlags(node) & 1024) {
                              writeLines(paramHelper);
                              paramEmitted = true;
                          }
                      }
                      if (ts.isExternalModule(node) || compilerOptions.separateCompilation) {
                          if (languageVersion >= 2) {
                              emitES6Module(node, startIndex);
                          }
                          else if (compilerOptions.module === 2) {
                              emitAMDModule(node, startIndex);
                          }
                          else if (compilerOptions.module === 4) {
                              emitSystemModule(node, startIndex);
                          }
                          else if (compilerOptions.module === 3) {
                              emitUMDModule(node, startIndex);
                          }
                          else {
                              emitCommonJSModule(node, startIndex);
                          }
                      }
                      else {
                          externalImports = undefined;
                          exportSpecifiers = undefined;
                          exportEquals = undefined;
                          hasExportStars = false;
                          emitCaptureThisForNodeIfNecessary(node);
                          emitLinesStartingAt(node.statements, startIndex);
                          emitTempDeclarations(true);
                      }
                      emitLeadingComments(node.endOfFileToken);
                  }
                  function emitNodeWithoutSourceMap(node, allowGeneratedIdentifiers) {
                      if (!node) {
                          return;
                      }
                      if (node.flags & 2) {
                          return emitOnlyPinnedOrTripleSlashComments(node);
                      }
                      var emitComments = shouldEmitLeadingAndTrailingComments(node);
                      if (emitComments) {
                          emitLeadingComments(node);
                      }
                      emitJavaScriptWorker(node, allowGeneratedIdentifiers);
                      if (emitComments) {
                          emitTrailingComments(node);
                      }
                  }
                  function shouldEmitLeadingAndTrailingComments(node) {
                      switch (node.kind) {
                          case 203:
                          case 201:
                          case 210:
                          case 209:
                          case 204:
                          case 215:
                              return false;
                          case 206:
                              return shouldEmitModuleDeclaration(node);
                          case 205:
                              return shouldEmitEnumDeclaration(node);
                      }
                      if (node.kind !== 180 &&
                          node.parent &&
                          node.parent.kind === 164 &&
                          node.parent.body === node &&
                          compilerOptions.target <= 1) {
                          return false;
                      }
                      return true;
                  }
                  function emitJavaScriptWorker(node, allowGeneratedIdentifiers) {
                      if (allowGeneratedIdentifiers === void 0) { allowGeneratedIdentifiers = true; }
                      switch (node.kind) {
                          case 65:
                              return emitIdentifier(node, allowGeneratedIdentifiers);
                          case 130:
                              return emitParameter(node);
                          case 135:
                          case 134:
                              return emitMethod(node);
                          case 137:
                          case 138:
                              return emitAccessor(node);
                          case 93:
                              return emitThis(node);
                          case 91:
                              return emitSuper(node);
                          case 89:
                              return write("null");
                          case 95:
                              return write("true");
                          case 80:
                              return write("false");
                          case 7:
                          case 8:
                          case 9:
                          case 10:
                          case 11:
                          case 12:
                          case 13:
                              return emitLiteral(node);
                          case 172:
                              return emitTemplateExpression(node);
                          case 178:
                              return emitTemplateSpan(node);
                          case 127:
                              return emitQualifiedName(node);
                          case 151:
                              return emitObjectBindingPattern(node);
                          case 152:
                              return emitArrayBindingPattern(node);
                          case 153:
                              return emitBindingElement(node);
                          case 154:
                              return emitArrayLiteral(node);
                          case 155:
                              return emitObjectLiteral(node);
                          case 225:
                              return emitPropertyAssignment(node);
                          case 226:
                              return emitShorthandPropertyAssignment(node);
                          case 128:
                              return emitComputedPropertyName(node);
                          case 156:
                              return emitPropertyAccess(node);
                          case 157:
                              return emitIndexedAccess(node);
                          case 158:
                              return emitCallExpression(node);
                          case 159:
                              return emitNewExpression(node);
                          case 160:
                              return emitTaggedTemplateExpression(node);
                          case 161:
                              return emit(node.expression);
                          case 162:
                              return emitParenExpression(node);
                          case 201:
                          case 163:
                          case 164:
                              return emitFunctionDeclaration(node);
                          case 165:
                              return emitDeleteExpression(node);
                          case 166:
                              return emitTypeOfExpression(node);
                          case 167:
                              return emitVoidExpression(node);
                          case 168:
                              return emitPrefixUnaryExpression(node);
                          case 169:
                              return emitPostfixUnaryExpression(node);
                          case 170:
                              return emitBinaryExpression(node);
                          case 171:
                              return emitConditionalExpression(node);
                          case 174:
                              return emitSpreadElementExpression(node);
                          case 173:
                              return emitYieldExpression(node);
                          case 176:
                              return;
                          case 180:
                          case 207:
                              return emitBlock(node);
                          case 181:
                              return emitVariableStatement(node);
                          case 182:
                              return write(";");
                          case 183:
                              return emitExpressionStatement(node);
                          case 184:
                              return emitIfStatement(node);
                          case 185:
                              return emitDoStatement(node);
                          case 186:
                              return emitWhileStatement(node);
                          case 187:
                              return emitForStatement(node);
                          case 189:
                          case 188:
                              return emitForInOrForOfStatement(node);
                          case 190:
                          case 191:
                              return emitBreakOrContinueStatement(node);
                          case 192:
                              return emitReturnStatement(node);
                          case 193:
                              return emitWithStatement(node);
                          case 194:
                              return emitSwitchStatement(node);
                          case 221:
                          case 222:
                              return emitCaseOrDefaultClause(node);
                          case 195:
                              return emitLabelledStatement(node);
                          case 196:
                              return emitThrowStatement(node);
                          case 197:
                              return emitTryStatement(node);
                          case 224:
                              return emitCatchClause(node);
                          case 198:
                              return emitDebuggerStatement(node);
                          case 199:
                              return emitVariableDeclaration(node);
                          case 175:
                              return emitClassExpression(node);
                          case 202:
                              return emitClassDeclaration(node);
                          case 203:
                              return emitInterfaceDeclaration(node);
                          case 205:
                              return emitEnumDeclaration(node);
                          case 227:
                              return emitEnumMember(node);
                          case 206:
                              return emitModuleDeclaration(node);
                          case 210:
                              return emitImportDeclaration(node);
                          case 209:
                              return emitImportEqualsDeclaration(node);
                          case 216:
                              return emitExportDeclaration(node);
                          case 215:
                              return emitExportAssignment(node);
                          case 228:
                              return emitSourceFileNode(node);
                      }
                  }
                  function hasDetachedComments(pos) {
                      return detachedCommentsInfo !== undefined && ts.lastOrUndefined(detachedCommentsInfo).nodePos === pos;
                  }
                  function getLeadingCommentsWithoutDetachedComments() {
                      var leadingComments = ts.getLeadingCommentRanges(currentSourceFile.text, ts.lastOrUndefined(detachedCommentsInfo).detachedCommentEndPos);
                      if (detachedCommentsInfo.length - 1) {
                          detachedCommentsInfo.pop();
                      }
                      else {
                          detachedCommentsInfo = undefined;
                      }
                      return leadingComments;
                  }
                  function filterComments(ranges, onlyPinnedOrTripleSlashComments) {
                      if (ranges && onlyPinnedOrTripleSlashComments) {
                          ranges = ts.filter(ranges, isPinnedOrTripleSlashComment);
                          if (ranges.length === 0) {
                              return undefined;
                          }
                      }
                      return ranges;
                  }
                  function getLeadingCommentsToEmit(node) {
                      if (node.parent) {
                          if (node.parent.kind === 228 || node.pos !== node.parent.pos) {
                              if (hasDetachedComments(node.pos)) {
                                  return getLeadingCommentsWithoutDetachedComments();
                              }
                              else {
                                  return ts.getLeadingCommentRangesOfNode(node, currentSourceFile);
                              }
                          }
                      }
                  }
                  function getTrailingCommentsToEmit(node) {
                      if (node.parent) {
                          if (node.parent.kind === 228 || node.end !== node.parent.end) {
                              return ts.getTrailingCommentRanges(currentSourceFile.text, node.end);
                          }
                      }
                  }
                  function emitOnlyPinnedOrTripleSlashComments(node) {
                      emitLeadingCommentsWorker(node, true);
                  }
                  function emitLeadingComments(node) {
                      return emitLeadingCommentsWorker(node, compilerOptions.removeComments);
                  }
                  function emitLeadingCommentsWorker(node, onlyPinnedOrTripleSlashComments) {
                      var leadingComments = filterComments(getLeadingCommentsToEmit(node), onlyPinnedOrTripleSlashComments);
                      ts.emitNewLineBeforeLeadingComments(currentSourceFile, writer, node, leadingComments);
                      ts.emitComments(currentSourceFile, writer, leadingComments, true, newLine, writeComment);
                  }
                  function emitTrailingComments(node) {
                      var trailingComments = filterComments(getTrailingCommentsToEmit(node), compilerOptions.removeComments);
                      ts.emitComments(currentSourceFile, writer, trailingComments, false, newLine, writeComment);
                  }
                  function emitLeadingCommentsOfPosition(pos) {
                      var leadingComments;
                      if (hasDetachedComments(pos)) {
                          leadingComments = getLeadingCommentsWithoutDetachedComments();
                      }
                      else {
                          leadingComments = ts.getLeadingCommentRanges(currentSourceFile.text, pos);
                      }
                      leadingComments = filterComments(leadingComments, compilerOptions.removeComments);
                      ts.emitNewLineBeforeLeadingComments(currentSourceFile, writer, { pos: pos, end: pos }, leadingComments);
                      ts.emitComments(currentSourceFile, writer, leadingComments, true, newLine, writeComment);
                  }
                  function emitDetachedComments(node) {
                      var leadingComments = ts.getLeadingCommentRanges(currentSourceFile.text, node.pos);
                      if (leadingComments) {
                          var detachedComments = [];
                          var lastComment;
                          ts.forEach(leadingComments, function (comment) {
                              if (lastComment) {
                                  var lastCommentLine = ts.getLineOfLocalPosition(currentSourceFile, lastComment.end);
                                  var commentLine = ts.getLineOfLocalPosition(currentSourceFile, comment.pos);
                                  if (commentLine >= lastCommentLine + 2) {
                                      return detachedComments;
                                  }
                              }
                              detachedComments.push(comment);
                              lastComment = comment;
                          });
                          if (detachedComments.length) {
                              var lastCommentLine = ts.getLineOfLocalPosition(currentSourceFile, ts.lastOrUndefined(detachedComments).end);
                              var nodeLine = ts.getLineOfLocalPosition(currentSourceFile, ts.skipTrivia(currentSourceFile.text, node.pos));
                              if (nodeLine >= lastCommentLine + 2) {
                                  ts.emitNewLineBeforeLeadingComments(currentSourceFile, writer, node, leadingComments);
                                  ts.emitComments(currentSourceFile, writer, detachedComments, true, newLine, writeComment);
                                  var currentDetachedCommentInfo = { nodePos: node.pos, detachedCommentEndPos: ts.lastOrUndefined(detachedComments).end };
                                  if (detachedCommentsInfo) {
                                      detachedCommentsInfo.push(currentDetachedCommentInfo);
                                  }
                                  else {
                                      detachedCommentsInfo = [currentDetachedCommentInfo];
                                  }
                              }
                          }
                      }
                  }
                  function isPinnedOrTripleSlashComment(comment) {
                      if (currentSourceFile.text.charCodeAt(comment.pos + 1) === 42) {
                          return currentSourceFile.text.charCodeAt(comment.pos + 2) === 33;
                      }
                      else if (currentSourceFile.text.charCodeAt(comment.pos + 1) === 47 &&
                          comment.pos + 2 < comment.end &&
                          currentSourceFile.text.charCodeAt(comment.pos + 2) === 47 &&
                          currentSourceFile.text.substring(comment.pos, comment.end).match(ts.fullTripleSlashReferencePathRegEx)) {
                          return true;
                      }
                  }
              }
              function emitFile(jsFilePath, sourceFile) {
                  emitJavaScript(jsFilePath, sourceFile);
                  if (compilerOptions.declaration) {
                      ts.writeDeclarationFile(jsFilePath, sourceFile, host, resolver, diagnostics);
                  }
              }
          }
          ts.emitFiles = emitFiles;
      })(ts || (ts = {}));
      /// <reference path="sys.ts" />
      /// <reference path="emitter.ts" />
      var ts;
      (function (ts) {
          ts.programTime = 0;
          ts.emitTime = 0;
          ts.ioReadTime = 0;
          ts.ioWriteTime = 0;
          ts.version = "1.5.2";
          var carriageReturnLineFeed = "\r\n";
          var lineFeed = "\n";
          function findConfigFile(searchPath) {
              var fileName = "tsconfig.json";
              while (true) {
                  if (ts.sys.fileExists(fileName)) {
                      return fileName;
                  }
                  var parentPath = ts.getDirectoryPath(searchPath);
                  if (parentPath === searchPath) {
                      break;
                  }
                  searchPath = parentPath;
                  fileName = "../" + fileName;
              }
              return undefined;
          }
          ts.findConfigFile = findConfigFile;
          function createCompilerHost(options, setParentNodes) {
              var currentDirectory;
              var existingDirectories = {};
              function getCanonicalFileName(fileName) {
                  return ts.sys.useCaseSensitiveFileNames ? fileName : fileName.toLowerCase();
              }
              var unsupportedFileEncodingErrorCode = -2147024809;
              function getSourceFile(fileName, languageVersion, onError) {
                  var text;
                  try {
                      var start = new Date().getTime();
                      text = ts.sys.readFile(fileName, options.charset);
                      ts.ioReadTime += new Date().getTime() - start;
                  }
                  catch (e) {
                      if (onError) {
                          onError(e.number === unsupportedFileEncodingErrorCode
                              ? ts.createCompilerDiagnostic(ts.Diagnostics.Unsupported_file_encoding).messageText
                              : e.message);
                      }
                      text = "";
                  }
                  return text !== undefined ? ts.createSourceFile(fileName, text, languageVersion, setParentNodes) : undefined;
              }
              function directoryExists(directoryPath) {
                  if (ts.hasProperty(existingDirectories, directoryPath)) {
                      return true;
                  }
                  if (ts.sys.directoryExists(directoryPath)) {
                      existingDirectories[directoryPath] = true;
                      return true;
                  }
                  return false;
              }
              function ensureDirectoriesExist(directoryPath) {
                  if (directoryPath.length > ts.getRootLength(directoryPath) && !directoryExists(directoryPath)) {
                      var parentDirectory = ts.getDirectoryPath(directoryPath);
                      ensureDirectoriesExist(parentDirectory);
                      ts.sys.createDirectory(directoryPath);
                  }
              }
              function writeFile(fileName, data, writeByteOrderMark, onError) {
                  try {
                      var start = new Date().getTime();
                      ensureDirectoriesExist(ts.getDirectoryPath(ts.normalizePath(fileName)));
                      ts.sys.writeFile(fileName, data, writeByteOrderMark);
                      ts.ioWriteTime += new Date().getTime() - start;
                  }
                  catch (e) {
                      if (onError) {
                          onError(e.message);
                      }
                  }
              }
              var newLine = options.newLine === 0 ? carriageReturnLineFeed :
                  options.newLine === 1 ? lineFeed :
                      ts.sys.newLine;
              return {
                  getSourceFile: getSourceFile,
                  getDefaultLibFileName: function (options) { return ts.combinePaths(ts.getDirectoryPath(ts.normalizePath(ts.sys.getExecutingFilePath())), ts.getDefaultLibFileName(options)); },
                  writeFile: writeFile,
                  getCurrentDirectory: function () { return currentDirectory || (currentDirectory = ts.sys.getCurrentDirectory()); },
                  useCaseSensitiveFileNames: function () { return ts.sys.useCaseSensitiveFileNames; },
                  getCanonicalFileName: getCanonicalFileName,
                  getNewLine: function () { return newLine; }
              };
          }
          ts.createCompilerHost = createCompilerHost;
          function getPreEmitDiagnostics(program, sourceFile) {
              var diagnostics = program.getSyntacticDiagnostics(sourceFile).concat(program.getGlobalDiagnostics()).concat(program.getSemanticDiagnostics(sourceFile));
              if (program.getCompilerOptions().declaration) {
                  diagnostics.concat(program.getDeclarationDiagnostics(sourceFile));
              }
              return ts.sortAndDeduplicateDiagnostics(diagnostics);
          }
          ts.getPreEmitDiagnostics = getPreEmitDiagnostics;
          function flattenDiagnosticMessageText(messageText, newLine) {
              if (typeof messageText === "string") {
                  return messageText;
              }
              else {
                  var diagnosticChain = messageText;
                  var result = "";
                  var indent = 0;
                  while (diagnosticChain) {
                      if (indent) {
                          result += newLine;
                          for (var i = 0; i < indent; i++) {
                              result += "  ";
                          }
                      }
                      result += diagnosticChain.messageText;
                      indent++;
                      diagnosticChain = diagnosticChain.next;
                  }
                  return result;
              }
          }
          ts.flattenDiagnosticMessageText = flattenDiagnosticMessageText;
          function createProgram(rootNames, options, host) {
              var program;
              var files = [];
              var filesByName = {};
              var diagnostics = ts.createDiagnosticCollection();
              var seenNoDefaultLib = options.noLib;
              var commonSourceDirectory;
              var diagnosticsProducingTypeChecker;
              var noDiagnosticsTypeChecker;
              var start = new Date().getTime();
              host = host || createCompilerHost(options);
              ts.forEach(rootNames, function (name) { return processRootFile(name, false); });
              if (!seenNoDefaultLib) {
                  processRootFile(host.getDefaultLibFileName(options), true);
              }
              verifyCompilerOptions();
              ts.programTime += new Date().getTime() - start;
              program = {
                  getSourceFile: getSourceFile,
                  getSourceFiles: function () { return files; },
                  getCompilerOptions: function () { return options; },
                  getSyntacticDiagnostics: getSyntacticDiagnostics,
                  getGlobalDiagnostics: getGlobalDiagnostics,
                  getSemanticDiagnostics: getSemanticDiagnostics,
                  getDeclarationDiagnostics: getDeclarationDiagnostics,
                  getTypeChecker: getTypeChecker,
                  getDiagnosticsProducingTypeChecker: getDiagnosticsProducingTypeChecker,
                  getCommonSourceDirectory: function () { return commonSourceDirectory; },
                  emit: emit,
                  getCurrentDirectory: function () { return host.getCurrentDirectory(); },
                  getNodeCount: function () { return getDiagnosticsProducingTypeChecker().getNodeCount(); },
                  getIdentifierCount: function () { return getDiagnosticsProducingTypeChecker().getIdentifierCount(); },
                  getSymbolCount: function () { return getDiagnosticsProducingTypeChecker().getSymbolCount(); },
                  getTypeCount: function () { return getDiagnosticsProducingTypeChecker().getTypeCount(); }
              };
              return program;
              function getEmitHost(writeFileCallback) {
                  return {
                      getCanonicalFileName: function (fileName) { return host.getCanonicalFileName(fileName); },
                      getCommonSourceDirectory: program.getCommonSourceDirectory,
                      getCompilerOptions: program.getCompilerOptions,
                      getCurrentDirectory: function () { return host.getCurrentDirectory(); },
                      getNewLine: function () { return host.getNewLine(); },
                      getSourceFile: program.getSourceFile,
                      getSourceFiles: program.getSourceFiles,
                      writeFile: writeFileCallback || (function (fileName, data, writeByteOrderMark, onError) { return host.writeFile(fileName, data, writeByteOrderMark, onError); })
                  };
              }
              function getDiagnosticsProducingTypeChecker() {
                  return diagnosticsProducingTypeChecker || (diagnosticsProducingTypeChecker = ts.createTypeChecker(program, true));
              }
              function getTypeChecker() {
                  return noDiagnosticsTypeChecker || (noDiagnosticsTypeChecker = ts.createTypeChecker(program, false));
              }
              function emit(sourceFile, writeFileCallback) {
                  if (options.noEmitOnError && getPreEmitDiagnostics(this).length > 0) {
                      return { diagnostics: [], sourceMaps: undefined, emitSkipped: true };
                  }
                  var emitResolver = getDiagnosticsProducingTypeChecker().getEmitResolver(options.out ? undefined : sourceFile);
                  var start = new Date().getTime();
                  var emitResult = ts.emitFiles(emitResolver, getEmitHost(writeFileCallback), sourceFile);
                  ts.emitTime += new Date().getTime() - start;
                  return emitResult;
              }
              function getSourceFile(fileName) {
                  fileName = host.getCanonicalFileName(ts.normalizeSlashes(fileName));
                  return ts.hasProperty(filesByName, fileName) ? filesByName[fileName] : undefined;
              }
              function getDiagnosticsHelper(sourceFile, getDiagnostics) {
                  if (sourceFile) {
                      return getDiagnostics(sourceFile);
                  }
                  var allDiagnostics = [];
                  ts.forEach(program.getSourceFiles(), function (sourceFile) {
                      ts.addRange(allDiagnostics, getDiagnostics(sourceFile));
                  });
                  return ts.sortAndDeduplicateDiagnostics(allDiagnostics);
              }
              function getSyntacticDiagnostics(sourceFile) {
                  return getDiagnosticsHelper(sourceFile, getSyntacticDiagnosticsForFile);
              }
              function getSemanticDiagnostics(sourceFile) {
                  return getDiagnosticsHelper(sourceFile, getSemanticDiagnosticsForFile);
              }
              function getDeclarationDiagnostics(sourceFile) {
                  return getDiagnosticsHelper(sourceFile, getDeclarationDiagnosticsForFile);
              }
              function getSyntacticDiagnosticsForFile(sourceFile) {
                  return sourceFile.parseDiagnostics;
              }
              function getSemanticDiagnosticsForFile(sourceFile) {
                  var typeChecker = getDiagnosticsProducingTypeChecker();
                  ts.Debug.assert(!!sourceFile.bindDiagnostics);
                  var bindDiagnostics = sourceFile.bindDiagnostics;
                  var checkDiagnostics = typeChecker.getDiagnostics(sourceFile);
                  var programDiagnostics = diagnostics.getDiagnostics(sourceFile.fileName);
                  return bindDiagnostics.concat(checkDiagnostics).concat(programDiagnostics);
              }
              function getDeclarationDiagnosticsForFile(sourceFile) {
                  if (!ts.isDeclarationFile(sourceFile)) {
                      var resolver = getDiagnosticsProducingTypeChecker().getEmitResolver(sourceFile);
                      var writeFile = function () { };
                      return ts.getDeclarationDiagnostics(getEmitHost(writeFile), resolver, sourceFile);
                  }
              }
              function getGlobalDiagnostics() {
                  var typeChecker = getDiagnosticsProducingTypeChecker();
                  var allDiagnostics = [];
                  ts.addRange(allDiagnostics, typeChecker.getGlobalDiagnostics());
                  ts.addRange(allDiagnostics, diagnostics.getGlobalDiagnostics());
                  return ts.sortAndDeduplicateDiagnostics(allDiagnostics);
              }
              function hasExtension(fileName) {
                  return ts.getBaseFileName(fileName).indexOf(".") >= 0;
              }
              function processRootFile(fileName, isDefaultLib) {
                  processSourceFile(ts.normalizePath(fileName), isDefaultLib);
              }
              function processSourceFile(fileName, isDefaultLib, refFile, refPos, refEnd) {
                  var start;
                  var length;
                  var extensions;
                  var diagnosticArgument;
                  if (refEnd !== undefined && refPos !== undefined) {
                      start = refPos;
                      length = refEnd - refPos;
                  }
                  var diagnostic;
                  if (hasExtension(fileName)) {
                      if (!options.allowNonTsExtensions && !ts.forEach(ts.supportedExtensions, function (extension) { return ts.fileExtensionIs(host.getCanonicalFileName(fileName), extension); })) {
                          diagnostic = ts.Diagnostics.File_0_has_unsupported_extension_The_only_supported_extensions_are_1;
                          diagnosticArgument = [fileName, "'" + ts.supportedExtensions.join("', '") + "'"];
                      }
                      else if (!findSourceFile(fileName, isDefaultLib, refFile, refPos, refEnd)) {
                          diagnostic = ts.Diagnostics.File_0_not_found;
                          diagnosticArgument = [fileName];
                      }
                      else if (refFile && host.getCanonicalFileName(fileName) === host.getCanonicalFileName(refFile.fileName)) {
                          diagnostic = ts.Diagnostics.A_file_cannot_have_a_reference_to_itself;
                          diagnosticArgument = [fileName];
                      }
                  }
                  else {
                      if (options.allowNonTsExtensions && !findSourceFile(fileName, isDefaultLib, refFile, refPos, refEnd)) {
                          diagnostic = ts.Diagnostics.File_0_not_found;
                          diagnosticArgument = [fileName];
                      }
                      else if (!ts.forEach(ts.supportedExtensions, function (extension) { return findSourceFile(fileName + extension, isDefaultLib, refFile, refPos, refEnd); })) {
                          diagnostic = ts.Diagnostics.File_0_not_found;
                          fileName += ".ts";
                          diagnosticArgument = [fileName];
                      }
                  }
                  if (diagnostic) {
                      if (refFile) {
                          diagnostics.add(ts.createFileDiagnostic.apply(void 0, [refFile, start, length, diagnostic].concat(diagnosticArgument)));
                      }
                      else {
                          diagnostics.add(ts.createCompilerDiagnostic.apply(void 0, [diagnostic].concat(diagnosticArgument)));
                      }
                  }
              }
              function findSourceFile(fileName, isDefaultLib, refFile, refStart, refLength) {
                  var canonicalName = host.getCanonicalFileName(ts.normalizeSlashes(fileName));
                  if (ts.hasProperty(filesByName, canonicalName)) {
                      return getSourceFileFromCache(fileName, canonicalName, false);
                  }
                  else {
                      var normalizedAbsolutePath = ts.getNormalizedAbsolutePath(fileName, host.getCurrentDirectory());
                      var canonicalAbsolutePath = host.getCanonicalFileName(normalizedAbsolutePath);
                      if (ts.hasProperty(filesByName, canonicalAbsolutePath)) {
                          return getSourceFileFromCache(normalizedAbsolutePath, canonicalAbsolutePath, true);
                      }
                      var file = filesByName[canonicalName] = host.getSourceFile(fileName, options.target, function (hostErrorMessage) {
                          if (refFile) {
                              diagnostics.add(ts.createFileDiagnostic(refFile, refStart, refLength, ts.Diagnostics.Cannot_read_file_0_Colon_1, fileName, hostErrorMessage));
                          }
                          else {
                              diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Cannot_read_file_0_Colon_1, fileName, hostErrorMessage));
                          }
                      });
                      if (file) {
                          seenNoDefaultLib = seenNoDefaultLib || file.hasNoDefaultLib;
                          filesByName[canonicalAbsolutePath] = file;
                          if (!options.noResolve) {
                              var basePath = ts.getDirectoryPath(fileName);
                              processReferencedFiles(file, basePath);
                              processImportedModules(file, basePath);
                          }
                          if (isDefaultLib) {
                              files.unshift(file);
                          }
                          else {
                              files.push(file);
                          }
                      }
                      return file;
                  }
                  function getSourceFileFromCache(fileName, canonicalName, useAbsolutePath) {
                      var file = filesByName[canonicalName];
                      if (file && host.useCaseSensitiveFileNames()) {
                          var sourceFileName = useAbsolutePath ? ts.getNormalizedAbsolutePath(file.fileName, host.getCurrentDirectory()) : file.fileName;
                          if (canonicalName !== sourceFileName) {
                              diagnostics.add(ts.createFileDiagnostic(refFile, refStart, refLength, ts.Diagnostics.File_name_0_differs_from_already_included_file_name_1_only_in_casing, fileName, sourceFileName));
                          }
                      }
                      return file;
                  }
              }
              function processReferencedFiles(file, basePath) {
                  ts.forEach(file.referencedFiles, function (ref) {
                      var referencedFileName = ts.isRootedDiskPath(ref.fileName) ? ref.fileName : ts.combinePaths(basePath, ref.fileName);
                      processSourceFile(ts.normalizePath(referencedFileName), false, file, ref.pos, ref.end);
                  });
              }
              function processImportedModules(file, basePath) {
                  ts.forEach(file.statements, function (node) {
                      if (node.kind === 210 || node.kind === 209 || node.kind === 216) {
                          var moduleNameExpr = ts.getExternalModuleName(node);
                          if (moduleNameExpr && moduleNameExpr.kind === 8) {
                              var moduleNameText = moduleNameExpr.text;
                              if (moduleNameText) {
                                  var searchPath = basePath;
                                  var searchName;
                                  while (true) {
                                      searchName = ts.normalizePath(ts.combinePaths(searchPath, moduleNameText));
                                      if (ts.forEach(ts.supportedExtensions, function (extension) { return findModuleSourceFile(searchName + extension, moduleNameExpr); })) {
                                          break;
                                      }
                                      var parentPath = ts.getDirectoryPath(searchPath);
                                      if (parentPath === searchPath) {
                                          break;
                                      }
                                      searchPath = parentPath;
                                  }
                              }
                          }
                      }
                      else if (node.kind === 206 && node.name.kind === 8 && (node.flags & 2 || ts.isDeclarationFile(file))) {
                          ts.forEachChild(node.body, function (node) {
                              if (ts.isExternalModuleImportEqualsDeclaration(node) &&
                                  ts.getExternalModuleImportEqualsDeclarationExpression(node).kind === 8) {
                                  var nameLiteral = ts.getExternalModuleImportEqualsDeclarationExpression(node);
                                  var moduleName = nameLiteral.text;
                                  if (moduleName) {
                                      var searchName = ts.normalizePath(ts.combinePaths(basePath, moduleName));
                                      ts.forEach(ts.supportedExtensions, function (extension) { return findModuleSourceFile(searchName + extension, nameLiteral); });
                                  }
                              }
                          });
                      }
                  });
                  function findModuleSourceFile(fileName, nameLiteral) {
                      return findSourceFile(fileName, false, file, nameLiteral.pos, nameLiteral.end - nameLiteral.pos);
                  }
              }
              function computeCommonSourceDirectory(sourceFiles) {
                  var commonPathComponents;
                  var currentDirectory = host.getCurrentDirectory();
                  ts.forEach(files, function (sourceFile) {
                      if (ts.isDeclarationFile(sourceFile)) {
                          return;
                      }
                      var sourcePathComponents = ts.getNormalizedPathComponents(sourceFile.fileName, currentDirectory);
                      sourcePathComponents.pop();
                      if (!commonPathComponents) {
                          commonPathComponents = sourcePathComponents;
                          return;
                      }
                      for (var i = 0, n = Math.min(commonPathComponents.length, sourcePathComponents.length); i < n; i++) {
                          if (commonPathComponents[i] !== sourcePathComponents[i]) {
                              if (i === 0) {
                                  diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Cannot_find_the_common_subdirectory_path_for_the_input_files));
                                  return;
                              }
                              commonPathComponents.length = i;
                              break;
                          }
                      }
                      if (sourcePathComponents.length < commonPathComponents.length) {
                          commonPathComponents.length = sourcePathComponents.length;
                      }
                  });
                  return ts.getNormalizedPathFromPathComponents(commonPathComponents);
              }
              function checkSourceFilesBelongToPath(sourceFiles, rootDirectory) {
                  var allFilesBelongToPath = true;
                  if (sourceFiles) {
                      var currentDirectory = host.getCurrentDirectory();
                      var absoluteRootDirectoryPath = host.getCanonicalFileName(ts.getNormalizedAbsolutePath(rootDirectory, currentDirectory));
                      for (var _i = 0; _i < sourceFiles.length; _i++) {
                          var sourceFile = sourceFiles[_i];
                          if (!ts.isDeclarationFile(sourceFile)) {
                              var absoluteSourceFilePath = host.getCanonicalFileName(ts.getNormalizedAbsolutePath(sourceFile.fileName, currentDirectory));
                              if (absoluteSourceFilePath.indexOf(absoluteRootDirectoryPath) !== 0) {
                                  diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files, sourceFile.fileName, options.rootDir));
                                  allFilesBelongToPath = false;
                              }
                          }
                      }
                  }
                  return allFilesBelongToPath;
              }
              function verifyCompilerOptions() {
                  if (options.separateCompilation) {
                      if (options.sourceMap) {
                          diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_sourceMap_cannot_be_specified_with_option_separateCompilation));
                      }
                      if (options.declaration) {
                          diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_declaration_cannot_be_specified_with_option_separateCompilation));
                      }
                      if (options.noEmitOnError) {
                          diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_noEmitOnError_cannot_be_specified_with_option_separateCompilation));
                      }
                      if (options.out) {
                          diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_out_cannot_be_specified_with_option_separateCompilation));
                      }
                  }
                  if (options.inlineSourceMap) {
                      if (options.sourceMap) {
                          diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_sourceMap_cannot_be_specified_with_option_inlineSourceMap));
                      }
                      if (options.mapRoot) {
                          diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_mapRoot_cannot_be_specified_with_option_inlineSourceMap));
                      }
                      if (options.sourceRoot) {
                          diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_sourceRoot_cannot_be_specified_with_option_inlineSourceMap));
                      }
                  }
                  if (options.inlineSources) {
                      if (!options.sourceMap && !options.inlineSourceMap) {
                          diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_inlineSources_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided));
                      }
                  }
                  if (!options.sourceMap && (options.mapRoot || options.sourceRoot)) {
                      if (options.mapRoot) {
                          diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_mapRoot_cannot_be_specified_without_specifying_sourceMap_option));
                      }
                      if (options.sourceRoot) {
                          diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_sourceRoot_cannot_be_specified_without_specifying_sourceMap_option));
                      }
                      return;
                  }
                  var languageVersion = options.target || 0;
                  var firstExternalModuleSourceFile = ts.forEach(files, function (f) { return ts.isExternalModule(f) ? f : undefined; });
                  if (options.separateCompilation) {
                      if (!options.module && languageVersion < 2) {
                          diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_separateCompilation_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES6_or_higher));
                      }
                      var firstNonExternalModuleSourceFile = ts.forEach(files, function (f) { return !ts.isExternalModule(f) && !ts.isDeclarationFile(f) ? f : undefined; });
                      if (firstNonExternalModuleSourceFile) {
                          var span = ts.getErrorSpanForNode(firstNonExternalModuleSourceFile, firstNonExternalModuleSourceFile);
                          diagnostics.add(ts.createFileDiagnostic(firstNonExternalModuleSourceFile, span.start, span.length, ts.Diagnostics.Cannot_compile_namespaces_when_the_separateCompilation_flag_is_provided));
                      }
                  }
                  else if (firstExternalModuleSourceFile && languageVersion < 2 && !options.module) {
                      var span = ts.getErrorSpanForNode(firstExternalModuleSourceFile, firstExternalModuleSourceFile.externalModuleIndicator);
                      diagnostics.add(ts.createFileDiagnostic(firstExternalModuleSourceFile, span.start, span.length, ts.Diagnostics.Cannot_compile_modules_unless_the_module_flag_is_provided));
                  }
                  if (options.module && languageVersion >= 2) {
                      diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Cannot_compile_modules_into_commonjs_amd_system_or_umd_when_targeting_ES6_or_higher));
                  }
                  if (options.outDir ||
                      options.sourceRoot ||
                      (options.mapRoot &&
                          (!options.out || firstExternalModuleSourceFile !== undefined))) {
                      if (options.rootDir && checkSourceFilesBelongToPath(files, options.rootDir)) {
                          commonSourceDirectory = ts.getNormalizedAbsolutePath(options.rootDir, host.getCurrentDirectory());
                      }
                      else {
                          commonSourceDirectory = computeCommonSourceDirectory(files);
                      }
                      if (commonSourceDirectory && commonSourceDirectory[commonSourceDirectory.length - 1] !== ts.directorySeparator) {
                          commonSourceDirectory += ts.directorySeparator;
                      }
                  }
                  if (options.noEmit) {
                      if (options.out || options.outDir) {
                          diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_noEmit_cannot_be_specified_with_option_out_or_outDir));
                      }
                      if (options.declaration) {
                          diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_noEmit_cannot_be_specified_with_option_declaration));
                      }
                  }
              }
          }
          ts.createProgram = createProgram;
      })(ts || (ts = {}));
      /// <reference path="sys.ts"/>
      /// <reference path="types.ts"/>
      /// <reference path="core.ts"/>
      /// <reference path="scanner.ts"/>
      var ts;
      (function (ts) {
          ts.optionDeclarations = [
              {
                  name: "charset",
                  type: "string"
              },
              {
                  name: "declaration",
                  shortName: "d",
                  type: "boolean",
                  description: ts.Diagnostics.Generates_corresponding_d_ts_file
              },
              {
                  name: "diagnostics",
                  type: "boolean"
              },
              {
                  name: "emitBOM",
                  type: "boolean"
              },
              {
                  name: "help",
                  shortName: "h",
                  type: "boolean",
                  description: ts.Diagnostics.Print_this_message
              },
              {
                  name: "inlineSourceMap",
                  type: "boolean"
              },
              {
                  name: "inlineSources",
                  type: "boolean"
              },
              {
                  name: "listFiles",
                  type: "boolean"
              },
              {
                  name: "locale",
                  type: "string"
              },
              {
                  name: "mapRoot",
                  type: "string",
                  isFilePath: true,
                  description: ts.Diagnostics.Specifies_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations,
                  paramType: ts.Diagnostics.LOCATION
              },
              {
                  name: "module",
                  shortName: "m",
                  type: {
                      "commonjs": 1,
                      "amd": 2,
                      "system": 4,
                      "umd": 3
                  },
                  description: ts.Diagnostics.Specify_module_code_generation_Colon_commonjs_amd_system_or_umd,
                  paramType: ts.Diagnostics.KIND,
                  error: ts.Diagnostics.Argument_for_module_option_must_be_commonjs_amd_system_or_umd
              },
              {
                  name: "newLine",
                  type: {
                      "crlf": 0,
                      "lf": 1
                  },
                  description: ts.Diagnostics.Specifies_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix,
                  paramType: ts.Diagnostics.NEWLINE,
                  error: ts.Diagnostics.Argument_for_newLine_option_must_be_CRLF_or_LF
              },
              {
                  name: "noEmit",
                  type: "boolean",
                  description: ts.Diagnostics.Do_not_emit_outputs
              },
              {
                  name: "noEmitHelpers",
                  type: "boolean"
              },
              {
                  name: "noEmitOnError",
                  type: "boolean",
                  description: ts.Diagnostics.Do_not_emit_outputs_if_any_errors_were_reported
              },
              {
                  name: "noImplicitAny",
                  type: "boolean",
                  description: ts.Diagnostics.Raise_error_on_expressions_and_declarations_with_an_implied_any_type
              },
              {
                  name: "noLib",
                  type: "boolean"
              },
              {
                  name: "noResolve",
                  type: "boolean"
              },
              {
                  name: "out",
                  type: "string",
                  description: ts.Diagnostics.Concatenate_and_emit_output_to_single_file,
                  paramType: ts.Diagnostics.FILE
              },
              {
                  name: "outDir",
                  type: "string",
                  isFilePath: true,
                  description: ts.Diagnostics.Redirect_output_structure_to_the_directory,
                  paramType: ts.Diagnostics.DIRECTORY
              },
              {
                  name: "preserveConstEnums",
                  type: "boolean",
                  description: ts.Diagnostics.Do_not_erase_const_enum_declarations_in_generated_code
              },
              {
                  name: "project",
                  shortName: "p",
                  type: "string",
                  isFilePath: true,
                  description: ts.Diagnostics.Compile_the_project_in_the_given_directory,
                  paramType: ts.Diagnostics.DIRECTORY
              },
              {
                  name: "removeComments",
                  type: "boolean",
                  description: ts.Diagnostics.Do_not_emit_comments_to_output
              },
              {
                  name: "rootDir",
                  type: "string",
                  isFilePath: true,
                  description: ts.Diagnostics.Specifies_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir,
                  paramType: ts.Diagnostics.LOCATION
              },
              {
                  name: "separateCompilation",
                  type: "boolean"
              },
              {
                  name: "sourceMap",
                  type: "boolean",
                  description: ts.Diagnostics.Generates_corresponding_map_file
              },
              {
                  name: "sourceRoot",
                  type: "string",
                  isFilePath: true,
                  description: ts.Diagnostics.Specifies_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations,
                  paramType: ts.Diagnostics.LOCATION
              },
              {
                  name: "suppressImplicitAnyIndexErrors",
                  type: "boolean",
                  description: ts.Diagnostics.Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures
              },
              {
                  name: "stripInternal",
                  type: "boolean",
                  description: ts.Diagnostics.Do_not_emit_declarations_for_code_that_has_an_internal_annotation,
                  experimental: true
              },
              {
                  name: "target",
                  shortName: "t",
                  type: { "es3": 0, "es5": 1, "es6": 2 },
                  description: ts.Diagnostics.Specify_ECMAScript_target_version_Colon_ES3_default_ES5_or_ES6_experimental,
                  paramType: ts.Diagnostics.VERSION,
                  error: ts.Diagnostics.Argument_for_target_option_must_be_ES3_ES5_or_ES6
              },
              {
                  name: "version",
                  shortName: "v",
                  type: "boolean",
                  description: ts.Diagnostics.Print_the_compiler_s_version
              },
              {
                  name: "watch",
                  shortName: "w",
                  type: "boolean",
                  description: ts.Diagnostics.Watch_input_files
              },
              {
                  name: "emitDecoratorMetadata",
                  type: "boolean",
                  experimental: true
              }
          ];
          function parseCommandLine(commandLine) {
              var options = {};
              var fileNames = [];
              var errors = [];
              var shortOptionNames = {};
              var optionNameMap = {};
              ts.forEach(ts.optionDeclarations, function (option) {
                  optionNameMap[option.name.toLowerCase()] = option;
                  if (option.shortName) {
                      shortOptionNames[option.shortName] = option.name;
                  }
              });
              parseStrings(commandLine);
              return {
                  options: options,
                  fileNames: fileNames,
                  errors: errors
              };
              function parseStrings(args) {
                  var i = 0;
                  while (i < args.length) {
                      var s = args[i++];
                      if (s.charCodeAt(0) === 64) {
                          parseResponseFile(s.slice(1));
                      }
                      else if (s.charCodeAt(0) === 45) {
                          s = s.slice(s.charCodeAt(1) === 45 ? 2 : 1).toLowerCase();
                          if (ts.hasProperty(shortOptionNames, s)) {
                              s = shortOptionNames[s];
                          }
                          if (ts.hasProperty(optionNameMap, s)) {
                              var opt = optionNameMap[s];
                              if (!args[i] && opt.type !== "boolean") {
                                  errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Compiler_option_0_expects_an_argument, opt.name));
                              }
                              switch (opt.type) {
                                  case "number":
                                      options[opt.name] = parseInt(args[i++]);
                                      break;
                                  case "boolean":
                                      options[opt.name] = true;
                                      break;
                                  case "string":
                                      options[opt.name] = args[i++] || "";
                                      break;
                                  default:
                                      var map = opt.type;
                                      var key = (args[i++] || "").toLowerCase();
                                      if (ts.hasProperty(map, key)) {
                                          options[opt.name] = map[key];
                                      }
                                      else {
                                          errors.push(ts.createCompilerDiagnostic(opt.error));
                                      }
                              }
                          }
                          else {
                              errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Unknown_compiler_option_0, s));
                          }
                      }
                      else {
                          fileNames.push(s);
                      }
                  }
              }
              function parseResponseFile(fileName) {
                  var text = ts.sys.readFile(fileName);
                  if (!text) {
                      errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.File_0_not_found, fileName));
                      return;
                  }
                  var args = [];
                  var pos = 0;
                  while (true) {
                      while (pos < text.length && text.charCodeAt(pos) <= 32)
                          pos++;
                      if (pos >= text.length)
                          break;
                      var start = pos;
                      if (text.charCodeAt(start) === 34) {
                          pos++;
                          while (pos < text.length && text.charCodeAt(pos) !== 34)
                              pos++;
                          if (pos < text.length) {
                              args.push(text.substring(start + 1, pos));
                              pos++;
                          }
                          else {
                              errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Unterminated_quoted_string_in_response_file_0, fileName));
                          }
                      }
                      else {
                          while (text.charCodeAt(pos) > 32)
                              pos++;
                          args.push(text.substring(start, pos));
                      }
                  }
                  parseStrings(args);
              }
          }
          ts.parseCommandLine = parseCommandLine;
          function readConfigFile(fileName) {
              try {
                  var text = ts.sys.readFile(fileName);
              }
              catch (e) {
                  return { error: ts.createCompilerDiagnostic(ts.Diagnostics.Cannot_read_file_0_Colon_1, fileName, e.message) };
              }
              return parseConfigFileText(fileName, text);
          }
          ts.readConfigFile = readConfigFile;
          function parseConfigFileText(fileName, jsonText) {
              try {
                  return { config: /\S/.test(jsonText) ? JSON.parse(jsonText) : {} };
              }
              catch (e) {
                  return { error: ts.createCompilerDiagnostic(ts.Diagnostics.Failed_to_parse_file_0_Colon_1, fileName, e.message) };
              }
          }
          ts.parseConfigFileText = parseConfigFileText;
          function parseConfigFile(json, host, basePath) {
              var errors = [];
              return {
                  options: getCompilerOptions(),
                  fileNames: getFiles(),
                  errors: errors
              };
              function getCompilerOptions() {
                  var options = {};
                  var optionNameMap = {};
                  ts.forEach(ts.optionDeclarations, function (option) {
                      optionNameMap[option.name] = option;
                  });
                  var jsonOptions = json["compilerOptions"];
                  if (jsonOptions) {
                      for (var id in jsonOptions) {
                          if (ts.hasProperty(optionNameMap, id)) {
                              var opt = optionNameMap[id];
                              var optType = opt.type;
                              var value = jsonOptions[id];
                              var expectedType = typeof optType === "string" ? optType : "string";
                              if (typeof value === expectedType) {
                                  if (typeof optType !== "string") {
                                      var key = value.toLowerCase();
                                      if (ts.hasProperty(optType, key)) {
                                          value = optType[key];
                                      }
                                      else {
                                          errors.push(ts.createCompilerDiagnostic(opt.error));
                                          value = 0;
                                      }
                                  }
                                  if (opt.isFilePath) {
                                      value = ts.normalizePath(ts.combinePaths(basePath, value));
                                  }
                                  options[opt.name] = value;
                              }
                              else {
                                  errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Compiler_option_0_requires_a_value_of_type_1, id, expectedType));
                              }
                          }
                          else {
                              errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Unknown_compiler_option_0, id));
                          }
                      }
                  }
                  return options;
              }
              function getFiles() {
                  var files = [];
                  if (ts.hasProperty(json, "files")) {
                      if (json["files"] instanceof Array) {
                          var files = ts.map(json["files"], function (s) { return ts.combinePaths(basePath, s); });
                      }
                  }
                  else {
                      var sysFiles = host.readDirectory(basePath, ".ts");
                      for (var i = 0; i < sysFiles.length; i++) {
                          var name = sysFiles[i];
                          if (!ts.fileExtensionIs(name, ".d.ts") || !ts.contains(sysFiles, name.substr(0, name.length - 5) + ".ts")) {
                              files.push(name);
                          }
                      }
                  }
                  return files;
              }
          }
          ts.parseConfigFile = parseConfigFile;
      })(ts || (ts = {}));
      /// <reference path="program.ts"/>
      /// <reference path="commandLineParser.ts"/>
      var ts;
      (function (ts) {
          function validateLocaleAndSetLanguage(locale, errors) {
              var matchResult = /^([a-z]+)([_\-]([a-z]+))?$/.exec(locale.toLowerCase());
              if (!matchResult) {
                  errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1, 'en', 'ja-jp'));
                  return false;
              }
              var language = matchResult[1];
              var territory = matchResult[3];
              if (!trySetLanguageAndTerritory(language, territory, errors) &&
                  !trySetLanguageAndTerritory(language, undefined, errors)) {
                  errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Unsupported_locale_0, locale));
                  return false;
              }
              return true;
          }
          function trySetLanguageAndTerritory(language, territory, errors) {
              var compilerFilePath = ts.normalizePath(ts.sys.getExecutingFilePath());
              var containingDirectoryPath = ts.getDirectoryPath(compilerFilePath);
              var filePath = ts.combinePaths(containingDirectoryPath, language);
              if (territory) {
                  filePath = filePath + "-" + territory;
              }
              filePath = ts.sys.resolvePath(ts.combinePaths(filePath, "diagnosticMessages.generated.json"));
              if (!ts.sys.fileExists(filePath)) {
                  return false;
              }
              try {
                  var fileContents = ts.sys.readFile(filePath);
              }
              catch (e) {
                  errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Unable_to_open_file_0, filePath));
                  return false;
              }
              try {
                  ts.localizedDiagnosticMessages = JSON.parse(fileContents);
              }
              catch (e) {
                  errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Corrupted_locale_file_0, filePath));
                  return false;
              }
              return true;
          }
          function countLines(program) {
              var count = 0;
              ts.forEach(program.getSourceFiles(), function (file) {
                  count += ts.getLineStarts(file).length;
              });
              return count;
          }
          function getDiagnosticText(message) {
              var args = [];
              for (var _i = 1; _i < arguments.length; _i++) {
                  args[_i - 1] = arguments[_i];
              }
              var diagnostic = ts.createCompilerDiagnostic.apply(undefined, arguments);
              return diagnostic.messageText;
          }
          function reportDiagnostic(diagnostic) {
              var output = "";
              if (diagnostic.file) {
                  var loc = ts.getLineAndCharacterOfPosition(diagnostic.file, diagnostic.start);
                  output += diagnostic.file.fileName + "(" + (loc.line + 1) + "," + (loc.character + 1) + "): ";
              }
              var category = ts.DiagnosticCategory[diagnostic.category].toLowerCase();
              output += category + " TS" + diagnostic.code + ": " + ts.flattenDiagnosticMessageText(diagnostic.messageText, ts.sys.newLine) + ts.sys.newLine;
              ts.sys.write(output);
          }
          function reportDiagnostics(diagnostics) {
              for (var i = 0; i < diagnostics.length; i++) {
                  reportDiagnostic(diagnostics[i]);
              }
          }
          function padLeft(s, length) {
              while (s.length < length) {
                  s = " " + s;
              }
              return s;
          }
          function padRight(s, length) {
              while (s.length < length) {
                  s = s + " ";
              }
              return s;
          }
          function reportStatisticalValue(name, value) {
              ts.sys.write(padRight(name + ":", 12) + padLeft(value.toString(), 10) + ts.sys.newLine);
          }
          function reportCountStatistic(name, count) {
              reportStatisticalValue(name, "" + count);
          }
          function reportTimeStatistic(name, time) {
              reportStatisticalValue(name, (time / 1000).toFixed(2) + "s");
          }
          function isJSONSupported() {
              return typeof JSON === "object" && typeof JSON.parse === "function";
          }
          function executeCommandLine(args) {
              var commandLine = ts.parseCommandLine(args);
              var configFileName;
              var configFileWatcher;
              var cachedProgram;
              var rootFileNames;
              var compilerOptions;
              var compilerHost;
              var hostGetSourceFile;
              var timerHandle;
              if (commandLine.options.locale) {
                  if (!isJSONSupported()) {
                      reportDiagnostic(ts.createCompilerDiagnostic(ts.Diagnostics.The_current_host_does_not_support_the_0_option, "--locale"));
                      return ts.sys.exit(ts.ExitStatus.DiagnosticsPresent_OutputsSkipped);
                  }
                  validateLocaleAndSetLanguage(commandLine.options.locale, commandLine.errors);
              }
              if (commandLine.errors.length > 0) {
                  reportDiagnostics(commandLine.errors);
                  return ts.sys.exit(ts.ExitStatus.DiagnosticsPresent_OutputsSkipped);
              }
              if (commandLine.options.version) {
                  reportDiagnostic(ts.createCompilerDiagnostic(ts.Diagnostics.Version_0, ts.version));
                  return ts.sys.exit(ts.ExitStatus.Success);
              }
              if (commandLine.options.help) {
                  printVersion();
                  printHelp();
                  return ts.sys.exit(ts.ExitStatus.Success);
              }
              if (commandLine.options.project) {
                  if (!isJSONSupported()) {
                      reportDiagnostic(ts.createCompilerDiagnostic(ts.Diagnostics.The_current_host_does_not_support_the_0_option, "--project"));
                      return ts.sys.exit(ts.ExitStatus.DiagnosticsPresent_OutputsSkipped);
                  }
                  configFileName = ts.normalizePath(ts.combinePaths(commandLine.options.project, "tsconfig.json"));
                  if (commandLine.fileNames.length !== 0) {
                      reportDiagnostic(ts.createCompilerDiagnostic(ts.Diagnostics.Option_project_cannot_be_mixed_with_source_files_on_a_command_line));
                      return ts.sys.exit(ts.ExitStatus.DiagnosticsPresent_OutputsSkipped);
                  }
              }
              else if (commandLine.fileNames.length === 0 && isJSONSupported()) {
                  var searchPath = ts.normalizePath(ts.sys.getCurrentDirectory());
                  configFileName = ts.findConfigFile(searchPath);
              }
              if (commandLine.fileNames.length === 0 && !configFileName) {
                  printVersion();
                  printHelp();
                  return ts.sys.exit(ts.ExitStatus.Success);
              }
              if (commandLine.options.watch) {
                  if (!ts.sys.watchFile) {
                      reportDiagnostic(ts.createCompilerDiagnostic(ts.Diagnostics.The_current_host_does_not_support_the_0_option, "--watch"));
                      return ts.sys.exit(ts.ExitStatus.DiagnosticsPresent_OutputsSkipped);
                  }
                  if (configFileName) {
                      configFileWatcher = ts.sys.watchFile(configFileName, configFileChanged);
                  }
              }
              performCompilation();
              function performCompilation() {
                  if (!cachedProgram) {
                      if (configFileName) {
                          var result = ts.readConfigFile(configFileName);
                          if (result.error) {
                              reportDiagnostic(result.error);
                              return ts.sys.exit(ts.ExitStatus.DiagnosticsPresent_OutputsSkipped);
                          }
                          var configObject = result.config;
                          var configParseResult = ts.parseConfigFile(configObject, ts.sys, ts.getDirectoryPath(configFileName));
                          if (configParseResult.errors.length > 0) {
                              reportDiagnostics(configParseResult.errors);
                              return ts.sys.exit(ts.ExitStatus.DiagnosticsPresent_OutputsSkipped);
                          }
                          rootFileNames = configParseResult.fileNames;
                          compilerOptions = ts.extend(commandLine.options, configParseResult.options);
                      }
                      else {
                          rootFileNames = commandLine.fileNames;
                          compilerOptions = commandLine.options;
                      }
                      compilerHost = ts.createCompilerHost(compilerOptions);
                      hostGetSourceFile = compilerHost.getSourceFile;
                      compilerHost.getSourceFile = getSourceFile;
                  }
                  var compileResult = compile(rootFileNames, compilerOptions, compilerHost);
                  if (!compilerOptions.watch) {
                      return ts.sys.exit(compileResult.exitStatus);
                  }
                  setCachedProgram(compileResult.program);
                  reportDiagnostic(ts.createCompilerDiagnostic(ts.Diagnostics.Compilation_complete_Watching_for_file_changes));
              }
              function getSourceFile(fileName, languageVersion, onError) {
                  if (cachedProgram) {
                      var sourceFile = cachedProgram.getSourceFile(fileName);
                      if (sourceFile && sourceFile.fileWatcher) {
                          return sourceFile;
                      }
                  }
                  var sourceFile = hostGetSourceFile(fileName, languageVersion, onError);
                  if (sourceFile && compilerOptions.watch) {
                      sourceFile.fileWatcher = ts.sys.watchFile(sourceFile.fileName, function () { return sourceFileChanged(sourceFile); });
                  }
                  return sourceFile;
              }
              function setCachedProgram(program) {
                  if (cachedProgram) {
                      var newSourceFiles = program ? program.getSourceFiles() : undefined;
                      ts.forEach(cachedProgram.getSourceFiles(), function (sourceFile) {
                          if (!(newSourceFiles && ts.contains(newSourceFiles, sourceFile))) {
                              if (sourceFile.fileWatcher) {
                                  sourceFile.fileWatcher.close();
                                  sourceFile.fileWatcher = undefined;
                              }
                          }
                      });
                  }
                  cachedProgram = program;
              }
              function sourceFileChanged(sourceFile) {
                  sourceFile.fileWatcher.close();
                  sourceFile.fileWatcher = undefined;
                  startTimer();
              }
              function configFileChanged() {
                  setCachedProgram(undefined);
                  startTimer();
              }
              function startTimer() {
                  if (timerHandle) {
                      clearTimeout(timerHandle);
                  }
                  timerHandle = setTimeout(recompile, 250);
              }
              function recompile() {
                  timerHandle = undefined;
                  reportDiagnostic(ts.createCompilerDiagnostic(ts.Diagnostics.File_change_detected_Starting_incremental_compilation));
                  performCompilation();
              }
          }
          ts.executeCommandLine = executeCommandLine;
          function compile(fileNames, compilerOptions, compilerHost) {
              ts.ioReadTime = 0;
              ts.ioWriteTime = 0;
              ts.programTime = 0;
              ts.bindTime = 0;
              ts.checkTime = 0;
              ts.emitTime = 0;
              var program = ts.createProgram(fileNames, compilerOptions, compilerHost);
              var exitStatus = compileProgram();
              if (compilerOptions.listFiles) {
                  ts.forEach(program.getSourceFiles(), function (file) {
                      ts.sys.write(file.fileName + ts.sys.newLine);
                  });
              }
              if (compilerOptions.diagnostics) {
                  var memoryUsed = ts.sys.getMemoryUsage ? ts.sys.getMemoryUsage() : -1;
                  reportCountStatistic("Files", program.getSourceFiles().length);
                  reportCountStatistic("Lines", countLines(program));
                  reportCountStatistic("Nodes", program.getNodeCount());
                  reportCountStatistic("Identifiers", program.getIdentifierCount());
                  reportCountStatistic("Symbols", program.getSymbolCount());
                  reportCountStatistic("Types", program.getTypeCount());
                  if (memoryUsed >= 0) {
                      reportStatisticalValue("Memory used", Math.round(memoryUsed / 1000) + "K");
                  }
                  reportTimeStatistic("I/O read", ts.ioReadTime);
                  reportTimeStatistic("I/O write", ts.ioWriteTime);
                  reportTimeStatistic("Parse time", ts.programTime);
                  reportTimeStatistic("Bind time", ts.bindTime);
                  reportTimeStatistic("Check time", ts.checkTime);
                  reportTimeStatistic("Emit time", ts.emitTime);
                  reportTimeStatistic("Total time", ts.programTime + ts.bindTime + ts.checkTime + ts.emitTime);
              }
              return { program: program, exitStatus: exitStatus };
              function compileProgram() {
                  var diagnostics = program.getSyntacticDiagnostics();
                  reportDiagnostics(diagnostics);
                  if (diagnostics.length === 0) {
                      var diagnostics = program.getGlobalDiagnostics();
                      reportDiagnostics(diagnostics);
                      if (diagnostics.length === 0) {
                          var diagnostics = program.getSemanticDiagnostics();
                          reportDiagnostics(diagnostics);
                      }
                  }
                  if (compilerOptions.noEmit) {
                      return diagnostics.length
                          ? ts.ExitStatus.DiagnosticsPresent_OutputsSkipped
                          : ts.ExitStatus.Success;
                  }
                  var emitOutput = program.emit();
                  reportDiagnostics(emitOutput.diagnostics);
                  if (emitOutput.emitSkipped) {
                      return ts.ExitStatus.DiagnosticsPresent_OutputsSkipped;
                  }
                  if (diagnostics.length > 0 || emitOutput.diagnostics.length > 0) {
                      return ts.ExitStatus.DiagnosticsPresent_OutputsGenerated;
                  }
                  return ts.ExitStatus.Success;
              }
          }
          function printVersion() {
              ts.sys.write(getDiagnosticText(ts.Diagnostics.Version_0, ts.version) + ts.sys.newLine);
          }
          function printHelp() {
              var output = "";
              var syntaxLength = getDiagnosticText(ts.Diagnostics.Syntax_Colon_0, "").length;
              var examplesLength = getDiagnosticText(ts.Diagnostics.Examples_Colon_0, "").length;
              var marginLength = Math.max(syntaxLength, examplesLength);
              var syntax = makePadding(marginLength - syntaxLength);
              syntax += "tsc [" + getDiagnosticText(ts.Diagnostics.options) + "] [" + getDiagnosticText(ts.Diagnostics.file) + " ...]";
              output += getDiagnosticText(ts.Diagnostics.Syntax_Colon_0, syntax);
              output += ts.sys.newLine + ts.sys.newLine;
              var padding = makePadding(marginLength);
              output += getDiagnosticText(ts.Diagnostics.Examples_Colon_0, makePadding(marginLength - examplesLength) + "tsc hello.ts") + ts.sys.newLine;
              output += padding + "tsc --out file.js file.ts" + ts.sys.newLine;
              output += padding + "tsc @args.txt" + ts.sys.newLine;
              output += ts.sys.newLine;
              output += getDiagnosticText(ts.Diagnostics.Options_Colon) + ts.sys.newLine;
              var optsList = ts.filter(ts.optionDeclarations.slice(), function (v) { return !v.experimental; });
              optsList.sort(function (a, b) { return ts.compareValues(a.name.toLowerCase(), b.name.toLowerCase()); });
              var marginLength = 0;
              var usageColumn = [];
              var descriptionColumn = [];
              for (var i = 0; i < optsList.length; i++) {
                  var option = optsList[i];
                  if (!option.description) {
                      continue;
                  }
                  var usageText = " ";
                  if (option.shortName) {
                      usageText += "-" + option.shortName;
                      usageText += getParamType(option);
                      usageText += ", ";
                  }
                  usageText += "--" + option.name;
                  usageText += getParamType(option);
                  usageColumn.push(usageText);
                  descriptionColumn.push(getDiagnosticText(option.description));
                  marginLength = Math.max(usageText.length, marginLength);
              }
              var usageText = " @<" + getDiagnosticText(ts.Diagnostics.file) + ">";
              usageColumn.push(usageText);
              descriptionColumn.push(getDiagnosticText(ts.Diagnostics.Insert_command_line_options_and_files_from_a_file));
              marginLength = Math.max(usageText.length, marginLength);
              for (var i = 0; i < usageColumn.length; i++) {
                  var usage = usageColumn[i];
                  var description = descriptionColumn[i];
                  output += usage + makePadding(marginLength - usage.length + 2) + description + ts.sys.newLine;
              }
              ts.sys.write(output);
              return;
              function getParamType(option) {
                  if (option.paramType !== undefined) {
                      return " " + getDiagnosticText(option.paramType);
                  }
                  return "";
              }
              function makePadding(paddingLength) {
                  return Array(paddingLength + 1).join(" ");
              }
          }
      })(ts || (ts = {}));
      ts.executeCommandLine(ts.sys.args);
      
  • typings
    • webSQL.d.ts
      declare function openDatabase(
        name: string,
        version: any,
        displayName: string,
        size: number,
        upgrade?: DatabaseCallback): Database;
      
      interface DatabaseCallback {
        (database: Database): void;
      }
      
      interface Database {
        transaction(
          callback: (transaction: SQLTransaction) => void,
          errorCallback?: (error: SQLError) => void,
          successCallback?: () => void);
      
        readTransaction(
          callback: (transaction: SQLTransaction) => void,
          errorCallback?: (error: SQLError) => void,
          successCallback?: () => void);
      
        version: string;
      
        changeVersion(
          oldVersion: string,
          newVersion: string,
          callback: (transaction: SQLTransaction) => void,
          errorCallback?: (error: SQLError) => void,
          successCallback?: () => void);
      }
      
      interface SQLTransaction {
        executeSql(
          sqlStatement: string,
          arguments?: any[],
          callback?: (transaction: SQLTransaction, result: SQLResultSet) => void,
          errorCallback?: (transaction: SQLTransaction, error: SQLError) => void): void;
      }
      
      interface SQLError {
        /**
         * UNKNOWN_ERR = 0;
         * DATABASE_ERR = 1;
         * VERSION_ERR = 2;
         * TOO_LARGE_ERR = 3;
         * QUOTA_ERR = 4;
         * SYNTAX_ERR = 5;
         * CONSTRAINT_ERR = 6;
        * TIMEOUT_ERR = 7;
         */
        code: number;
        message: string
      }
      
      interface SQLResultSet {
        insertId: number;
        rowsAffected: number;
        rows: SQLResultSetRowList;
      }
      
      interface SQLResultSetRowList {
        length: number;
        item(index: number): any;
      }
  • dummy.ts
    class Apple {
      constructor(public color = 'red') {
      }
    }
    
    console.log('Look, I am a happy TypeScript file running away.');
    console.log('I\'ve got class ' + Apple);
    var apple = new Apple();
    console.log('I\'ve created an instance of it: ', apple);
    apple.color = 'green';
    console.log('I\'ve changed its colour: ', apple);
  • index.html
    <!doctype html>
    <title>mini shell </title>
    
    <script data-legit=mi>
      // ONERROR
      <%=embedFile('boot/onerror.js')%>
    //# sourceURL=boot/onerror.js
    </script>
    
    
    <script data-legit=mi>
      // EARLYBOOT
      earlyBoot(window);
    
      	<%=typescriptBuild('boot/*')%>
    
        <%=embedFile('boot/bootUI.js')%>
    //# sourceURL=/boot/base.js
    </script>
    
    
    <script data-legit=mi>
    
      // LOADER, SHELL
    <%=typescriptBuild('load/*', 'persistence/*', 'boot/base.d.ts', 'typings/*')%>
    //# sourceURL=/load/shellLoader.ts.js
    </script>
    
    <!-- total 12Mb, saved <%=(function() {
    
    // TOTAL SUMMARY
    var monthsPrettyCase = ('Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec').split('|');
    
    var saveDate = new Date();
    var dtText =
      saveDate.getDate() + ' ' +
      monthsPrettyCase[saveDate.getMonth()] + ' ' +
      saveDate.getFullYear() + ' ' +
      num2(saveDate.getHours()) + ':' +
      num2(saveDate.getMinutes()) + ':' +
      num2(saveDate.getSeconds()) + '.' +
      (+saveDate).toString().slice(-3);
    
    var saveDateLocalStr = saveDate.toString();
    var gmtMatch = (/(GMT\s*[\-\+]\d+(\:\d+)?)/i).exec(saveDateLocalStr);
    if (gmtMatch)
    	dtText += ' ' + gmtMatch[1];
    
    return dtText;
    
    function num2(n) { return n <= 9 ? '0' + n : '' + n; }
    
    })()
    %> -->
    
    <!-- /shell/showCommander.js
    <%=typescriptBuild('shell/*', 'noapi/*', 'isolation/*',   'boot/base.d.ts', 'persistence/Drive.ts', 'typings/*')%>
    -->
    
    <!-- /shell/buildMessage.js
    
    var shell;
    if (!shell) shell = {};
    shell.buildMessage = 'Built at <%=(function() {
    
    var monthsPrettyCase = ('Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec').split('|');
    
    var saveDate = new Date();
    var dtText =
      saveDate.getDate() + ' ' +
      monthsPrettyCase[saveDate.getMonth()] + ' ' +
      saveDate.getFullYear() + ' ' +
      num2(saveDate.getHours()) + ':' +
      num2(saveDate.getMinutes()) + ':' +
      num2(saveDate.getSeconds()) + '.' +
      (+saveDate).toString().slice(-3);
    
    var saveDateLocalStr = saveDate.toString();
    var gmtMatch = (/(GMT\s*[\-\+]\d+(\:\d+)?)/i).exec(saveDateLocalStr);
    if (gmtMatch)
    	dtText += ' ' + gmtMatch[1];
    
    return dtText;
    
    function num2(n) { return n <= 9 ? '0' + n : '' + n; }
    
    })()
    %>';
    
    shell.buildTime = <%=+new Date()%>;
    -->
    
    <!-- /shell/!onerror.js
    <%=embedFile('/boot/onerror.js')%>
    -->
    
    <!-- /empty/
    -->
    
    
    <!-- /LF-file.txt
    123
    456-->
    
    <!-- /CRLF-file [CRLF]
    123
    456-->
    
    <!-- /CR-file [CR]
    123
    456-->
    
    <!-- /exportsome.js [CR]
    module.exports = 55-->
    
    <!-- /exports_fs.js [CR]
    module.exports = require('fs')-->
    
    <!-- /exports_process.js [CR]
    module.exports = process-->
    
    <!-- /eval-file.txt [eval]
     "random char: " + String.fromCharCode(Math.random()*16000)+"\n"+
     "date: "+new Date()+"\n"+
     "location: "+location -->
    
    <!-- /json-file.txt [json]
    "new ok \u2222 and what\r\n or \u0001?\n\n\n"-->
    
    <%=(function() {
    return ''; // SWITCHED OFF LARGE DIRECTORY GENERATION (it makes it easier to debug DOM stuff)
    
    var dump = [];
    for (var i = 0; i < 2000; i++) {
    	dump.push('<'+'!'+'-- /large-directory/'+(500+i)+'.txt');
      dump.push('OK --'+'>');
    }
    return dump.join('\n');
       })()%>
    
    
    
    
    
    
    
    
    <!-- /shell/style.css
    <%=(function() {
    	var drive = portabled.build.processTemplate.mainDrive;
    	var files = drive.files();
    	var styleText = [];
      for (var i = 0; i < files.length; i++) {
        if (/^\/shell\/[\s\S]*\.css$/.test(files[i]))
          styleText.push(drive.read(files[i]));
      }
    	return styleText.join('\n');
    
    })()%>
    -->
    
    <%=(function() {
    
    	var drive = portabled.build.processTemplate.mainDrive;
    	var files = drive.files();
    	var fileDump = [];
      for (var i = 0; i < files.length; i++) {
        var content = drive.read(files[i]);
        var decoratedContent = content.
    			replace(/\-\-(\**)\>/g, '--*$1>').
    			replace(/\<(\**)\!/g, '<*$1!');
    	  fileDump.push('<'+'!'+'-- '+'/src'+files[i]);
        fileDump.push(decoratedContent);
        fileDump.push('--'+'!'+'>');
      }
    	return fileDump.join('\n');
    
    })()%>
    
    
  • readme.md
    #New mini portable shell development
    
    Used these open-source libraries:
    
     * [feross/buffer] (https://github.com/feross/buffer) - MIT
     * [beatgammit/base64-js] (https://github.com/beatgammit/base64-js) - MIT
     * [feross/ieee754] (https://github.com/feross/ieee754) - MIT
     * [retrofox/is-array] (https://github.com/retrofox/is-array) - MIT
    
    ## Boot process
    
    The boot process begins with first bytes of the page received, during the loading of the content,
    then would continue for a little after the page is loaded.
    
    The main post-content-load is completing the data fetch from the local storage. It may well finish earlier,
    but may take some time.
    
    During the boot process, and at the end of it the code is supposed to show sensible UI
    and implement neat handover animations (unless the whole boot finishes very fast).
    
    ### Early boot
    
    The mission of this stage is to create the temporary boot UI (very quickly!) and hand over to the shell loader.
    The boot UI is something like a splash screen, boot animation, washed-out live-like image or whatever.
    
     * Error handler is installed at the first opportunity
     * Base.js library with primitives for basic DOM manipulation is loaded
     * BootUI iframe is created
     * BootUI function is invoked to draw the boot animation
    
    ### Shell loader
    
    Shell loader's task is to initialise the persistence (virtual filesystem backed by DOM and local storage).
    
    During that persistence loading the shell loader passes progress events to the boot UI. Upon completion
    it starts the actual shell and finally animates from boot UI to the shell.
    
     * Persistence loading is started
     * Persistence keeps polling the DOM state, fishing for pieces of 'virtual filesystem'
     * Progress is supposed to be reported to the BootUI
     * Persistence also need to load the locally-stored state, reconciling it with the DOM (by timestamps)
     * Eventualy persistence report completion
     * Shell iframe is created with opacity=0
     * Shell start code is loaded (normally from the filesystem) and kicked off
     * Animating BootUI.opacity -> 0; Shell.opacity->1
    
     ### Shell
    
    When shell begins to load, the persistence is fully functional, so it's up to the shell what to do with it.
    
    The interactive node-like shell emulates node.js to a great extent: by laying node.js API on top of the persistence and various browser features.
    
    At the moment the shell also has file-manager-like panels, so virtual filesystem can be navigated
    and necessary tasks (copying/editing/moving of files or directories) performed interactively.
    
    Other shells may host more specialised apps. These are planned examples:
    
     * PC.js virtual machine hosting early PC images (DOS, early Windows, OS/2 and such)
     * Markdown viewer/editor
     * SVG editor
     * Slide editor
     * Spreadsheet editor
    
    ## Involved libaries and sub-modules
    
    First of all, the sequence above explicitly mentiones three mini-libraries:
    
     * Base.js
     * BootUI
     * Persistence
    
    Those indeed can be considered separately, with a degree of isolation from the rest of the boot process.
    
    ### Base.js
    
    A very tight set of functions for DOM manipulation. It is used by both booting stage, as well as actually employed by the current shell.
    
    These are broad features of the mini-library:
    
     * Setting/getting text of a DOM element (older IE handling, special workarounds for some elements)
     * Creating elements and setting properties/CSS attributes in JSON-like syntax
     * Subscribing to events
     * Creating IFRAME and retrieving its key objects (inner window, inner document)
    
    ### BootUI
    
    The boot-time UI is largely free in what it renders. It is hosted in a separate IFRAME
    with limited communication to the rest of the code.
    
    It is expected that various shells provide each their fine-tuned boot UI 'library'.
    
    A good option would be to render the state of the application as the user left,
    with a tasteful overlay reflecting the boot progress.
    
    ### Persistence
    
    The task of emulating an embedded virtual filesystem of files/directories is implemented in the persistence mini-library.
    
    The persistence API is described in terms of a Drive object (with read/write methods) and its construction stages.
    
    Several sources of storage are implemented towards the same API:
    
     * DOM
     * IndexedDB
     * WebSQL
     * LocalStorage
    
    DOM storage is expected to exist at a very minimum (we are running in the context of a page already!),
    then one of the local storage options is added upon a brief detection process.
    
    From the external caller the persistence mini-library expects a single call to *mountDrive* function,
    passing in a few inputs and a callback.

New mini portable shell development

Used these open-source libraries:

Boot process

The boot process begins with first bytes of the page received, during the loading of the content, then would continue for a little after the page is loaded.

The main post-content-load is completing the data fetch from the local storage. It may well finish earlier, but may take some time.

During the boot process, and at the end of it the code is supposed to show sensible UI and implement neat handover animations (unless the whole boot finishes very fast).

Early boot

The mission of this stage is to create the temporary boot UI (very quickly!) and hand over to the shell loader. The boot UI is something like a splash screen, boot animation, washed-out live-like image or whatever.

  • Error handler is installed at the first opportunity
  • Base.js library with primitives for basic DOM manipulation is loaded
  • BootUI iframe is created
  • BootUI function is invoked to draw the boot animation

Shell loader

Shell loader's task is to initialise the persistence (virtual filesystem backed by DOM and local storage).

During that persistence loading the shell loader passes progress events to the boot UI. Upon completion it starts the actual shell and finally animates from boot UI to the shell.

  • Persistence loading is started
  • Persistence keeps polling the DOM state, fishing for pieces of 'virtual filesystem'
  • Progress is supposed to be reported to the BootUI
  • Persistence also need to load the locally-stored state, reconciling it with the DOM (by timestamps)
  • Eventualy persistence report completion
  • Shell iframe is created with opacity=0
  • Shell start code is loaded (normally from the filesystem) and kicked off
  • Animating BootUI.opacity -> 0; Shell.opacity->1

    Shell

When shell begins to load, the persistence is fully functional, so it's up to the shell what to do with it.

The interactive node-like shell emulates node.js to a great extent: by laying node.js API on top of the persistence and various browser features.

At the moment the shell also has file-manager-like panels, so virtual filesystem can be navigated and necessary tasks (copying/editing/moving of files or directories) performed interactively.

Other shells may host more specialised apps. These are planned examples:

  • PC.js virtual machine hosting early PC images (DOS, early Windows, OS/2 and such)
  • Markdown viewer/editor
  • SVG editor
  • Slide editor
  • Spreadsheet editor

Involved libaries and sub-modules

First of all, the sequence above explicitly mentiones three mini-libraries:

  • Base.js
  • BootUI
  • Persistence

Those indeed can be considered separately, with a degree of isolation from the rest of the boot process.

Base.js

A very tight set of functions for DOM manipulation. It is used by both booting stage, as well as actually employed by the current shell.

These are broad features of the mini-library:

  • Setting/getting text of a DOM element (older IE handling, special workarounds for some elements)
  • Creating elements and setting properties/CSS attributes in JSON-like syntax
  • Subscribing to events
  • Creating IFRAME and retrieving its key objects (inner window, inner document)

BootUI

The boot-time UI is largely free in what it renders. It is hosted in a separate IFRAME with limited communication to the rest of the code.

It is expected that various shells provide each their fine-tuned boot UI 'library'.

A good option would be to render the state of the application as the user left, with a tasteful overlay reflecting the boot progress.

Persistence

The task of emulating an embedded virtual filesystem of files/directories is implemented in the persistence mini-library.

The persistence API is described in terms of a Drive object (with read/write methods) and its construction stages.

Several sources of storage are implemented towards the same API:

  • DOM
  • IndexedDB
  • WebSQL
  • LocalStorage

DOM storage is expected to exist at a very minimum (we are running in the context of a page already!), then one of the local storage options is added upon a brief detection process.

From the external caller the persistence mini-library expects a single call to mountDrive function, passing in a few inputs and a callback.

portabled v0.6.1a by Oleg Mihailik
built Sat Jun 13 2015 11:52:49 GMT+0100 (GMT Summer Time)

Used Open Source libraries:
TypeScript (Microsoft, with Apache 2.0 license)
CodeMirror (Marijn Haverbeke, with MIT license)
Knockout.js (Ryan Niemeyer, with MIT license)
Zip.js (Gildas Lormeau, with BSD license)
Marked (Christopher Jeffrey, with MIT license)
ES5-shims (with MIT license)
GitHub API wrapper (Michael Aufreiter with BSD2 license)
JS Murmur hasher (Gary Court with MIT license)
google-diff-match-patch (Google with Apache 2.0 license)
UglifyJS2 (Mihai Bazon with BSD license)
UglifyCSS (Franck Marcia with MIT license)
JSON3 (Kit Cambridge with MIT license)
- main contributors mentioned where applicable.

/load/shellLoader.ts

/load/shellLoader.ts

/load/shellLoader.ts

/load/shellLoader.ts

/load/shellLoader.ts